From af9c84ced01bfc55d8fa9a3db38ddb2603ba9eea Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 06:16:28 +0000 Subject: [PATCH 1/2] feat: Add ONTAP passthrough APIs Adds the following new methods for direct ONTAP API interaction: - ExecuteOntapPost - ExecuteOntapGet - ExecuteOntapDelete - ExecuteOntapPatch `StoragePoolType` docs: A comment for field `source_volume` in message `.google.cloud.netapp.v1.Backup` is changed docs: A comment for field `type` in message `.google.cloud.netapp.v1.StoragePool` is changed docs: A comment for field `source_backup` in message `.google.cloud.netapp.v1.RestoreParameters` is changed fix!: An existing value `UNIFIED_LARGE_CAPACITY` is removed from enum `StoragePoolType` PiperOrigin-RevId: 889585893 Source-Link: https://github.com/googleapis/googleapis/commit/a90dc55a699b916cbff59aa8112e067f6bab5bd4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/13a2f770830b5eaa30cf6b221de9e2bdec80c4db Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldGFwcC8uT3dsQm90LnlhbWwiLCJoIjoiMTNhMmY3NzA4MzBiNWVhYTMwY2Y2YjIyMWRlOWUyYmRlYzgwYzRkYiJ9 --- .../google-cloud-netapp/.eslintignore | 7 + .../google-cloud-netapp/.eslintrc.json | 3 + .../google-cloud-netapp/.gitattributes | 4 + .../google-cloud-netapp/.gitignore | 14 + owl-bot-staging/google-cloud-netapp/.jsdoc.js | 55 + .../google-cloud-netapp/.mocharc.js | 33 + owl-bot-staging/google-cloud-netapp/.nycrc | 24 + .../google-cloud-netapp/.prettierignore | 6 + .../google-cloud-netapp/.prettierrc.js | 22 + .../google-cloud-netapp/CODE_OF_CONDUCT.md | 94 + .../google-cloud-netapp/CONTRIBUTING.md | 76 + owl-bot-staging/google-cloud-netapp/LICENSE | 202 + owl-bot-staging/google-cloud-netapp/README.md | 185 + .../cloud/netapp/v1/active_directory.proto | 237 + .../google/cloud/netapp/v1/backup.proto | 262 + .../cloud/netapp/v1/backup_policy.proto | 195 + .../google/cloud/netapp/v1/backup_vault.proto | 303 + .../netapp/v1/cloud_netapp_service.proto | 918 + .../google/cloud/netapp/v1/common.proto | 158 + .../google/cloud/netapp/v1/host_group.proto | 197 + .../protos/google/cloud/netapp/v1/kms.proto | 246 + .../protos/google/cloud/netapp/v1/ontap.proto | 118 + .../google/cloud/netapp/v1/quota_rule.proto | 203 + .../google/cloud/netapp/v1/replication.proto | 509 + .../google/cloud/netapp/v1/snapshot.proto | 180 + .../google/cloud/netapp/v1/storage_pool.proto | 341 + .../google/cloud/netapp/v1/volume.proto | 1022 + .../google-cloud-netapp/protos/protos.d.ts | 24482 ++++++ .../google-cloud-netapp/protos/protos.js | 64227 ++++++++++++++++ .../google-cloud-netapp/protos/protos.json | 8651 +++ .../v1/net_app.create_active_directory.js | 75 + .../generated/v1/net_app.create_backup.js | 77 + .../v1/net_app.create_backup_policy.js | 77 + .../v1/net_app.create_backup_vault.js | 77 + .../generated/v1/net_app.create_host_group.js | 75 + .../generated/v1/net_app.create_kms_config.js | 75 + .../generated/v1/net_app.create_quota_rule.js | 75 + .../v1/net_app.create_replication.js | 76 + .../generated/v1/net_app.create_snapshot.js | 76 + .../v1/net_app.create_storage_pool.js | 75 + .../generated/v1/net_app.create_volume.js | 75 + .../v1/net_app.delete_active_directory.js | 62 + .../generated/v1/net_app.delete_backup.js | 63 + .../v1/net_app.delete_backup_policy.js | 63 + .../v1/net_app.delete_backup_vault.js | 63 + .../generated/v1/net_app.delete_host_group.js | 64 + .../generated/v1/net_app.delete_kms_config.js | 62 + .../generated/v1/net_app.delete_quota_rule.js | 62 + .../v1/net_app.delete_replication.js | 63 + .../generated/v1/net_app.delete_snapshot.js | 63 + .../v1/net_app.delete_storage_pool.js | 62 + .../generated/v1/net_app.delete_volume.js | 68 + .../generated/v1/net_app.encrypt_volumes.js | 62 + .../generated/v1/net_app.establish_peering.js | 85 + .../v1/net_app.establish_volume_peering.js | 85 + .../v1/net_app.execute_ontap_delete.js | 65 + .../generated/v1/net_app.execute_ontap_get.js | 65 + .../v1/net_app.execute_ontap_patch.js | 80 + .../v1/net_app.execute_ontap_post.js | 80 + .../v1/net_app.get_active_directory.js | 61 + .../generated/v1/net_app.get_backup.js | 62 + .../generated/v1/net_app.get_backup_policy.js | 62 + .../generated/v1/net_app.get_backup_vault.js | 62 + .../generated/v1/net_app.get_host_group.js | 63 + .../generated/v1/net_app.get_kms_config.js | 61 + .../generated/v1/net_app.get_quota_rule.js | 61 + .../generated/v1/net_app.get_replication.js | 62 + .../generated/v1/net_app.get_snapshot.js | 62 + .../generated/v1/net_app.get_storage_pool.js | 61 + .../generated/v1/net_app.get_volume.js | 61 + .../v1/net_app.list_active_directories.js | 80 + .../v1/net_app.list_backup_policies.js | 80 + .../v1/net_app.list_backup_vaults.js | 82 + .../generated/v1/net_app.list_backups.js | 93 + .../generated/v1/net_app.list_host_groups.js | 80 + .../generated/v1/net_app.list_kms_configs.js | 80 + .../generated/v1/net_app.list_quota_rules.js | 80 + .../generated/v1/net_app.list_replications.js | 82 + .../generated/v1/net_app.list_snapshots.js | 82 + .../v1/net_app.list_storage_pools.js | 81 + .../generated/v1/net_app.list_volumes.js | 80 + .../v1/net_app.restore_backup_files.js | 80 + .../v1/net_app.resume_replication.js | 63 + .../net_app.reverse_replication_direction.js | 63 + .../generated/v1/net_app.revert_volume.js | 70 + .../generated/v1/net_app.stop_replication.js | 72 + .../v1/net_app.switch_active_replica_zone.js | 62 + .../generated/v1/net_app.sync_replication.js | 63 + .../v1/net_app.update_active_directory.js | 71 + .../generated/v1/net_app.update_backup.js | 71 + .../v1/net_app.update_backup_policy.js | 71 + .../v1/net_app.update_backup_vault.js | 71 + .../generated/v1/net_app.update_host_group.js | 69 + .../generated/v1/net_app.update_kms_config.js | 71 + .../generated/v1/net_app.update_quota_rule.js | 70 + .../v1/net_app.update_replication.js | 68 + .../generated/v1/net_app.update_snapshot.js | 68 + .../v1/net_app.update_storage_pool.js | 71 + .../generated/v1/net_app.update_volume.js | 71 + .../v1/net_app.validate_directory_service.js | 66 + .../generated/v1/net_app.verify_kms_config.js | 61 + ...ippet_metadata_google.cloud.netapp.v1.json | 3231 + .../google-cloud-netapp/src/index.ts | 27 + .../src/v1/gapic_metadata.json | 777 + .../google-cloud-netapp/src/v1/index.ts | 19 + .../src/v1/net_app_client.ts | 10491 +++ .../src/v1/net_app_client_config.json | 373 + .../src/v1/net_app_proto_list.json | 16 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 49 + .../test/gapic_net_app_v1.ts | 12482 +++ .../google-cloud-netapp/tsconfig.json | 22 + .../google-cloud-netapp/webpack.config.js | 64 + 114 files changed, 135584 insertions(+) create mode 100644 owl-bot-staging/google-cloud-netapp/.eslintignore create mode 100644 owl-bot-staging/google-cloud-netapp/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-netapp/.gitattributes create mode 100644 owl-bot-staging/google-cloud-netapp/.gitignore create mode 100644 owl-bot-staging/google-cloud-netapp/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-netapp/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-netapp/.nycrc create mode 100644 owl-bot-staging/google-cloud-netapp/.prettierignore create mode 100644 owl-bot-staging/google-cloud-netapp/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md create mode 100644 owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md create mode 100644 owl-bot-staging/google-cloud-netapp/LICENSE create mode 100644 owl-bot-staging/google-cloud-netapp/README.md create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto create mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js create mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json create mode 100644 owl-bot-staging/google-cloud-netapp/src/index.ts create mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts create mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json create mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json create mode 100644 owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-netapp/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts create mode 100644 owl-bot-staging/google-cloud-netapp/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-netapp/webpack.config.js diff --git a/owl-bot-staging/google-cloud-netapp/.eslintignore b/owl-bot-staging/google-cloud-netapp/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-netapp/.eslintrc.json b/owl-bot-staging/google-cloud-netapp/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-netapp/.gitattributes b/owl-bot-staging/google-cloud-netapp/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-cloud-netapp/.gitignore b/owl-bot-staging/google-cloud-netapp/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-netapp/.jsdoc.js b/owl-bot-staging/google-cloud-netapp/.jsdoc.js new file mode 100644 index 00000000000..07f36ff414a --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.jsdoc.js @@ -0,0 +1,55 @@ +// 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/netapp', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-netapp/.mocharc.js b/owl-bot-staging/google-cloud-netapp/.mocharc.js new file mode 100644 index 00000000000..5eb34e86c87 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.mocharc.js @@ -0,0 +1,33 @@ +// 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. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-netapp/.nycrc b/owl-bot-staging/google-cloud-netapp/.nycrc new file mode 100644 index 00000000000..81a95fc94b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/.prettierignore b/owl-bot-staging/google-cloud-netapp/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/owl-bot-staging/google-cloud-netapp/.prettierrc.js b/owl-bot-staging/google-cloud-netapp/.prettierrc.js new file mode 100644 index 00000000000..7649ee3c254 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/.prettierrc.js @@ -0,0 +1,22 @@ +// 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. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md b/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md b/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md new file mode 100644 index 00000000000..46b5bf76212 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Netapp API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/LICENSE b/owl-bot-staging/google-cloud-netapp/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-netapp/README.md b/owl-bot-staging/google-cloud-netapp/README.md new file mode 100644 index 00000000000..f4c7d90f98b --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/README.md @@ -0,0 +1,185 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [NetApp API: Nodejs Client][homepage] + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority + +[![npm version](https://img.shields.io/npm/v/@google-cloud/netapp.svg)](https://www.npmjs.org/package/@google-cloud/netapp) + +NetApp API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [NetApp API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/netapp/latest) +* [NetApp API Documentation](https://cloud.google.com/netapp/volumes/docs/discover/overview) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the NetApp API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/netapp +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js) | +| create backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js) | +| create backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js) | +| create backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js) | +| create host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js) | +| create kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js) | +| create quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js) | +| create replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js) | +| create snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js) | +| create storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js) | +| create volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js) | +| delete active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js) | +| delete backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js) | +| delete backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js) | +| delete backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js) | +| delete host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js) | +| delete kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js) | +| delete quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js) | +| delete replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js) | +| delete snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js) | +| delete storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js) | +| delete volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js) | +| encrypt volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js) | +| establish peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js) | +| establish volume peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js) | +| execute ontap delete | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js) | +| execute ontap get | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js) | +| execute ontap patch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js) | +| execute ontap post | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js) | +| get active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js) | +| get backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js) | +| get backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js) | +| get backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js) | +| get host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js) | +| get kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js) | +| get quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js) | +| get replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js) | +| get snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js) | +| get storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js) | +| get volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js) | +| list active directories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js) | +| list backup policies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js) | +| list backup vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js) | +| list backups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js) | +| list host groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js) | +| list kms configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js) | +| list quota rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js) | +| list replications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js) | +| list snapshots | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js) | +| list storage pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js) | +| list volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js) | +| restore backup files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js) | +| resume replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js) | +| reverse replication direction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js) | +| revert volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js) | +| stop replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js) | +| switch active replica zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js) | +| sync replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js) | +| update active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js) | +| update backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js) | +| update backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js) | +| update backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js) | +| update host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js) | +| update kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js) | +| update quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js) | +| update replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js) | +| update snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js) | +| update storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js) | +| update volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js) | +| validate directory service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js) | +| verify kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/netapp@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto new file mode 100644 index 00000000000..3ec6b81ef06 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto @@ -0,0 +1,237 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ActiveDirectoryProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListActiveDirectoriesRequest for requesting multiple active directories. +message ListActiveDirectoriesRequest { + // Required. Parent value for ListActiveDirectoriesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// ListActiveDirectoriesResponse contains all the active directories requested. +message ListActiveDirectoriesResponse { + // The list of active directories. + repeated ActiveDirectory active_directories = 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; +} + +// GetActiveDirectory for getting a single active directory. +message GetActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// CreateActiveDirectoryRequest for creating an active directory. +message CreateActiveDirectoryRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Required. Fields of the to be created active directory. + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the active directory to create. Must be unique within the + // parent resource. Must contain only letters, numbers and hyphen, with the + // first character a letter , the last a letter or a number, and a 63 + // character maximum. + string active_directory_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateActiveDirectoryRequest for updating an active directory. +message UpdateActiveDirectoryRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Active Directory 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteActiveDirectoryRequest for deleting a single active directory. +message DeleteActiveDirectoryRequest { + // Required. Name of the active directory. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; +} + +// ActiveDirectory is the public representation of the active directory config. +message ActiveDirectory { + option (google.api.resource) = { + type: "netapp.googleapis.com/ActiveDirectory" + pattern: "projects/{project}/locations/{location}/activeDirectories/{active_directory}" + plural: "activeDirectories" + singular: "activeDirectory" + }; + + // The Active Directory States + enum State { + // Unspecified Active Directory State + STATE_UNSPECIFIED = 0; + + // Active Directory State is Creating + CREATING = 1; + + // Active Directory State is Ready + READY = 2; + + // Active Directory State is Updating + UPDATING = 3; + + // Active Directory State is In use + IN_USE = 4; + + // Active Directory State is Deleting + DELETING = 5; + + // Active Directory State is Error + ERROR = 6; + + // Active Directory State is Diagnosing. + DIAGNOSING = 7; + } + + // Identifier. The resource name of the active directory. + // Format: + // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Create time of the active directory. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the AD. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Name of the Active Directory domain + string domain = 4 [(google.api.field_behavior) = REQUIRED]; + + // The Active Directory site the service will limit Domain Controller + // discovery too. + string site = 5; + + // Required. Comma separated list of DNS server IP addresses for the Active + // Directory domain. + string dns = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. NetBIOSPrefix is used as a prefix for SMB server name. + string net_bios_prefix = 7 [(google.api.field_behavior) = REQUIRED]; + + // The Organizational Unit (OU) within the Windows Active Directory the user + // belongs to. + string organizational_unit = 8; + + // If enabled, AES encryption will be enabled for SMB communication. + bool aes_encryption = 9; + + // Required. Username of the Active Directory domain administrator. + string username = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Password of the Active Directory domain administrator. + string password = 11 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Users to be added to the Built-in Backup Operator active + // directory group. + repeated string backup_operators = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Users to be added to the Built-in Admininstrators group. + repeated string administrators = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Domain users to be given the SeSecurityPrivilege. + repeated string security_operators = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Name of the active directory machine. This optional parameter is used only + // while creating kerberos volume + string kdc_hostname = 14; + + // KDC server IP address for the active directory machine. + string kdc_ip = 15; + + // If enabled, will allow access to local users and LDAP users. If access is + // needed for only LDAP users, it has to be disabled. + bool nfs_users_with_ldap = 16; + + // Description of the active directory. + string description = 17; + + // Specifies whether or not the LDAP traffic needs to be signed. + bool ldap_signing = 18; + + // If enabled, traffic between the SMB server to Domain Controller (DC) will + // be encrypted. + bool encrypt_dc_connections = 19; + + // Labels for the active directory. + map labels = 20; + + // Output only. The state details of the Active Directory. + string state_details = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto new file mode 100644 index 00000000000..22f6dfd68bb --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto @@ -0,0 +1,262 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// A NetApp Backup. +message Backup { + option (google.api.resource) = { + type: "netapp.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // The Backup States + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // Backup is being created. While in this state, the snapshot for the backup + // point-in-time may not have been created yet, and so the point-in-time may + // not have been fixed. + CREATING = 1; + + // Backup is being uploaded. While in this state, none of the writes to the + // volume will be included in the backup. + UPLOADING = 2; + + // Backup is available for use. + READY = 3; + + // Backup is being deleted. + DELETING = 4; + + // Backup is not valid and cannot be used for creating new volumes or + // restoring existing volumes. + ERROR = 5; + + // Backup is being updated. + UPDATING = 6; + } + + // Backup types. + enum Type { + // Unspecified backup type. + TYPE_UNSPECIFIED = 0; + + // Manual backup type. + MANUAL = 1; + + // Scheduled backup type. + SCHEDULED = 2; + } + + // Identifier. The resource name of the backup. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The backup state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of the backup with 2048 characters or less. + // Requests with longer descriptions will be rejected. + string description = 3; + + // Output only. Size of the file system when the backup was created. When + // creating a new volume from the backup, the volume capacity will have to be + // at least as big. + int64 volume_usage_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of backup, manually created or created by a backup + // policy. + Type backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Volume full name of this backup belongs to. + // Either source_volume or ontap_source should be provided. + // Format: + // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + string source_volume = 6 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // If specified, backup will be created from the given snapshot. + // If not specified, there will be a new snapshot taken to initiate the backup + // creation. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + optional string source_snapshot = 7 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; + + // Output only. The time when the backup was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 9; + + // Output only. Total size of all backups in a chain in bytes = baseline + // backup size + sum(incremental backup size) + int64 chain_storage_bytes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use + bool satisfies_pzs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use + bool satisfies_pzi = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Region of the volume from which the backup was created. + // Format: `projects/{project_id}/locations/{location}` + string volume_region = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Output only. Region in which backup is stored. + // Format: `projects/{project_id}/locations/{location}` + string backup_region = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Output only. The time until which the backup is not deletable. + google.protobuf.Timestamp enforced_retention_end_time = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListBackupsRequest lists backups. +message ListBackupsRequest { + // Required. The backupVault for which to retrieve backup information, + // in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + // To retrieve backup information for all locations, use "-" for the + // `{location}` value. + // To retrieve backup information for all backupVaults, use "-" for the + // `{backup_vault_id}` value. + // To retrieve backup information for a volume, use "-" for the + // `{backup_vault_id}` value and specify volume full name with the filter. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Backup" + } + ]; + + // The maximum number of items to return. The service may return fewer + // than this value. The maximum value + // is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // The standard list filter. + // If specified, backups will be returned based on the attribute name that + // matches the filter expression. If empty, then no backups are filtered out. + // See https://google.aip.dev/160 + string filter = 5; +} + +// ListBackupsResponse is the result of ListBackupsRequest. +message ListBackupsResponse { + // A list of backups in the project. + repeated Backup backups = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetBackupRequest gets the state of a backup. +message GetBackupRequest { + // Required. The backup resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; +} + +// CreateBackupRequest creates a backup. +message CreateBackupRequest { + // Required. The NetApp backupVault to create the backups of, in the format + // `projects/*/locations/*/backupVaults/{backup_vault_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Backup" + } + ]; + + // Required. The ID to use for the backup. + // The ID must be unique within the specified backupVault. + // Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A backup resource + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupRequest deletes a backup. +message DeleteBackupRequest { + // Required. The backup resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; +} + +// UpdateBackupRequest updates description and/or labels for a backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup resource to be updated. + // 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto new file mode 100644 index 00000000000..4daac312d6c --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto @@ -0,0 +1,195 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPolicyProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// Backup Policy. +message BackupPolicy { + option (google.api.resource) = { + type: "netapp.googleapis.com/BackupPolicy" + pattern: "projects/{project}/locations/{location}/backupPolicies/{backup_policy}" + plural: "backupPolicies" + singular: "backupPolicy" + }; + + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // BackupPolicy is being created. + CREATING = 1; + + // BackupPolicy is available for use. + READY = 2; + + // BackupPolicy is being deleted. + DELETING = 3; + + // BackupPolicy is not valid and cannot be used. + ERROR = 4; + + // BackupPolicy is being updated. + UPDATING = 5; + } + + // Identifier. The resource name of the backup policy. + // Format: + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Number of daily backups to keep. Note that the minimum daily backup limit + // is 2. + optional int32 daily_backup_limit = 2; + + // Number of weekly backups to keep. Note that the sum of daily, weekly and + // monthly backups should be greater than 1. + optional int32 weekly_backup_limit = 3; + + // Number of monthly backups to keep. Note that the sum of daily, weekly and + // monthly backups should be greater than 1. + optional int32 monthly_backup_limit = 4; + + // Description of the backup policy. + optional string description = 5; + + // If enabled, make backups automatically according to the schedules. + // This will be applied to all volumes that have this policy attached and + // enforced on volume level. If not specified, default is true. + optional bool enabled = 6; + + // Output only. The total number of volumes assigned by this backup policy. + optional int32 assigned_volume_count = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the backup policy was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 9; + + // Output only. The backup policy state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CreateBackupPolicyRequest creates a backupPolicy. +message CreateBackupPolicyRequest { + // Required. The location to create the backup policies of, in the format + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Required. A backupPolicy resource + BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the backup policy. + // The ID must be unique within the specified location. + // Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string backup_policy_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// GetBackupPolicyRequest gets the state of a backupPolicy. +message GetBackupPolicyRequest { + // Required. The backupPolicy resource name, in the format + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; +} + +// ListBackupPoliciesRequest for requesting multiple backup policies. +message ListBackupPoliciesRequest { + // Required. Parent value for ListBackupPoliciesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// ListBackupPoliciesResponse contains all the backup policies requested. +message ListBackupPoliciesResponse { + // The list of backup policies. + repeated BackupPolicy backup_policies = 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; +} + +// UpdateBackupPolicyRequest for updating a backup policy. +message UpdateBackupPolicyRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup Policy 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup policy being updated + BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupPolicyRequest deletes a backup policy. +message DeleteBackupPolicyRequest { + // Required. The backup policy resource name, in the format + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto new file mode 100644 index 00000000000..baa4232afee --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto @@ -0,0 +1,303 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// A NetApp BackupVault. +message BackupVault { + option (google.api.resource) = { + type: "netapp.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // Retention policy for backups in the backup vault + message BackupRetentionPolicy { + // Required. Minimum retention duration in days for backups in the backup + // vault. + int32 backup_minimum_enforced_retention_days = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates if the daily backups are immutable. + // At least one of daily_backup_immutable, weekly_backup_immutable, + // monthly_backup_immutable and manual_backup_immutable must be true. + bool daily_backup_immutable = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates if the weekly backups are immutable. + // At least one of daily_backup_immutable, weekly_backup_immutable, + // monthly_backup_immutable and manual_backup_immutable must be true. + bool weekly_backup_immutable = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates if the monthly backups are immutable. + // At least one of daily_backup_immutable, weekly_backup_immutable, + // monthly_backup_immutable and manual_backup_immutable must be true. + bool monthly_backup_immutable = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates if the manual backups are immutable. + // At least one of daily_backup_immutable, weekly_backup_immutable, + // monthly_backup_immutable and manual_backup_immutable must be true. + bool manual_backup_immutable = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // The Backup Vault States + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // BackupVault is being created. + CREATING = 1; + + // BackupVault is available for use. + READY = 2; + + // BackupVault is being deleted. + DELETING = 3; + + // BackupVault is not valid and cannot be used. + ERROR = 4; + + // BackupVault is being updated. + UPDATING = 5; + } + + // Backup Vault Type. + enum BackupVaultType { + // BackupVault type not set. + BACKUP_VAULT_TYPE_UNSPECIFIED = 0; + + // BackupVault type is IN_REGION. + IN_REGION = 1; + + // BackupVault type is CROSS_REGION. + CROSS_REGION = 2; + } + + // Encryption state of customer-managed encryption keys (CMEK) backups. + enum EncryptionState { + // Encryption state not set. + ENCRYPTION_STATE_UNSPECIFIED = 0; + + // Encryption state is pending. + ENCRYPTION_STATE_PENDING = 1; + + // Encryption is complete. + ENCRYPTION_STATE_COMPLETED = 2; + + // Encryption is in progress. + ENCRYPTION_STATE_IN_PROGRESS = 3; + + // Encryption has failed. + ENCRYPTION_STATE_FAILED = 4; + } + + // Identifier. The resource name of the backup vault. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The backup vault state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the backup vault. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the backup vault. + string description = 4; + + // Resource labels to represent user provided metadata. + map labels = 5; + + // Optional. Type of backup vault to be created. + // Default is IN_REGION. + BackupVaultType backup_vault_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Region in which the backup vault is created. + // Format: `projects/{project_id}/locations/{location}` + string source_region = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Region where the backups are stored. + // Format: `projects/{project_id}/locations/{location}` + string backup_region = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Output only. Name of the Backup vault created in source region. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string source_backup_vault = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Output only. Name of the Backup vault created in backup region. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string destination_backup_vault = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Optional. Backup retention policy defining the retention of backups. + BackupRetentionPolicy backup_retention_policy = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the Key Management System (KMS) configuration to be + // used for backup encryption. Format: + // `projects/{project}/locations/{location}/kmsConfigs/{kms_config}` + string kms_config = 12 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Output only. Field indicating encryption state of CMEK backups. + EncryptionState encryption_state = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The crypto key version used to encrypt the backup vault. + // Format: + // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + string backups_crypto_key_version = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GetBackupVaultRequest gets the state of a backupVault. +message GetBackupVaultRequest { + // Required. The backupVault resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; +} + +// ListBackupVaultsRequest lists backupVaults. +message ListBackupVaultsRequest { + // Required. The location for which to retrieve backupVault information, + // in the format + // `projects/{project_id}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupVault" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListBackupVaultsResponse is the result of ListBackupVaultsRequest. +message ListBackupVaultsResponse { + // A list of backupVaults in the project for the specified location. + repeated BackupVault backup_vaults = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// CreateBackupVaultRequest creates a backup vault. +message CreateBackupVaultRequest { + // Required. The location to create the backup vaults, in the format + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Required. The ID to use for the backupVault. + // The ID must be unique within the specified location. + // Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A backupVault resource + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupVaultRequest deletes a backupVault. +message DeleteBackupVaultRequest { + // Required. The backupVault resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; +} + +// UpdateBackupVaultRequest updates description and/or labels for a backupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup resource to be updated. + // 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backupVault being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto new file mode 100644 index 00000000000..6d4beaa5435 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto @@ -0,0 +1,918 @@ +// 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.netapp.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/active_directory.proto"; +import "google/cloud/netapp/v1/backup.proto"; +import "google/cloud/netapp/v1/backup_policy.proto"; +import "google/cloud/netapp/v1/backup_vault.proto"; +import "google/cloud/netapp/v1/host_group.proto"; +import "google/cloud/netapp/v1/kms.proto"; +import "google/cloud/netapp/v1/ontap.proto"; +import "google/cloud/netapp/v1/quota_rule.proto"; +import "google/cloud/netapp/v1/replication.proto"; +import "google/cloud/netapp/v1/snapshot.proto"; +import "google/cloud/netapp/v1/storage_pool.proto"; +import "google/cloud/netapp/v1/volume.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CloudNetappServiceProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; + +// NetApp Files Google Cloud Service +service NetApp { + option (google.api.default_host) = "netapp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns descriptions of all storage pools owned by the caller. + rpc ListStoragePools(ListStoragePoolsRequest) + returns (ListStoragePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/storagePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new storage pool. + rpc CreateStoragePool(CreateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/storagePools" + body: "storage_pool" + }; + option (google.api.method_signature) = + "parent,storage_pool,storage_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified storage pool by poolId. + rpc GetStoragePool(GetStoragePoolRequest) returns (StoragePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the storage pool properties with the full spec + rpc UpdateStoragePool(UpdateStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}" + body: "storage_pool" + }; + option (google.api.method_signature) = "storage_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the storage pool. + rpc DeleteStoragePool(DeleteStoragePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/storagePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // ValidateDirectoryService does a connectivity check for a directory service + // policy attached to the storage pool. + rpc ValidateDirectoryService(ValidateDirectoryServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // This operation will switch the active/replica zone for a regional + // storagePool. + rpc SwitchActiveReplicaZone(SwitchActiveReplicaZoneRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/storagePools/*}:switch" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "StoragePool" + metadata_type: "OperationMetadata" + }; + } + + // Lists Volumes in a given project. + rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/volumes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Volume. + rpc GetVolume(GetVolumeRequest) returns (Volume) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Volume in a given project and location. + rpc CreateVolume(CreateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/volumes" + body: "volume" + }; + option (google.api.method_signature) = "parent,volume,volume_id"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Volume. + rpc UpdateVolume(UpdateVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{volume.name=projects/*/locations/*/volumes/*}" + body: "volume" + }; + option (google.api.method_signature) = "volume,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Volume. + rpc DeleteVolume(DeleteVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Revert an existing volume to a specified snapshot. + // Warning! This operation will permanently revert all changes made after the + // snapshot was created. + rpc RevertVolume(RevertVolumeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:revert" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Establish volume peering. This is used to establish cluster and svm + // peerings between the GCNV and OnPrem clusters. + rpc EstablishVolumePeering(EstablishVolumePeeringRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all snapshots for a volume. + rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a snapshot for a volume. + rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new snapshot for a volume. + rpc CreateSnapshot(CreateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + body: "snapshot" + }; + option (google.api.method_signature) = "parent,snapshot,snapshot_id"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a snapshot. + rpc DeleteSnapshot(DeleteSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific snapshot. + rpc UpdateSnapshot(UpdateSnapshotRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}" + body: "snapshot" + }; + option (google.api.method_signature) = "snapshot,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Snapshot" + metadata_type: "OperationMetadata" + }; + } + + // Lists active directories. + rpc ListActiveDirectories(ListActiveDirectoriesRequest) + returns (ListActiveDirectoriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/activeDirectories" + }; + option (google.api.method_signature) = "parent"; + } + + // Describes a specified active directory. + rpc GetActiveDirectory(GetActiveDirectoryRequest) returns (ActiveDirectory) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + } + + // CreateActiveDirectory + // Creates the active directory specified in the request. + rpc CreateActiveDirectory(CreateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/activeDirectories" + body: "active_directory" + }; + option (google.api.method_signature) = + "parent,active_directory,active_directory_id"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Update the parameters of an active directories. + rpc UpdateActiveDirectory(UpdateActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}" + body: "active_directory" + }; + option (google.api.method_signature) = "active_directory,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ActiveDirectory" + metadata_type: "OperationMetadata" + }; + } + + // Delete the active directory specified in the request. + rpc DeleteActiveDirectory(DeleteActiveDirectoryRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/activeDirectories/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all KMS configs owned by the caller. + rpc ListKmsConfigs(ListKmsConfigsRequest) returns (ListKmsConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new KMS config. + rpc CreateKmsConfig(CreateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/kmsConfigs" + body: "kms_config" + }; + option (google.api.method_signature) = "parent,kms_config,kms_config_id"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified KMS config by kms_config_id. + rpc GetKmsConfig(GetKmsConfigRequest) returns (KmsConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Kms config properties with the full spec + rpc UpdateKmsConfig(UpdateKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}" + body: "kms_config" + }; + option (google.api.method_signature) = "kms_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Encrypt the existing volumes without CMEK encryption with the desired the + // KMS config for the whole region. + rpc EncryptVolumes(EncryptVolumesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "KmsConfig" + metadata_type: "OperationMetadata" + }; + } + + // Verifies KMS config reachability. + rpc VerifyKmsConfig(VerifyKmsConfigRequest) + returns (VerifyKmsConfigResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify" + body: "*" + }; + } + + // Warning! This operation will permanently delete the Kms config. + rpc DeleteKmsConfig(DeleteKmsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns descriptions of all replications for a volume. + rpc ListReplications(ListReplicationsRequest) + returns (ListReplicationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + }; + option (google.api.method_signature) = "parent"; + } + + // Describe a replication for a volume. + rpc GetReplication(GetReplicationRequest) returns (Replication) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a new replication for a volume. + rpc CreateReplication(CreateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + body: "replication" + }; + option (google.api.method_signature) = "parent,replication,replication_id"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a replication. + rpc DeleteReplication(DeleteReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates the settings of a specific replication. + rpc UpdateReplication(UpdateReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}" + body: "replication" + }; + option (google.api.method_signature) = "replication,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Stop Cross Region Replication. + rpc StopReplication(StopReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Resume Cross Region Replication. + rpc ResumeReplication(ResumeReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Reverses direction of replication. Source becomes destination and + // destination becomes source. + rpc ReverseReplicationDirection(ReverseReplicationDirectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Establish replication peering. + rpc EstablishPeering(EstablishPeeringRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Syncs the replication. This will invoke one time volume data transfer from + // source to destination. + rpc SyncReplication(SyncReplicationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Replication" + metadata_type: "OperationMetadata" + }; + } + + // Creates new backup vault + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{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" + }; + } + + // Returns the description of the specified backup vault + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns list of all available backup vaults. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the settings of a specific backup vault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{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" + }; + } + + // Warning! This operation will permanently delete the backup vault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a backup from the volume specified in the request + // The backup can be created from the given snapshot if specified in the + // request. If no snapshot specified, there'll be a new snapshot taken to + // initiate the backup creation. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified backup + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns descriptions of all backups for a backupVault. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Warning! This operation will permanently delete the backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Update backup with full spec. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Creates new backup policy + rpc CreateBackupPolicy(CreateBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPolicies" + body: "backup_policy" + }; + option (google.api.method_signature) = + "parent,backup_policy,backup_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified backup policy by backup_policy_id. + rpc GetBackupPolicy(GetBackupPolicyRequest) returns (BackupPolicy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns list of all available backup policies. + rpc ListBackupPolicies(ListBackupPoliciesRequest) + returns (ListBackupPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates settings of a specific backup policy. + rpc UpdateBackupPolicy(UpdateBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}" + body: "backup_policy" + }; + option (google.api.method_signature) = "backup_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the backup policy. + rpc DeleteBackupPolicy(DeleteBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns list of all quota rules in a location. + rpc ListQuotaRules(ListQuotaRulesRequest) returns (ListQuotaRulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns details of the specified quota rule. + rpc GetQuotaRule(GetQuotaRuleRequest) returns (QuotaRule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new quota rule. + rpc CreateQuotaRule(CreateQuotaRuleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" + body: "quota_rule" + }; + option (google.api.method_signature) = "parent,quota_rule,quota_rule_id"; + option (google.longrunning.operation_info) = { + response_type: "QuotaRule" + metadata_type: "OperationMetadata" + }; + } + + // Updates a quota rule. + rpc UpdateQuotaRule(UpdateQuotaRuleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}" + body: "quota_rule" + }; + option (google.api.method_signature) = "quota_rule,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "QuotaRule" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a quota rule. + rpc DeleteQuotaRule(DeleteQuotaRuleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Restore files from a backup to a volume. + rpc RestoreBackupFiles(RestoreBackupFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:restore" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupFilesResponse" + metadata_type: "OperationMetadata" + }; + } + + // Returns a list of host groups in a `location`. Use `-` as location to list + // host groups across all locations. + rpc ListHostGroups(ListHostGroupsRequest) returns (ListHostGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/hostGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns details of the specified host group. + rpc GetHostGroup(GetHostGroupRequest) returns (HostGroup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/hostGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new host group. + rpc CreateHostGroup(CreateHostGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/hostGroups" + body: "host_group" + }; + option (google.api.method_signature) = "parent,host_group,host_group_id"; + option (google.longrunning.operation_info) = { + response_type: "HostGroup" + metadata_type: "OperationMetadata" + }; + } + + // Updates an existing host group. + rpc UpdateHostGroup(UpdateHostGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}" + body: "host_group" + }; + option (google.api.method_signature) = "host_group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "HostGroup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a host group. + rpc DeleteHostGroup(DeleteHostGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/hostGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // `ExecuteOntapPost` dispatches the ONTAP `POST` request to the + // `StoragePool` cluster. + rpc ExecuteOntapPost(ExecuteOntapPostRequest) + returns (ExecuteOntapPostResponse) { + option (google.api.http) = { + post: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + body: "*" + }; + } + + // `ExecuteOntapGet` dispatches the ONTAP `GET` request to the + // `StoragePool` cluster. + rpc ExecuteOntapGet(ExecuteOntapGetRequest) + returns (ExecuteOntapGetResponse) { + option (google.api.http) = { + get: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }; + } + + // `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the + // `StoragePool` cluster. + rpc ExecuteOntapDelete(ExecuteOntapDeleteRequest) + returns (ExecuteOntapDeleteResponse) { + option (google.api.http) = { + delete: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }; + } + + // `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the + // `StoragePool` cluster. + rpc ExecuteOntapPatch(ExecuteOntapPatchRequest) + returns (ExecuteOntapPatchResponse) { + option (google.api.http) = { + patch: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + body: "*" + }; + } +} + +// 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 been canceled successfully + // have [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]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto new file mode 100644 index 00000000000..789ad87e8be --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto @@ -0,0 +1,158 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// The service level of a storage pool and its volumes. +enum ServiceLevel { + // Unspecified service level. + SERVICE_LEVEL_UNSPECIFIED = 0; + + // Premium service level. + PREMIUM = 1; + + // Extreme service level. + EXTREME = 2; + + // Standard service level. + STANDARD = 3; + + // Flex service level. + FLEX = 4; +} + +// Flex Storage Pool performance. +enum FlexPerformance { + // Unspecified flex performance. + FLEX_PERFORMANCE_UNSPECIFIED = 0; + + // Flex Storage Pool with default performance. + FLEX_PERFORMANCE_DEFAULT = 1; + + // Flex Storage Pool with custom performance. + FLEX_PERFORMANCE_CUSTOM = 2; +} + +// The volume encryption key source. +enum EncryptionType { + // The source of the encryption key is not specified. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // Google managed encryption key. + SERVICE_MANAGED = 1; + + // Customer managed encryption key, which is stored in KMS. + CLOUD_KMS = 2; +} + +// Type of directory service +enum DirectoryServiceType { + // Directory service type is not specified. + DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0; + + // Active directory policy attached to the storage pool. + ACTIVE_DIRECTORY = 1; +} + +// Type of storage pool +enum StoragePoolType { + // Storage pool type is not specified. + STORAGE_POOL_TYPE_UNSPECIFIED = 0; + + // Storage pool type is file. + FILE = 1; + + // Storage pool type is unified. + UNIFIED = 2; +} + +// Schedule for Hybrid Replication. +// New enum values may be added in future to support different frequency of +// replication. +enum HybridReplicationSchedule { + // Unspecified HybridReplicationSchedule + HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED = 0; + + // Replication happens once every 10 minutes. + EVERY_10_MINUTES = 1; + + // Replication happens once every hour. + HOURLY = 2; + + // Replication happens once every day. + DAILY = 3; +} + +// QoS (Quality of Service) Types of the storage pool +enum QosType { + // Unspecified QoS Type + QOS_TYPE_UNSPECIFIED = 0; + + // QoS Type is Auto + AUTO = 1; + + // QoS Type is Manual + MANUAL = 2; +} + +// OS types for the host group +enum OsType { + // Unspecified OS Type + OS_TYPE_UNSPECIFIED = 0; + + // OS Type is Linux + LINUX = 1; + + // OS Type is Windows + WINDOWS = 2; + + // OS Type is VMware ESXi + ESXI = 3; +} + +// Metadata for a given +// [google.cloud.location.Location][google.cloud.location.Location]. +message LocationMetadata { + // Output only. Supported service levels in a location. + repeated ServiceLevel supported_service_levels = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Supported flex performance in a location. + repeated FlexPerformance supported_flex_performance = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates if the location has VCP support. + bool has_vcp = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates if the location has ONTAP Proxy support. + bool has_ontap_proxy = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// UserCommands contains the commands to be executed by the customer. +message UserCommands { + // Output only. List of commands to be executed by the customer. + repeated string commands = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto new file mode 100644 index 00000000000..1404cc68152 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto @@ -0,0 +1,197 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "HostGroupProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListHostGroupsRequest for listing host groups. +message ListHostGroupsRequest { + // Required. Parent value for ListHostGroupsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/HostGroup" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, the 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. Filter to apply to the request. + 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]; +} + +// ListHostGroupsResponse is the response to a ListHostGroupsRequest. +message ListHostGroupsResponse { + // The list of host groups. + repeated HostGroup host_groups = 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; +} + +// GetHostGroupRequest for getting a host group. +message GetHostGroupRequest { + // Required. The resource name of the host group. + // Format: + // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/HostGroup" + } + ]; +} + +// CreateHostGroupRequest for creating a host group. +message CreateHostGroupRequest { + // Required. Parent value for CreateHostGroupRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/HostGroup" + } + ]; + + // Required. Fields of the host group to create. + HostGroup host_group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the host group to create. Must be unique within the parent + // resource. Must contain only letters, numbers, and hyphen, with + // the first character a letter or underscore, the last a letter or underscore + // or a number, and a 63 character maximum. + string host_group_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateHostGroupRequest for updating a host group. +message UpdateHostGroupRequest { + // Required. The host group to update. + // The host group's `name` field is used to identify the host group. + // Format: + // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + HostGroup host_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DeleteHostGroupRequest for deleting a single host group. +message DeleteHostGroupRequest { + // Required. The resource name of the host group. + // Format: + // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/HostGroup" + } + ]; +} + +// Host group is a collection of hosts that can be used for accessing a Block +// Volume. +message HostGroup { + option (google.api.resource) = { + type: "netapp.googleapis.com/HostGroup" + pattern: "projects/{project}/locations/{location}/hostGroups/{host_group}" + plural: "hostGroups" + singular: "hostGroup" + }; + + // Types of host group. + enum Type { + // Unspecified type for host group. + TYPE_UNSPECIFIED = 0; + + // iSCSI initiator host group. + ISCSI_INITIATOR = 1; + } + + // Host group states. + enum State { + // Unspecified state for host group. + STATE_UNSPECIFIED = 0; + + // Host group is creating. + CREATING = 1; + + // Host group is ready. + READY = 2; + + // Host group is updating. + UPDATING = 3; + + // Host group is deleting. + DELETING = 4; + + // Host group is disabled. + DISABLED = 5; + } + + // Identifier. The resource name of the host group. + // Format: + // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Type of the host group. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the host group. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the host group. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The list of hosts associated with the host group. + repeated string hosts = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. The OS type of the host group. It indicates the type of operating + // system used by all of the hosts in the HostGroup. All hosts in a HostGroup + // must be of the same OS type. This can be set only when creating a + // HostGroup. + OsType os_type = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of the host group. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels of the host group. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto new file mode 100644 index 00000000000..05572278de4 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto @@ -0,0 +1,246 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "KmsProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; +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}" +}; + +// GetKmsConfigRequest gets a KMS Config. +message GetKmsConfigRequest { + // Required. Name of the KmsConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// ListKmsConfigsRequest lists KMS Configs. +message ListKmsConfigsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListKmsConfigsResponse is the response to a ListKmsConfigsRequest. +message ListKmsConfigsResponse { + // The list of KmsConfigs + repeated KmsConfig kms_configs = 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; +} + +// CreateKmsConfigRequest creates a KMS Config. +message CreateKmsConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Required. Id of the requesting KmsConfig. Must be unique within the parent + // resource. Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string kms_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new KmsConfig. + KmsConfig kms_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateKmsConfigRequest updates a KMS Config. +message UpdateKmsConfigRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // KmsConfig 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The KmsConfig being updated + KmsConfig kms_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteKmsConfigRequest deletes a KMS Config. +message DeleteKmsConfigRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// EncryptVolumesRequest specifies the KMS config to encrypt existing volumes. +message EncryptVolumesRequest { + // Required. Name of the KmsConfig. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigRequest specifies the KMS config to be validated. +message VerifyKmsConfigRequest { + // Required. Name of the KMS Config to be verified. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; +} + +// VerifyKmsConfigResponse contains the information if the config is correctly +// and error message. +message VerifyKmsConfigResponse { + // Output only. If the customer key configured correctly to the encrypt + // volume. + bool healthy = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error message if config is not healthy. + string health_error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Instructions for the customers to provide the access to the + // encryption key. + string instructions = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// KmsConfig is the customer-managed encryption key(CMEK) configuration. +message KmsConfig { + option (google.api.resource) = { + type: "netapp.googleapis.com/KmsConfig" + pattern: "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" + plural: "kmsConfigs" + singular: "kmsConfig" + }; + + // The KmsConfig States + enum State { + // Unspecified KmsConfig State + STATE_UNSPECIFIED = 0; + + // KmsConfig State is Ready + READY = 1; + + // KmsConfig State is Creating + CREATING = 2; + + // KmsConfig State is Deleting + DELETING = 3; + + // KmsConfig State is Updating + UPDATING = 4; + + // KmsConfig State is In Use. + IN_USE = 5; + + // KmsConfig State is Error + ERROR = 6; + + // KmsConfig State is Pending to verify crypto key access. + KEY_CHECK_PENDING = 7; + + // KmsConfig State is Not accessbile by the SDE service account to the + // crypto key. + KEY_NOT_REACHABLE = 8; + + // KmsConfig State is Disabling. + DISABLING = 9; + + // KmsConfig State is Disabled. + DISABLED = 10; + + // KmsConfig State is Migrating. + // The existing volumes are migrating from SMEK to CMEK. + MIGRATING = 11; + } + + // Identifier. Name of the KmsConfig. + // Format: `projects/{project}/locations/{location}/kmsConfigs/{kms_config}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Customer-managed crypto key resource full name. Format: + // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the KmsConfig. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the KmsConfig. + string state_details = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the KmsConfig. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the KmsConfig. + string description = 6; + + // Labels as key value pairs + map labels = 7; + + // Output only. Instructions to provide the access to the customer provided + // encryption key. + string instructions = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Service account which will have access to the customer + // provided encryption key. + string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto new file mode 100644 index 00000000000..24470361718 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto @@ -0,0 +1,118 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "OntapProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// Request message for `ExecuteOntapPost` API. +message ExecuteOntapPostRequest { + // Required. The raw `JSON` body of the request. + // The body should be in the format of the ONTAP resource. + // For example: + // ``` + // { + // "body": { + // "field1": "value1", + // "field2": "value2", + // } + // } + // ``` + google.protobuf.Struct body = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource path of the ONTAP resource. + // Format: + // `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + // For example: + // `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + string ontap_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `ExecuteOntapPost` API. +message ExecuteOntapPostResponse { + // The raw `JSON` body of the response. + google.protobuf.Struct body = 1; +} + +// Request message for `ExecuteOntapGet` API. +message ExecuteOntapGetRequest { + // Required. The resource path of the ONTAP resource. + // Format: + // `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + // For example: + // `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + string ontap_path = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `ExecuteOntapGet` API. +message ExecuteOntapGetResponse { + // The raw `JSON` body of the response. + google.protobuf.Struct body = 1; +} + +// Request message for `ExecuteOntapDelete` API. +message ExecuteOntapDeleteRequest { + // Required. The resource path of the ONTAP resource. + // Format: + // `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + // For example: + // `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + string ontap_path = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `ExecuteOntapDelete` API. +message ExecuteOntapDeleteResponse { + // The raw `JSON` body of the response. + google.protobuf.Struct body = 1; +} + +// Request message for `ExecuteOntapPatch` API. +message ExecuteOntapPatchRequest { + // Required. The raw `JSON` body of the request. + // The body should be in the format of the ONTAP resource. + // For example: + // ``` + // { + // "body": { + // "field1": "value1", + // "field2": "value2", + // } + // } + // ``` + google.protobuf.Struct body = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource path of the ONTAP resource. + // Format: + // `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + // For example: + // `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + string ontap_path = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for `ExecuteOntapPatch` API. +message ExecuteOntapPatchResponse { + // The raw `JSON` body of the response. + google.protobuf.Struct body = 1; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto new file mode 100644 index 00000000000..6bdaef7a7c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto @@ -0,0 +1,203 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "QuotaRuleProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListQuotaRulesRequest for listing quota rules. +message ListQuotaRulesRequest { + // Required. Parent value for ListQuotaRulesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/QuotaRule" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, the 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]; +} + +// ListQuotaRulesResponse is the response to a ListQuotaRulesRequest. +message ListQuotaRulesResponse { + // List of quota rules + repeated QuotaRule quota_rules = 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; +} + +// GetQuotaRuleRequest for getting a quota rule. +message GetQuotaRuleRequest { + // Required. Name of the quota rule + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/QuotaRule" + } + ]; +} + +// CreateQuotaRuleRequest for creating a quota rule. +message CreateQuotaRuleRequest { + // Required. Parent value for CreateQuotaRuleRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/QuotaRule" + } + ]; + + // Required. Fields of the to be created quota rule. + QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the quota rule to create. Must be unique within the parent + // resource. Must contain only letters, numbers, underscore and hyphen, with + // the first character a letter or underscore, the last a letter or underscore + // or a number, and a 63 character maximum. + string quota_rule_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateQuotaRuleRequest for updating a quota rule. +message UpdateQuotaRuleRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Quota Rule 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 = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The quota rule being updated + QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteQuotaRuleRequest for deleting a single quota rule. +message DeleteQuotaRuleRequest { + // Required. Name of the quota rule. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/QuotaRule" + } + ]; +} + +// QuotaRule specifies the maximum disk space a user or group can use within a +// volume. They can be used for creating default and individual quota rules. +message QuotaRule { + option (google.api.resource) = { + type: "netapp.googleapis.com/QuotaRule" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}" + plural: "quotaRules" + singular: "quotaRule" + }; + + // Types of Quota Rule + enum Type { + // Unspecified type for quota rule + TYPE_UNSPECIFIED = 0; + + // Individual user quota rule + INDIVIDUAL_USER_QUOTA = 1; + + // Individual group quota rule + INDIVIDUAL_GROUP_QUOTA = 2; + + // Default user quota rule + DEFAULT_USER_QUOTA = 3; + + // Default group quota rule + DEFAULT_GROUP_QUOTA = 4; + } + + // Quota Rule states + enum State { + // Unspecified state for quota rule + STATE_UNSPECIFIED = 0; + + // Quota rule is creating + CREATING = 1; + + // Quota rule is updating + UPDATING = 2; + + // Quota rule is deleting + DELETING = 3; + + // Quota rule is ready + READY = 4; + + // Quota rule is in error state. + ERROR = 5; + } + + // Identifier. The resource name of the quota rule. + // Format: + // `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The quota rule applies to the specified user or group, identified + // by a Unix UID/GID, Windows SID, or null for default. + string target = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type of quota rule. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum allowed disk space in MiB. + int32 disk_limit_mib = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the quota rule + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the quota rule + string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the quota rule + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the quota rule + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels of the quota rule + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto new file mode 100644 index 00000000000..ca5995e4a51 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto @@ -0,0 +1,509 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/cloud/netapp/v1/volume.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "ReplicationProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// TransferStats reports all statistics related to replication transfer. +message TransferStats { + // Cumulative bytes transferred so far for the replication relationship. + optional int64 transfer_bytes = 1; + + // Cumulative time taken across all transfers for the replication + // relationship. + optional google.protobuf.Duration total_transfer_duration = 2; + + // Last transfer size in bytes. + optional int64 last_transfer_bytes = 3; + + // Time taken during last transfer. + optional google.protobuf.Duration last_transfer_duration = 4; + + // Lag duration indicates the duration by which Destination region volume + // content lags behind the primary region volume content. + optional google.protobuf.Duration lag_duration = 5; + + // Time when progress was updated last. + optional google.protobuf.Timestamp update_time = 6; + + // Time when last transfer completed. + optional google.protobuf.Timestamp last_transfer_end_time = 7; + + // A message describing the cause of the last transfer failure. + optional string last_transfer_error = 8; +} + +// Replication is a nested resource under Volume, that describes a +// cross-region replication relationship between 2 volumes in different +// regions. +message Replication { + option (google.api.resource) = { + type: "netapp.googleapis.com/Replication" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" + plural: "replications" + singular: "replication" + }; + + // The replication states + // New enum values may be added in future to indicate possible new states. + enum State { + // Unspecified replication State + STATE_UNSPECIFIED = 0; + + // Replication is creating. + CREATING = 1; + + // Replication is ready. + READY = 2; + + // Replication is updating. + UPDATING = 3; + + // Replication is deleting. + DELETING = 5; + + // Replication is in error state. + ERROR = 6; + + // Replication is waiting for cluster peering to be established. + PENDING_CLUSTER_PEERING = 8; + + // Replication is waiting for SVM peering to be established. + PENDING_SVM_PEERING = 9; + + // Replication is waiting for Commands to be executed on Onprem ONTAP. + PENDING_REMOTE_RESYNC = 10; + + // Onprem ONTAP is destination and Replication can only be managed from + // Onprem. + EXTERNALLY_MANAGED_REPLICATION = 11; + } + + // New enum values may be added in future to support different replication + // topology. + enum ReplicationRole { + // Unspecified replication role + REPLICATION_ROLE_UNSPECIFIED = 0; + + // Indicates Source volume. + SOURCE = 1; + + // Indicates Destination volume. + DESTINATION = 2; + } + + // Schedule for Replication. + // New enum values may be added in future to support different frequency of + // replication. + enum ReplicationSchedule { + // Unspecified ReplicationSchedule + REPLICATION_SCHEDULE_UNSPECIFIED = 0; + + // Replication happens once every 10 minutes. + EVERY_10_MINUTES = 1; + + // Replication happens once every hour. + HOURLY = 2; + + // Replication happens once every day. + DAILY = 3; + } + + // Mirroring states. + // No new value is expected to be added in future. + enum MirrorState { + // Unspecified MirrorState + MIRROR_STATE_UNSPECIFIED = 0; + + // Destination volume is being prepared. + PREPARING = 1; + + // Destination volume has been initialized and is ready to receive + // replication transfers. + MIRRORED = 2; + + // Destination volume is not receiving replication transfers. + STOPPED = 3; + + // Incremental replication is in progress. + TRANSFERRING = 4; + + // Baseline replication is in progress. + BASELINE_TRANSFERRING = 5; + + // Replication is aborted. + ABORTED = 6; + + // Replication is being managed from Onprem ONTAP. + EXTERNALLY_MANAGED = 7; + + // Peering is yet to be established. + PENDING_PEERING = 8; + } + + // Hybrid replication type. + enum HybridReplicationType { + // Unspecified hybrid replication type. + HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + + // Hybrid replication type for migration. + MIGRATION = 1; + + // Hybrid replication type for continuous replication. + CONTINUOUS_REPLICATION = 2; + + // New field for reversible OnPrem replication, to be used for data + // protection. + ONPREM_REPLICATION = 3; + + // Hybrid replication type for incremental Transfer in the reverse direction + // (GCNV is source and Onprem is destination) + REVERSE_ONPREM_REPLICATION = 4; + } + + // Identifier. The resource name of the Replication. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. State of the replication. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the replication. + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether this points to source or destination. + ReplicationRole role = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Indicates the schedule for replication. + ReplicationSchedule replication_schedule = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Indicates the state of mirroring. + MirrorState mirror_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Condition of the relationship. Can be one of the following: + // - true: The replication relationship is healthy. It has not missed the most + // recent scheduled transfer. + // - false: The replication relationship is not healthy. It has missed the + // most recent scheduled transfer. + optional bool healthy = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Replication create time. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Full name of destination volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string destination_volume = 10 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Replication transfer statistics. + TransferStats transfer_stats = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 12; + + // A description about this replication relationship. + optional string description = 13; + + // Required. Input only. Destination volume parameters + DestinationVolumeParameters destination_volume_parameters = 14 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Full name of source volume resource. + // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + string source_volume = 15 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Hybrid peering details. + HybridPeeringDetails hybrid_peering_details = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Location of the user cluster. + string cluster_location = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Type of the hybrid replication. + HybridReplicationType hybrid_replication_type = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Copy pastable snapmirror commands to be executed on onprem + // cluster by the customer. + UserCommands hybrid_replication_user_commands = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// HybridPeeringDetails contains details about the hybrid peering. +message HybridPeeringDetails { + // Output only. IP address of the subnet. + string subnet_ip = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Copy-paste-able commands to be used on user's ONTAP to accept + // peering requests. + string command = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Expiration time for the peering command to be executed on + // user's ONTAP. + google.protobuf.Timestamp command_expiry_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Temporary passphrase generated to accept cluster peering + // command. + string passphrase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the user's local source volume to be peered with the + // destination volume. + string peer_volume_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the user's local source cluster to be peered with the + // destination cluster. + string peer_cluster_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the user's local source vserver svm to be peered with + // the destination vserver svm. + string peer_svm_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListReplications lists replications. +message ListReplicationsRequest { + // Required. The volume for which to retrieve replication information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListReplicationsResponse is the result of ListReplicationsRequest. +message ListReplicationsResponse { + // A list of replications in the project for the specified volume. + repeated Replication replications = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetReplicationRequest gets the state of a replication. +message GetReplicationRequest { + // Required. The replication resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// DestinationVolumeParameters specify input parameters used for creating +// destination volume. +message DestinationVolumeParameters { + // Required. Existing destination StoragePool name. + string storage_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Desired destination volume resource id. If not specified, source volume's + // resource id will be used. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string volume_id = 2; + + // Destination volume's share name. If not specified, source volume's share + // name will be used. + string share_name = 3; + + // Description for the destination volume. + optional string description = 4; + + // Optional. Tiering policy for the volume. + optional TieringPolicy tiering_policy = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// CreateReplicationRequest creates a replication. +message CreateReplicationRequest { + // Required. The NetApp volume to create the replications of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Replication" + } + ]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the replication to create. Must be unique within the parent + // resource. Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string replication_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteReplicationRequest deletes a replication. +message DeleteReplicationRequest { + // Required. The replication resource name, in the format + // `projects/*/locations/*/volumes/*/replications/{replication_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// UpdateReplicationRequest updates description and/or labels for a replication. +message UpdateReplicationRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A replication resource + Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// StopReplicationRequest stops a replication until resumed. +message StopReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; + + // Indicates whether to stop replication forcefully while data transfer is in + // progress. + // Warning! if force is true, this will abort any current transfers + // and can lead to data loss due to partial transfer. + // If force is false, stop replication will fail while data transfer is in + // progress and you will need to retry later. + bool force = 2; +} + +// ResumeReplicationRequest resumes a stopped replication. +message ResumeReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// ReverseReplicationDirectionRequest reverses direction of replication. Source +// becomes destination and destination becomes source. +message ReverseReplicationDirectionRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} + +// EstablishPeeringRequest establishes cluster and svm peerings between the +// source and the destination replications. +message EstablishPeeringRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; + + // Required. Name of the user's local source cluster to be peered with the + // destination cluster. + string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the user's local source vserver svm to be peered with the + // destination vserver svm. + string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of IPv4 ip addresses to be used for peering. + repeated string peer_ip_addresses = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name of the user's local source volume to be peered with the + // destination volume. + string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// SyncReplicationRequest syncs the replication from source to destination. +message SyncReplicationRequest { + // Required. The resource name of the replication, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto new file mode 100644 index 00000000000..c84d780e987 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto @@ -0,0 +1,180 @@ +// 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.netapp.v1; + +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.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "SnapshotProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// ListSnapshotsRequest lists snapshots. +message ListSnapshotsRequest { + // Required. The volume for which to retrieve snapshot information, + // in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListSnapshotsResponse is the result of ListSnapshotsRequest. +message ListSnapshotsResponse { + // A list of snapshots in the project for the specified volume. + repeated Snapshot snapshots = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetSnapshotRequest gets the state of a snapshot. +message GetSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// CreateSnapshotRequest creates a snapshot. +message CreateSnapshotRequest { + // Required. The NetApp volume to create the snapshots of, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Snapshot" + } + ]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the snapshot to create. Must be unique within the parent + // resource. Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a + // number, and a 63 character maximum. + string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteSnapshotRequest deletes a snapshot. +message DeleteSnapshotRequest { + // Required. The snapshot resource name, in the format + // `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; +} + +// UpdateSnapshotRequest updates description and/or labels for a snapshot. +message UpdateSnapshotRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A snapshot resource + Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Snapshot is a point-in-time version of a Volume's content. +message Snapshot { + option (google.api.resource) = { + type: "netapp.googleapis.com/Snapshot" + pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" + plural: "snapshots" + singular: "snapshot" + }; + + // The Snapshot States + enum State { + // Unspecified Snapshot State + STATE_UNSPECIFIED = 0; + + // Snapshot State is Ready + READY = 1; + + // Snapshot State is Creating + CREATING = 2; + + // Snapshot State is Deleting + DELETING = 3; + + // Snapshot State is Updating + UPDATING = 4; + + // Snapshot State is Disabled + DISABLED = 5; + + // Snapshot State is Error + ERROR = 6; + } + + // Identifier. The resource name of the snapshot. + // Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The snapshot state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of the snapshot with 2048 characters or less. + // Requests with longer descriptions will be rejected. + string description = 4; + + // Output only. Current storage usage for the snapshot in bytes. + double used_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the snapshot was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 7; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto new file mode 100644 index 00000000000..7bbca2f7588 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto @@ -0,0 +1,341 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "StoragePoolProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// `Mode` of the storage pool or volume. This field is used to control whether +// the resource is managed by the GCNV APIs or the GCNV ONTAP Mode APIs. +enum Mode { + // The `Mode` is not specified. + MODE_UNSPECIFIED = 0; + + // The resource is managed by the GCNV APIs. + DEFAULT = 1; + + // The resource is managed by the GCNV ONTAP Mode APIs. + ONTAP = 2; +} + +// GetStoragePoolRequest gets a Storage Pool. +message GetStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// ListStoragePoolsRequest lists Storage Pools. +message ListStoragePoolsRequest { + // Required. Parent value + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Optional. The maximum number of items to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sort results. Supported values are "name", "name desc" or "" + // (unsorted). + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List filter. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListStoragePoolsResponse is the response to a ListStoragePoolsRequest. +message ListStoragePoolsResponse { + // The list of StoragePools + repeated StoragePool storage_pools = 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; +} + +// CreateStoragePoolRequest creates a Storage Pool. +message CreateStoragePoolRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Required. Id of the requesting storage pool. Must be unique within the + // parent resource. Must contain only letters, numbers and hyphen, with the + // first character a letter, the last a letter or a number, and a 63 character + // maximum. + string storage_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The required parameters to create a new storage pool. + StoragePool storage_pool = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateStoragePoolRequest updates a Storage Pool. +message UpdateStoragePoolRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // StoragePool 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The pool being updated + StoragePool storage_pool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteStoragePoolRequest deletes a Storage Pool. +message DeleteStoragePoolRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// SwitchActiveReplicaZoneRequest switch the active/replica zone for a regional +// storagePool. +message SwitchActiveReplicaZoneRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; +} + +// StoragePool is a container for volumes with a service level and capacity. +// Volumes can be created in a pool of sufficient available capacity. +// StoragePool capacity is what you are billed for. +message StoragePool { + option (google.api.resource) = { + type: "netapp.googleapis.com/StoragePool" + pattern: "projects/{project}/locations/{location}/storagePools/{storage_pool}" + plural: "storagePools" + singular: "storagePool" + }; + + // The Storage Pool States + enum State { + // Unspecified Storage Pool State + STATE_UNSPECIFIED = 0; + + // Storage Pool State is Ready + READY = 1; + + // Storage Pool State is Creating + CREATING = 2; + + // Storage Pool State is Deleting + DELETING = 3; + + // Storage Pool State is Updating + UPDATING = 4; + + // Storage Pool State is Restoring + RESTORING = 5; + + // Storage Pool State is Disabled + DISABLED = 6; + + // Storage Pool State is Error + ERROR = 7; + } + + // Identifier. Name of the storage pool + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Service level of the storage pool + ServiceLevel service_level = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Capacity in GIB of the pool + int64 capacity_gib = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Allocated size of all volumes in GIB in the storage pool + int64 volume_capacity_gib = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Volume count of the storage pool + int32 volume_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the storage pool + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the storage pool + string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the storage pool + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the storage pool + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels as key value pairs + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Required. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 11 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Specifies the Active Directory to be used for creating a SMB + // volume. + string active_directory = 12 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Optional. Specifies the KMS config to be used for volume encryption. + string kms_config = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Optional. Flag indicating if the pool is NFS LDAP enabled or not. + bool ldap_enabled = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field is not implemented. The values provided in this field + // are ignored. + string psa_range = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Specifies the current pool encryption key source. + EncryptionType encryption_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Deprecated. Used to allow SO pool to access AD or DNS server from other + // regions. + optional bool global_access_allowed = 17 [deprecated = true]; + + // Optional. True if the storage pool supports Auto Tiering enabled volumes. + // Default is false. Auto-tiering can be enabled after storage pool creation + // but it can't be disabled once enabled. + bool allow_auto_tiering = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the replica zone for regional storagePool. + string replica_zone = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the active zone for regional storagePool. + string zone = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reserved for future use + bool satisfies_pzs = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use + bool satisfies_pzi = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. True if using Independent Scaling of capacity and performance + // (Hyperdisk) By default set to false + bool custom_performance_enabled = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Performance Total Throughput of the pool (in MiBps) + int64 total_throughput_mibps = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Performance Total IOPS of the pool + // if not provided, it will be calculated based on the total_throughput_mibps + int64 total_iops = 27 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total hot tier capacity for the Storage Pool. It is applicable + // only to Flex service level. It should be less than the minimum storage pool + // size and cannot be more than the current storage pool size. It cannot be + // decreased once set. + int64 hot_tier_size_gib = 28 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating that the hot-tier threshold will be + // auto-increased by 10% of the hot-tier when it hits 100%. Default is true. + // The increment will kick in only if the new size after increment is + // still less than or equal to storage pool size. + optional bool enable_hot_tier_auto_resize = 29 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. QoS (Quality of Service) Type of the storage pool + QosType qos_type = 30 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Available throughput of the storage pool (in MiB/s). + double available_throughput_mibps = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total cold tier data rounded down to the nearest GiB used by + // the storage pool. + int64 cold_tier_size_used_gib = 33 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total hot tier data rounded down to the nearest GiB used by + // the storage pool. + int64 hot_tier_size_used_gib = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Type of the storage pool. This field is used to control whether + // the pool supports `FILE` based volumes only or `UNIFIED` (both `FILE` and + // `BLOCK`) volumes. If not specified during creation, it defaults to `FILE`. + optional StoragePoolType type = 35 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mode of the storage pool. This field is used to control whether + // the user can perform the ONTAP operations on the storage pool using the + // GCNV ONTAP Mode APIs. If not specified during creation, it defaults to + // `DEFAULT`. + optional Mode mode = 36 [(google.api.field_behavior) = OPTIONAL]; +} + +// ValidateDirectoryServiceRequest validates the directory service policy +// attached to the storage pool. +message ValidateDirectoryServiceRequest { + // Required. Name of the storage pool + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Type of directory service policy attached to the storage pool. + DirectoryServiceType directory_service_type = 2; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto new file mode 100644 index 00000000000..d5526eaefd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto @@ -0,0 +1,1022 @@ +// 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.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/netapp/v1/common.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "VolumeProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// Protocols is an enum of all the supported network protocols for a volume. +enum Protocols { + // Unspecified protocol + PROTOCOLS_UNSPECIFIED = 0; + + // NFS V3 protocol + NFSV3 = 1; + + // NFS V4 protocol + NFSV4 = 2; + + // SMB protocol + SMB = 3; + + // ISCSI protocol + ISCSI = 4; +} + +// AccessType is an enum of all the supported access types for a volume. +enum AccessType { + // Unspecified Access Type + ACCESS_TYPE_UNSPECIFIED = 0; + + // Read Only + READ_ONLY = 1; + + // Read Write + READ_WRITE = 2; + + // None + READ_NONE = 3; +} + +// SMBSettings +// Modifies the behaviour of a SMB volume. +enum SMBSettings { + // Unspecified default option + SMB_SETTINGS_UNSPECIFIED = 0; + + // SMB setting encrypt data + ENCRYPT_DATA = 1; + + // SMB setting browsable + BROWSABLE = 2; + + // SMB setting notify change + CHANGE_NOTIFY = 3; + + // SMB setting not to notify change + NON_BROWSABLE = 4; + + // SMB setting oplocks + OPLOCKS = 5; + + // SMB setting to show snapshots + SHOW_SNAPSHOT = 6; + + // SMB setting to show previous versions + SHOW_PREVIOUS_VERSIONS = 7; + + // SMB setting to access volume based on enumerartion + ACCESS_BASED_ENUMERATION = 8; + + // Continuously available enumeration + CONTINUOUSLY_AVAILABLE = 9; +} + +// The security style of the volume, can be either UNIX or NTFS. +enum SecurityStyle { + // SecurityStyle is unspecified + SECURITY_STYLE_UNSPECIFIED = 0; + + // SecurityStyle uses NTFS + NTFS = 1; + + // SecurityStyle uses UNIX + UNIX = 2; +} + +// Actions to be restricted for a volume. +enum RestrictedAction { + // Unspecified restricted action + RESTRICTED_ACTION_UNSPECIFIED = 0; + + // Prevent volume from being deleted when mounted. + DELETE = 1; +} + +// Message for requesting list of Volumes +message ListVolumesRequest { + // Required. Parent value for ListVolumesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Volumes +message ListVolumesResponse { + // The list of Volume + repeated Volume volumes = 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; +} + +// Message for getting a Volume +message GetVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; +} + +// Message for creating a Volume +message CreateVolumeRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Volume" + } + ]; + + // Required. Id of the requesting volume. Must be unique within the parent + // resource. Must contain only letters, numbers and hyphen, with the first + // character a letter, the last a letter or a number, + // and a 63 character maximum. + string volume_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being created. + Volume volume = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for updating a Volume +message UpdateVolumeRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Volume 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 = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The volume being updated + Volume volume = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Message for deleting a Volume +message DeleteVolumeRequest { + // Required. Name of the volume + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // If this field is set as true, CCFE will not block the volume resource + // deletion even if it has any snapshots resource. (Otherwise, the request + // will only work if the volume has no snapshots.) + bool force = 2; +} + +// RevertVolumeRequest reverts the given volume to the specified snapshot. +message RevertVolumeRequest { + // Required. The resource name of the volume, in the format of + // projects/{project_id}/locations/{location}/volumes/{volume_id}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Required. The snapshot resource ID, in the format 'my-snapshot', where the + // specified ID is the {snapshot_id} of the fully qualified name like + // projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + string snapshot_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Volume provides a filesystem that you can mount. +message Volume { + option (google.api.resource) = { + type: "netapp.googleapis.com/Volume" + pattern: "projects/{project}/locations/{location}/volumes/{volume}" + plural: "volumes" + singular: "volume" + }; + + // Details about a clone volume. + message CloneDetails { + // Output only. Specifies the full resource name of the source snapshot from + // which this volume was cloned. Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + string source_snapshot = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Snapshot" + } + ]; + + // Output only. Full name of the source volume resource. + // Format: + // projects/{project}/locations/{location}/volumes/{volume} + string source_volume = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Shared space in GiB. Determined at volume creation time + // based on size of source snapshot. + int64 shared_space_gib = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The volume states + enum State { + // Unspecified Volume State + STATE_UNSPECIFIED = 0; + + // Volume State is Ready + READY = 1; + + // Volume State is Creating + CREATING = 2; + + // Volume State is Deleting + DELETING = 3; + + // Volume State is Updating + UPDATING = 4; + + // Volume State is Restoring + RESTORING = 5; + + // Volume State is Disabled + DISABLED = 6; + + // Volume State is Error + ERROR = 7; + + // Volume State is Preparing. Note that this is different from CREATING + // where CREATING means the volume is being created, while PREPARING means + // the volume is created and now being prepared for the replication. + PREPARING = 8; + + // Volume State is Read Only + READ_ONLY = 9; + } + + // Identifier. Name of the volume + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. State of the volume + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State details of the volume + string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the volume + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Share name of the volume + string share_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. This field is not implemented. The values provided in this + // field are ignored. + string psa_range = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. StoragePool name of the volume + string storage_pool = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/StoragePool" + } + ]; + + // Output only. VPC Network name. + // Format: projects/{project}/global/networks/{network} + string network = 8 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. Service level of the volume + ServiceLevel service_level = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Capacity in GIB of the volume + int64 capacity_gib = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Export policy of the volume + ExportPolicy export_policy = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Protocols required for the volume + repeated Protocols protocols = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SMB share settings for the volume. + repeated SMBSettings smb_settings = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Mount options of this volume + repeated MountOption mount_options = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Default unix style permission (e.g. 777) the mount point will be + // created with. Applicable for NFS protocol types only. + string unix_permissions = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels as key value pairs + map labels = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the volume + string description = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SnapshotPolicy for a volume. + SnapshotPolicy snapshot_policy = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snap_reserve specifies percentage of volume storage reserved for + // snapshot storage. Default is 0 percent. + double snap_reserve = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Snapshot_directory if enabled (true) the volume will contain a + // read-only .snapshot directory which provides access to each of the volume's + // snapshots. + bool snapshot_directory = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Used capacity in GIB of the volume. This is computed + // periodically and it does not represent the realtime usage. + int64 used_gib = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Security Style of the Volume + SecurityStyle security_style = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating if the volume is a kerberos volume or not, export + // policy rules control kerberos security modes (krb5, krb5i, krb5p). + bool kerberos_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Flag indicating if the volume is NFS LDAP enabled or not. + bool ldap_enabled = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the ActiveDirectory name of a SMB volume. + string active_directory = 25 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/ActiveDirectory" + } + ]; + + // Optional. Specifies the source of the volume to be created from. + RestoreParameters restore_parameters = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Specifies the KMS config to be used for volume encryption. + string kms_config = 27 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/KmsConfig" + } + ]; + + // Output only. Specified the current volume encryption key source. + EncryptionType encryption_type = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the volume is part of a replication + // relationship. + bool has_replication = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // BackupConfig of the volume. + optional BackupConfig backup_config = 30; + + // Optional. List of actions that are restricted on this volume. + repeated RestrictedAction restricted_actions = 31 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating if the volume will be a large capacity volume or + // a regular volume. + bool large_capacity = 32 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating if the volume will have an IP address per node + // for volumes supporting multiple IP endpoints. Only the volume with + // large_capacity will be allowed to have multiple endpoints. + bool multiple_endpoints = 33 [(google.api.field_behavior) = OPTIONAL]; + + // Tiering policy for the volume. + optional TieringPolicy tiering_policy = 34; + + // Output only. Specifies the replica zone for regional volume. + string replica_zone = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the active zone for regional volume. + string zone = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Size of the volume cold tier data rounded down to the nearest + // GiB. + int64 cold_tier_size_gib = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The Hybrid Replication parameters for the volume. + HybridReplicationParameters hybrid_replication_parameters = 40 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Throughput of the volume (in MiB/s) + double throughput_mibps = 41 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cache parameters for the volume. + CacheParameters cache_parameters = 42 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Total hot tier data rounded down to the nearest GiB used by + // the Volume. This field is only used for flex Service Level + int64 hot_tier_size_used_gib = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Block devices for the volume. + // Currently, only one block device is permitted per Volume. + repeated BlockDevice block_devices = 45 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. If this volume is a clone, this field contains details about + // the clone. + CloneDetails clone_details = 47 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines the export policy for the volume. +message ExportPolicy { + // Required. List of export policy rules + repeated SimpleExportPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// An export policy rule describing various export options. +message SimpleExportPolicyRule { + // `SquashMode` defines how remote user privileges are restricted when + // accessing an NFS export. It controls how user identities (like root) are + // mapped to anonymous users to limit access and enforce security. + enum SquashMode { + // Defaults to `NO_ROOT_SQUASH`. + SQUASH_MODE_UNSPECIFIED = 0; + + // The root user (UID 0) retains full access. Other users are + // unaffected. + NO_ROOT_SQUASH = 1; + + // The root user (UID 0) is squashed to anonymous user ID. Other users are + // unaffected. + ROOT_SQUASH = 2; + + // All users are squashed to anonymous user ID. + ALL_SQUASH = 3; + } + + // Comma separated list of allowed clients IP addresses + optional string allowed_clients = 1; + + // Whether Unix root access will be granted. + optional string has_root_access = 2; + + // Access type (ReadWrite, ReadOnly, None) + optional AccessType access_type = 3; + + // NFS V3 protocol. + optional bool nfsv3 = 4; + + // NFS V4 protocol. + optional bool nfsv4 = 5; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'authentication' kerberos security mode. + optional bool kerberos_5_read_only = 6; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'authentication' kerberos security mode. The + // 'kerberos5ReadOnly' value be ignored if this is enabled. + optional bool kerberos_5_read_write = 7; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'integrity' kerberos security mode. + optional bool kerberos_5i_read_only = 8; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5i_read_write = 9; + + // If enabled (true) the rule defines a read only access for clients matching + // the 'allowedClients' specification. It enables nfs clients to mount using + // 'privacy' kerberos security mode. + optional bool kerberos_5p_read_only = 10; + + // If enabled (true) the rule defines read and write access for clients + // matching the 'allowedClients' specification. It enables nfs clients to + // mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + // value be ignored if this is enabled. + optional bool kerberos_5p_read_write = 11; + + // Optional. Defines how user identity squashing is applied for this export + // rule. This field is the preferred way to configure squashing behavior and + // takes precedence over `has_root_access` if both are provided. + optional SquashMode squash_mode = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An integer representing the anonymous user ID. Range is 0 to + // `4294967295`. Required when `squash_mode` is `ROOT_SQUASH` or `ALL_SQUASH`. + optional int64 anon_uid = 13 [(google.api.field_behavior) = OPTIONAL]; +} + +// Snapshot Policy for a volume. +message SnapshotPolicy { + // If enabled, make snapshots automatically according to the schedules. + // Default is false. + optional bool enabled = 1; + + // Hourly schedule policy. + optional HourlySchedule hourly_schedule = 2; + + // Daily schedule policy. + optional DailySchedule daily_schedule = 3; + + // Weekly schedule policy. + optional WeeklySchedule weekly_schedule = 4; + + // Monthly schedule policy. + optional MonthlySchedule monthly_schedule = 5; +} + +// Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. +message HourlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; +} + +// Make a snapshot every day e.g. at 04:00, 05:20, 23:50 +message DailySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; +} + +// Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday +// 23:50 +message WeeklySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the week to make a snapshot. Accepts a comma + // separated days of the week. Defaults to 'Sunday'. + optional string day = 4; +} + +// Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 +message MonthlySchedule { + // The maximum number of Snapshots to keep for the hourly schedule + optional double snapshots_to_keep = 1; + + // Set the minute of the hour to start the snapshot (0-59), defaults to the + // top of the hour (0). + optional double minute = 2; + + // Set the hour to start the snapshot (0-23), defaults to midnight (0). + optional double hour = 3; + + // Set the day or days of the month to make a snapshot (1-31). Accepts a + // comma separated number of days. Defaults to '1'. + optional string days_of_month = 4; +} + +// View only mount options for a volume. +message MountOption { + // Export string + string export = 1; + + // Full export string + string export_full = 2; + + // Protocol to mount with. + Protocols protocol = 3; + + // Instructions for mounting + string instructions = 4; + + // Output only. IP Address. + string ip_address = 5 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} + +// The RestoreParameters if volume is created from a snapshot or backup. +message RestoreParameters { + // The source that the volume is created from. + oneof source { + // Full name of the snapshot resource. + // Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + string source_snapshot = 1; + + // Full name of the backup resource. + // Format for standard backup: + // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + // Format for BackupDR backup: + // projects/{project}/locations/{location}/backupVaults/{backup_vault}/dataSources/{data_source}/backups/{backup} + string source_backup = 2 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; + } +} + +// BackupConfig contains backup related config on a volume. +message BackupConfig { + // Optional. When specified, schedule backups will be created based on the + // policy configuration. + repeated string backup_policies = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Optional. Name of backup vault. + // Format: + // projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + string backup_vault = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Optional. When set to true, scheduled backup is enabled on the volume. + // This field should be nil when there's no backup policy attached. + optional bool scheduled_backup_enabled = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Total size of all backups in a chain in bytes = baseline + // backup size + sum(incremental backup size). + optional int64 backup_chain_bytes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines tiering policy for the volume. +message TieringPolicy { + // Tier action for the volume. + enum TierAction { + // Unspecified. + TIER_ACTION_UNSPECIFIED = 0; + + // When tiering is enabled, new cold data will be tiered. + ENABLED = 1; + + // When paused, tiering won't be performed on new data. Existing data stays + // tiered until accessed. + PAUSED = 2; + } + + // Optional. Flag indicating if the volume has tiering policy enable/pause. + // Default is PAUSED. + optional TierAction tier_action = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time in days to mark the volume's data block as cold and make it + // eligible for tiering, can be range from 2-183. Default is 31. + optional int32 cooling_threshold_days = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating that the hot tier bypass mode is enabled. Default + // is false. This is only applicable to Flex service level. + optional bool hot_tier_bypass_mode_enabled = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The Hybrid Replication parameters for the volume. +message HybridReplicationParameters { + // Type of the volume's hybrid replication. + enum VolumeHybridReplicationType { + // Unspecified hybrid replication type. + VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + + // Hybrid replication type for migration. + MIGRATION = 1; + + // Hybrid replication type for continuous replication. + CONTINUOUS_REPLICATION = 2; + + // New field for reversible OnPrem replication, to be used for data + // protection. + ONPREM_REPLICATION = 3; + + // New field for reversible OnPrem replication, to be used for data + // protection. + REVERSE_ONPREM_REPLICATION = 4; + } + + // Required. Desired name for the replication of this volume. + string replication = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Replication" + } + ]; + + // Required. Name of the user's local source volume to be peered with the + // destination volume. + string peer_volume_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the user's local source cluster to be peered with the + // destination cluster. + string peer_cluster_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the user's local source vserver svm to be peered with the + // destination vserver svm. + string peer_svm_name = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of node ip addresses to be peered with. + repeated string peer_ip_addresses = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Name of source cluster location associated with the Hybrid + // replication. This is a free-form field for the display purpose only. + string cluster_location = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the replication. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to be added to the replication as the key value pairs. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Replication Schedule for the replication created. + HybridReplicationSchedule replication_schedule = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the hybrid replication. + VolumeHybridReplicationType hybrid_replication_type = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Constituent volume count for large volume. + int32 large_volume_constituent_count = 11 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Cache Parameters for the volume. +message CacheParameters { + // State of the cache volume indicating the peering status. + enum CacheState { + // Default unspecified state. + CACHE_STATE_UNSPECIFIED = 0; + + // State indicating waiting for cluster peering to be established. + PENDING_CLUSTER_PEERING = 1; + + // State indicating waiting for SVM peering to be established. + PENDING_SVM_PEERING = 2; + + // State indicating successful establishment of peering with origin + // volumes's ONTAP cluster. + PEERED = 3; + + // Terminal state wherein peering with origin volume's ONTAP cluster + // has failed. + ERROR = 4; + } + + // Required. Name of the origin volume for the cache volume. + string peer_volume_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the origin volume's ONTAP cluster. + string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the origin volume's SVM. + string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of IC LIF addresses of the origin volume's ONTAP cluster. + repeated string peer_ip_addresses = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates whether the cache volume has global file lock enabled. + optional bool enable_global_file_lock = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration of the cache volume. + CacheConfig cache_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the cache volume indicating the peering status. + CacheState cache_state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Copy-paste-able commands to be used on user's ONTAP to accept + // peering requests. + string command = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Expiration time for the peering command to be executed on user's + // ONTAP. + google.protobuf.Timestamp peering_command_expiry_time = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Temporary passphrase generated to accept cluster peering + // command. + string passphrase = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed description of the current cache state. + string state_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration of the cache volume. +message CacheConfig { + // State of the prepopulation job indicating how the prepopulation is + // progressing. + enum CachePrePopulateState { + // Default unspecified state. + CACHE_PRE_POPULATE_STATE_UNSPECIFIED = 0; + + // State representing when the most recent create or update request did not + // require a prepopulation job. + NOT_NEEDED = 1; + + // State representing when the most recent update request requested a + // prepopulation job but it has not yet completed. + IN_PROGRESS = 2; + + // State representing when the most recent update request requested a + // prepopulation job and it has completed successfully. + COMPLETE = 3; + + // State representing when the most recent update request requested a + // prepopulation job but the prepopulate job failed. + ERROR = 4; + } + + // Optional. Pre-populate cache volume with data from the origin volume. + CachePrePopulate cache_pre_populate = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating whether writeback is enabled for the FlexCache + // volume. + optional bool writeback_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating whether a CIFS change notification is enabled for + // the FlexCache volume. + optional bool cifs_change_notify_enabled = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the prepopulation job indicating how the + // prepopulation is progressing. + CachePrePopulateState cache_pre_populate_state = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Pre-populate cache volume with data from the origin volume. +message CachePrePopulate { + // Optional. List of directory-paths to be pre-populated for the FlexCache + // volume. + repeated string path_list = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of directory-paths to be excluded for pre-population for the + // FlexCache volume. + repeated string exclude_path_list = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Flag indicating whether the directories listed with the + // `path_list` need to be recursively pre-populated. + optional bool recursion = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Block device represents the device(s) which are stored in the block volume. +message BlockDevice { + // Optional. User-defined name for the block device, unique within the volume. + // In case no user input is provided, name will be auto-generated in the + // backend. The name must meet the following requirements: + // * Be between 1 and 255 characters long. + // * Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), + // and the following special characters: "-", "_", "}", "{", ".". + // * Spaces are not allowed. + optional string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of host groups that identify hosts that can mount the + // block volume. Format: + // `projects/{project_id}/locations/{location}/hostGroups/{host_group_id}` + // This field can be updated after the block device is created. + repeated string host_groups = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/HostGroup" + } + ]; + + // Output only. Device identifier of the block volume. This represents + // `lun_serial_number` for iSCSI volumes. + string identifier = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The size of the block device in GiB. + // Any value provided for the `size_gib` field during volume creation is + // ignored. The block device's size is system-managed and will be set to match + // the parent Volume's `capacity_gib`. + optional int64 size_gib = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The OS type of the volume. + // This field can't be changed after the block device is created. + OsType os_type = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// RestoreBackupFilesRequest restores files from a backup to a volume. +message RestoreBackupFilesRequest { + // Required. The volume resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Required. The backup resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + string backup = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; + + // Required. List of files to be restored, specified by their absolute path in + // the source volume. + repeated string file_list = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Absolute directory path in the destination volume. This is + // required if the `file_list` is provided. + string restore_destination_path = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// RestoreBackupFilesResponse is the result of RestoreBackupFilesRequest. +message RestoreBackupFilesResponse {} + +// EstablishVolumePeeringRequest establishes cluster and svm peerings between +// the source and destination clusters. +message EstablishVolumePeeringRequest { + // Required. The volume resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Required. Name of the user's local source cluster to be peered with the + // destination cluster. + string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the user's local source vserver svm to be peered with the + // destination vserver svm. + string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of IPv4 ip addresses to be used for peering. + repeated string peer_ip_addresses = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name of the user's local source volume to be peered with the + // destination volume. + string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts b/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts new file mode 100644 index 00000000000..ebfa437a676 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts @@ -0,0 +1,24482 @@ +// 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace netapp. */ + namespace netapp { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ListActiveDirectoriesRequest. */ + interface IListActiveDirectoriesRequest { + + /** ListActiveDirectoriesRequest parent */ + parent?: (string|null); + + /** ListActiveDirectoriesRequest pageSize */ + pageSize?: (number|null); + + /** ListActiveDirectoriesRequest pageToken */ + pageToken?: (string|null); + + /** ListActiveDirectoriesRequest filter */ + filter?: (string|null); + + /** ListActiveDirectoriesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListActiveDirectoriesRequest. */ + class ListActiveDirectoriesRequest implements IListActiveDirectoriesRequest { + + /** + * Constructs a new ListActiveDirectoriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest); + + /** ListActiveDirectoriesRequest parent. */ + public parent: string; + + /** ListActiveDirectoriesRequest pageSize. */ + public pageSize: number; + + /** ListActiveDirectoriesRequest pageToken. */ + public pageToken: string; + + /** ListActiveDirectoriesRequest filter. */ + public filter: string; + + /** ListActiveDirectoriesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListActiveDirectoriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActiveDirectoriesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @param message ListActiveDirectoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @param message ListActiveDirectoriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActiveDirectoriesRequest + * @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.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActiveDirectoriesRequest + * @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.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Verifies a ListActiveDirectoriesRequest 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 ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActiveDirectoriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesRequest; + + /** + * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. + * @param message ListActiveDirectoriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActiveDirectoriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActiveDirectoriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListActiveDirectoriesResponse. */ + interface IListActiveDirectoriesResponse { + + /** ListActiveDirectoriesResponse activeDirectories */ + activeDirectories?: (google.cloud.netapp.v1.IActiveDirectory[]|null); + + /** ListActiveDirectoriesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListActiveDirectoriesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListActiveDirectoriesResponse. */ + class ListActiveDirectoriesResponse implements IListActiveDirectoriesResponse { + + /** + * Constructs a new ListActiveDirectoriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse); + + /** ListActiveDirectoriesResponse activeDirectories. */ + public activeDirectories: google.cloud.netapp.v1.IActiveDirectory[]; + + /** ListActiveDirectoriesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListActiveDirectoriesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListActiveDirectoriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActiveDirectoriesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @param message ListActiveDirectoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @param message ListActiveDirectoriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActiveDirectoriesResponse + * @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.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActiveDirectoriesResponse + * @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.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Verifies a ListActiveDirectoriesResponse 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 ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActiveDirectoriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesResponse; + + /** + * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. + * @param message ListActiveDirectoriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListActiveDirectoriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListActiveDirectoriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetActiveDirectoryRequest. */ + interface IGetActiveDirectoryRequest { + + /** GetActiveDirectoryRequest name */ + name?: (string|null); + } + + /** Represents a GetActiveDirectoryRequest. */ + class GetActiveDirectoryRequest implements IGetActiveDirectoryRequest { + + /** + * Constructs a new GetActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest); + + /** GetActiveDirectoryRequest name. */ + public name: string; + + /** + * Creates a new GetActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @param message GetActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @param message GetActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetActiveDirectoryRequest + * @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.netapp.v1.GetActiveDirectoryRequest; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetActiveDirectoryRequest + * @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.netapp.v1.GetActiveDirectoryRequest; + + /** + * Verifies a GetActiveDirectoryRequest 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 GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetActiveDirectoryRequest; + + /** + * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message GetActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateActiveDirectoryRequest. */ + interface ICreateActiveDirectoryRequest { + + /** CreateActiveDirectoryRequest parent */ + parent?: (string|null); + + /** CreateActiveDirectoryRequest activeDirectory */ + activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** CreateActiveDirectoryRequest activeDirectoryId */ + activeDirectoryId?: (string|null); + } + + /** Represents a CreateActiveDirectoryRequest. */ + class CreateActiveDirectoryRequest implements ICreateActiveDirectoryRequest { + + /** + * Constructs a new CreateActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest); + + /** CreateActiveDirectoryRequest parent. */ + public parent: string; + + /** CreateActiveDirectoryRequest activeDirectory. */ + public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** CreateActiveDirectoryRequest activeDirectoryId. */ + public activeDirectoryId: string; + + /** + * Creates a new CreateActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @param message CreateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @param message CreateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateActiveDirectoryRequest + * @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.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateActiveDirectoryRequest + * @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.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Verifies a CreateActiveDirectoryRequest 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 CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateActiveDirectoryRequest; + + /** + * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message CreateActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateActiveDirectoryRequest. */ + interface IUpdateActiveDirectoryRequest { + + /** UpdateActiveDirectoryRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateActiveDirectoryRequest activeDirectory */ + activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + } + + /** Represents an UpdateActiveDirectoryRequest. */ + class UpdateActiveDirectoryRequest implements IUpdateActiveDirectoryRequest { + + /** + * Constructs a new UpdateActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest); + + /** UpdateActiveDirectoryRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateActiveDirectoryRequest activeDirectory. */ + public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); + + /** + * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @param message UpdateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @param message UpdateActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateActiveDirectoryRequest + * @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.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateActiveDirectoryRequest + * @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.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Verifies an UpdateActiveDirectoryRequest 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 UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; + + /** + * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message UpdateActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteActiveDirectoryRequest. */ + interface IDeleteActiveDirectoryRequest { + + /** DeleteActiveDirectoryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteActiveDirectoryRequest. */ + class DeleteActiveDirectoryRequest implements IDeleteActiveDirectoryRequest { + + /** + * Constructs a new DeleteActiveDirectoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest); + + /** DeleteActiveDirectoryRequest name. */ + public name: string; + + /** + * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteActiveDirectoryRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @param message DeleteActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @param message DeleteActiveDirectoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteActiveDirectoryRequest + * @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.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteActiveDirectoryRequest + * @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.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Verifies a DeleteActiveDirectoryRequest 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 DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteActiveDirectoryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; + + /** + * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. + * @param message DeleteActiveDirectoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteActiveDirectoryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteActiveDirectoryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActiveDirectory. */ + interface IActiveDirectory { + + /** ActiveDirectory name */ + name?: (string|null); + + /** ActiveDirectory createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ActiveDirectory state */ + state?: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State|null); + + /** ActiveDirectory domain */ + domain?: (string|null); + + /** ActiveDirectory site */ + site?: (string|null); + + /** ActiveDirectory dns */ + dns?: (string|null); + + /** ActiveDirectory netBiosPrefix */ + netBiosPrefix?: (string|null); + + /** ActiveDirectory organizationalUnit */ + organizationalUnit?: (string|null); + + /** ActiveDirectory aesEncryption */ + aesEncryption?: (boolean|null); + + /** ActiveDirectory username */ + username?: (string|null); + + /** ActiveDirectory password */ + password?: (string|null); + + /** ActiveDirectory backupOperators */ + backupOperators?: (string[]|null); + + /** ActiveDirectory administrators */ + administrators?: (string[]|null); + + /** ActiveDirectory securityOperators */ + securityOperators?: (string[]|null); + + /** ActiveDirectory kdcHostname */ + kdcHostname?: (string|null); + + /** ActiveDirectory kdcIp */ + kdcIp?: (string|null); + + /** ActiveDirectory nfsUsersWithLdap */ + nfsUsersWithLdap?: (boolean|null); + + /** ActiveDirectory description */ + description?: (string|null); + + /** ActiveDirectory ldapSigning */ + ldapSigning?: (boolean|null); + + /** ActiveDirectory encryptDcConnections */ + encryptDcConnections?: (boolean|null); + + /** ActiveDirectory labels */ + labels?: ({ [k: string]: string }|null); + + /** ActiveDirectory stateDetails */ + stateDetails?: (string|null); + } + + /** Represents an ActiveDirectory. */ + class ActiveDirectory implements IActiveDirectory { + + /** + * Constructs a new ActiveDirectory. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IActiveDirectory); + + /** ActiveDirectory name. */ + public name: string; + + /** ActiveDirectory createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ActiveDirectory state. */ + public state: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State); + + /** ActiveDirectory domain. */ + public domain: string; + + /** ActiveDirectory site. */ + public site: string; + + /** ActiveDirectory dns. */ + public dns: string; + + /** ActiveDirectory netBiosPrefix. */ + public netBiosPrefix: string; + + /** ActiveDirectory organizationalUnit. */ + public organizationalUnit: string; + + /** ActiveDirectory aesEncryption. */ + public aesEncryption: boolean; + + /** ActiveDirectory username. */ + public username: string; + + /** ActiveDirectory password. */ + public password: string; + + /** ActiveDirectory backupOperators. */ + public backupOperators: string[]; + + /** ActiveDirectory administrators. */ + public administrators: string[]; + + /** ActiveDirectory securityOperators. */ + public securityOperators: string[]; + + /** ActiveDirectory kdcHostname. */ + public kdcHostname: string; + + /** ActiveDirectory kdcIp. */ + public kdcIp: string; + + /** ActiveDirectory nfsUsersWithLdap. */ + public nfsUsersWithLdap: boolean; + + /** ActiveDirectory description. */ + public description: string; + + /** ActiveDirectory ldapSigning. */ + public ldapSigning: boolean; + + /** ActiveDirectory encryptDcConnections. */ + public encryptDcConnections: boolean; + + /** ActiveDirectory labels. */ + public labels: { [k: string]: string }; + + /** ActiveDirectory stateDetails. */ + public stateDetails: string; + + /** + * Creates a new ActiveDirectory instance using the specified properties. + * @param [properties] Properties to set + * @returns ActiveDirectory instance + */ + public static create(properties?: google.cloud.netapp.v1.IActiveDirectory): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @param message ActiveDirectory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @param message ActiveDirectory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActiveDirectory + * @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.netapp.v1.ActiveDirectory; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActiveDirectory + * @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.netapp.v1.ActiveDirectory; + + /** + * Verifies an ActiveDirectory 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 ActiveDirectory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActiveDirectory + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ActiveDirectory; + + /** + * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. + * @param message ActiveDirectory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ActiveDirectory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActiveDirectory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActiveDirectory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ActiveDirectory { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + IN_USE = 4, + DELETING = 5, + ERROR = 6, + DIAGNOSING = 7 + } + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup state */ + state?: (google.cloud.netapp.v1.Backup.State|keyof typeof google.cloud.netapp.v1.Backup.State|null); + + /** Backup description */ + description?: (string|null); + + /** Backup volumeUsageBytes */ + volumeUsageBytes?: (number|Long|string|null); + + /** Backup backupType */ + backupType?: (google.cloud.netapp.v1.Backup.Type|keyof typeof google.cloud.netapp.v1.Backup.Type|null); + + /** Backup sourceVolume */ + sourceVolume?: (string|null); + + /** Backup sourceSnapshot */ + sourceSnapshot?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup chainStorageBytes */ + chainStorageBytes?: (number|Long|string|null); + + /** Backup satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Backup satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Backup volumeRegion */ + volumeRegion?: (string|null); + + /** Backup backupRegion */ + backupRegion?: (string|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup state. */ + public state: (google.cloud.netapp.v1.Backup.State|keyof typeof google.cloud.netapp.v1.Backup.State); + + /** Backup description. */ + public description: string; + + /** Backup volumeUsageBytes. */ + public volumeUsageBytes: (number|Long|string); + + /** Backup backupType. */ + public backupType: (google.cloud.netapp.v1.Backup.Type|keyof typeof google.cloud.netapp.v1.Backup.Type); + + /** Backup sourceVolume. */ + public sourceVolume: string; + + /** Backup sourceSnapshot. */ + public sourceSnapshot?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup chainStorageBytes. */ + public chainStorageBytes: (number|Long|string); + + /** Backup satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Backup satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** Backup volumeRegion. */ + public volumeRegion: string; + + /** Backup backupRegion. */ + public backupRegion: string; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.netapp.v1.IBackup): google.cloud.netapp.v1.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + UPLOADING = 2, + READY = 3, + DELETING = 4, + ERROR = 5, + UPDATING = 6 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + MANUAL = 1, + SCHEDULED = 2 + } + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListBackupsRequest): google.cloud.netapp.v1.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.netapp.v1.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.netapp.v1.IListBackupsResponse): google.cloud.netapp.v1.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetBackupRequest): google.cloud.netapp.v1.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a CreateBackupRequest. */ + interface ICreateBackupRequest { + + /** CreateBackupRequest parent */ + parent?: (string|null); + + /** CreateBackupRequest backupId */ + backupId?: (string|null); + + /** CreateBackupRequest backup */ + backup?: (google.cloud.netapp.v1.IBackup|null); + } + + /** Represents a CreateBackupRequest. */ + class CreateBackupRequest implements ICreateBackupRequest { + + /** + * Constructs a new CreateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateBackupRequest); + + /** CreateBackupRequest parent. */ + public parent: string; + + /** CreateBackupRequest backupId. */ + public backupId: string; + + /** CreateBackupRequest backup. */ + public backup?: (google.cloud.netapp.v1.IBackup|null); + + /** + * Creates a new CreateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateBackupRequest): google.cloud.netapp.v1.CreateBackupRequest; + + /** + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. + * @param message CreateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupRequest + * @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.netapp.v1.CreateBackupRequest; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupRequest + * @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.netapp.v1.CreateBackupRequest; + + /** + * Verifies a CreateBackupRequest 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 CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateBackupRequest; + + /** + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @param message CreateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupRequest + * @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); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteBackupRequest): google.cloud.netapp.v1.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.netapp.v1.IBackup|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.netapp.v1.IBackup|null); + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateBackupRequest): google.cloud.netapp.v1.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 BackupPolicy. */ + interface IBackupPolicy { + + /** BackupPolicy name */ + name?: (string|null); + + /** BackupPolicy dailyBackupLimit */ + dailyBackupLimit?: (number|null); + + /** BackupPolicy weeklyBackupLimit */ + weeklyBackupLimit?: (number|null); + + /** BackupPolicy monthlyBackupLimit */ + monthlyBackupLimit?: (number|null); + + /** BackupPolicy description */ + description?: (string|null); + + /** BackupPolicy enabled */ + enabled?: (boolean|null); + + /** BackupPolicy assignedVolumeCount */ + assignedVolumeCount?: (number|null); + + /** BackupPolicy createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPolicy labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPolicy state */ + state?: (google.cloud.netapp.v1.BackupPolicy.State|keyof typeof google.cloud.netapp.v1.BackupPolicy.State|null); + } + + /** Represents a BackupPolicy. */ + class BackupPolicy implements IBackupPolicy { + + /** + * Constructs a new BackupPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IBackupPolicy); + + /** BackupPolicy name. */ + public name: string; + + /** BackupPolicy dailyBackupLimit. */ + public dailyBackupLimit?: (number|null); + + /** BackupPolicy weeklyBackupLimit. */ + public weeklyBackupLimit?: (number|null); + + /** BackupPolicy monthlyBackupLimit. */ + public monthlyBackupLimit?: (number|null); + + /** BackupPolicy description. */ + public description?: (string|null); + + /** BackupPolicy enabled. */ + public enabled?: (boolean|null); + + /** BackupPolicy assignedVolumeCount. */ + public assignedVolumeCount?: (number|null); + + /** BackupPolicy createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPolicy labels. */ + public labels: { [k: string]: string }; + + /** BackupPolicy state. */ + public state: (google.cloud.netapp.v1.BackupPolicy.State|keyof typeof google.cloud.netapp.v1.BackupPolicy.State); + + /** + * Creates a new BackupPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.IBackupPolicy): google.cloud.netapp.v1.BackupPolicy; + + /** + * Encodes the specified BackupPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. + * @param message BackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. + * @param message BackupPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPolicy + * @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.netapp.v1.BackupPolicy; + + /** + * Decodes a BackupPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPolicy + * @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.netapp.v1.BackupPolicy; + + /** + * Verifies a BackupPolicy 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 BackupPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupPolicy; + + /** + * Creates a plain object from a BackupPolicy message. Also converts values to other types if specified. + * @param message BackupPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.BackupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPolicy { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + ERROR = 4, + UPDATING = 5 + } + } + + /** Properties of a CreateBackupPolicyRequest. */ + interface ICreateBackupPolicyRequest { + + /** CreateBackupPolicyRequest parent */ + parent?: (string|null); + + /** CreateBackupPolicyRequest backupPolicy */ + backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); + + /** CreateBackupPolicyRequest backupPolicyId */ + backupPolicyId?: (string|null); + } + + /** Represents a CreateBackupPolicyRequest. */ + class CreateBackupPolicyRequest implements ICreateBackupPolicyRequest { + + /** + * Constructs a new CreateBackupPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateBackupPolicyRequest); + + /** CreateBackupPolicyRequest parent. */ + public parent: string; + + /** CreateBackupPolicyRequest backupPolicy. */ + public backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); + + /** CreateBackupPolicyRequest backupPolicyId. */ + public backupPolicyId: string; + + /** + * Creates a new CreateBackupPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPolicyRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateBackupPolicyRequest): google.cloud.netapp.v1.CreateBackupPolicyRequest; + + /** + * Encodes the specified CreateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. + * @param message CreateBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. + * @param message CreateBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPolicyRequest + * @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.netapp.v1.CreateBackupPolicyRequest; + + /** + * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPolicyRequest + * @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.netapp.v1.CreateBackupPolicyRequest; + + /** + * Verifies a CreateBackupPolicyRequest 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 CreateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateBackupPolicyRequest; + + /** + * Creates a plain object from a CreateBackupPolicyRequest message. Also converts values to other types if specified. + * @param message CreateBackupPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPolicyRequest. */ + interface IGetBackupPolicyRequest { + + /** GetBackupPolicyRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPolicyRequest. */ + class GetBackupPolicyRequest implements IGetBackupPolicyRequest { + + /** + * Constructs a new GetBackupPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetBackupPolicyRequest); + + /** GetBackupPolicyRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPolicyRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetBackupPolicyRequest): google.cloud.netapp.v1.GetBackupPolicyRequest; + + /** + * Encodes the specified GetBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. + * @param message GetBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. + * @param message GetBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPolicyRequest + * @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.netapp.v1.GetBackupPolicyRequest; + + /** + * Decodes a GetBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPolicyRequest + * @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.netapp.v1.GetBackupPolicyRequest; + + /** + * Verifies a GetBackupPolicyRequest 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 GetBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetBackupPolicyRequest; + + /** + * Creates a plain object from a GetBackupPolicyRequest message. Also converts values to other types if specified. + * @param message GetBackupPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPoliciesRequest. */ + interface IListBackupPoliciesRequest { + + /** ListBackupPoliciesRequest parent */ + parent?: (string|null); + + /** ListBackupPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPoliciesRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPoliciesRequest filter */ + filter?: (string|null); + + /** ListBackupPoliciesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPoliciesRequest. */ + class ListBackupPoliciesRequest implements IListBackupPoliciesRequest { + + /** + * Constructs a new ListBackupPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListBackupPoliciesRequest); + + /** ListBackupPoliciesRequest parent. */ + public parent: string; + + /** ListBackupPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListBackupPoliciesRequest pageToken. */ + public pageToken: string; + + /** ListBackupPoliciesRequest filter. */ + public filter: string; + + /** ListBackupPoliciesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPoliciesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListBackupPoliciesRequest): google.cloud.netapp.v1.ListBackupPoliciesRequest; + + /** + * Encodes the specified ListBackupPoliciesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. + * @param message ListBackupPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListBackupPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. + * @param message ListBackupPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListBackupPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPoliciesRequest + * @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.netapp.v1.ListBackupPoliciesRequest; + + /** + * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPoliciesRequest + * @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.netapp.v1.ListBackupPoliciesRequest; + + /** + * Verifies a ListBackupPoliciesRequest 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 ListBackupPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListBackupPoliciesRequest; + + /** + * Creates a plain object from a ListBackupPoliciesRequest message. Also converts values to other types if specified. + * @param message ListBackupPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListBackupPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPoliciesResponse. */ + interface IListBackupPoliciesResponse { + + /** ListBackupPoliciesResponse backupPolicies */ + backupPolicies?: (google.cloud.netapp.v1.IBackupPolicy[]|null); + + /** ListBackupPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPoliciesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPoliciesResponse. */ + class ListBackupPoliciesResponse implements IListBackupPoliciesResponse { + + /** + * Constructs a new ListBackupPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListBackupPoliciesResponse); + + /** ListBackupPoliciesResponse backupPolicies. */ + public backupPolicies: google.cloud.netapp.v1.IBackupPolicy[]; + + /** ListBackupPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPoliciesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPoliciesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListBackupPoliciesResponse): google.cloud.netapp.v1.ListBackupPoliciesResponse; + + /** + * Encodes the specified ListBackupPoliciesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. + * @param message ListBackupPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListBackupPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. + * @param message ListBackupPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListBackupPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPoliciesResponse + * @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.netapp.v1.ListBackupPoliciesResponse; + + /** + * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPoliciesResponse + * @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.netapp.v1.ListBackupPoliciesResponse; + + /** + * Verifies a ListBackupPoliciesResponse 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 ListBackupPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListBackupPoliciesResponse; + + /** + * Creates a plain object from a ListBackupPoliciesResponse message. Also converts values to other types if specified. + * @param message ListBackupPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListBackupPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupPolicyRequest. */ + interface IUpdateBackupPolicyRequest { + + /** UpdateBackupPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPolicyRequest backupPolicy */ + backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); + } + + /** Represents an UpdateBackupPolicyRequest. */ + class UpdateBackupPolicyRequest implements IUpdateBackupPolicyRequest { + + /** + * Constructs a new UpdateBackupPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateBackupPolicyRequest); + + /** UpdateBackupPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPolicyRequest backupPolicy. */ + public backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); + + /** + * Creates a new UpdateBackupPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupPolicyRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateBackupPolicyRequest): google.cloud.netapp.v1.UpdateBackupPolicyRequest; + + /** + * Encodes the specified UpdateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. + * @param message UpdateBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. + * @param message UpdateBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupPolicyRequest + * @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.netapp.v1.UpdateBackupPolicyRequest; + + /** + * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupPolicyRequest + * @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.netapp.v1.UpdateBackupPolicyRequest; + + /** + * Verifies an UpdateBackupPolicyRequest 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 UpdateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateBackupPolicyRequest; + + /** + * Creates a plain object from an UpdateBackupPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateBackupPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPolicyRequest. */ + interface IDeleteBackupPolicyRequest { + + /** DeleteBackupPolicyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteBackupPolicyRequest. */ + class DeleteBackupPolicyRequest implements IDeleteBackupPolicyRequest { + + /** + * Constructs a new DeleteBackupPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteBackupPolicyRequest); + + /** DeleteBackupPolicyRequest name. */ + public name: string; + + /** + * Creates a new DeleteBackupPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPolicyRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteBackupPolicyRequest): google.cloud.netapp.v1.DeleteBackupPolicyRequest; + + /** + * Encodes the specified DeleteBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. + * @param message DeleteBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. + * @param message DeleteBackupPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPolicyRequest + * @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.netapp.v1.DeleteBackupPolicyRequest; + + /** + * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPolicyRequest + * @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.netapp.v1.DeleteBackupPolicyRequest; + + /** + * Verifies a DeleteBackupPolicyRequest 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 DeleteBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteBackupPolicyRequest; + + /** + * Creates a plain object from a DeleteBackupPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.netapp.v1.BackupVault.State|keyof typeof google.cloud.netapp.v1.BackupVault.State|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault backupVaultType */ + backupVaultType?: (google.cloud.netapp.v1.BackupVault.BackupVaultType|keyof typeof google.cloud.netapp.v1.BackupVault.BackupVaultType|null); + + /** BackupVault sourceRegion */ + sourceRegion?: (string|null); + + /** BackupVault backupRegion */ + backupRegion?: (string|null); + + /** BackupVault sourceBackupVault */ + sourceBackupVault?: (string|null); + + /** BackupVault destinationBackupVault */ + destinationBackupVault?: (string|null); + + /** BackupVault backupRetentionPolicy */ + backupRetentionPolicy?: (google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null); + + /** BackupVault kmsConfig */ + kmsConfig?: (string|null); + + /** BackupVault encryptionState */ + encryptionState?: (google.cloud.netapp.v1.BackupVault.EncryptionState|keyof typeof google.cloud.netapp.v1.BackupVault.EncryptionState|null); + + /** BackupVault backupsCryptoKeyVersion */ + backupsCryptoKeyVersion?: (string|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault state. */ + public state: (google.cloud.netapp.v1.BackupVault.State|keyof typeof google.cloud.netapp.v1.BackupVault.State); + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault description. */ + public description: string; + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault backupVaultType. */ + public backupVaultType: (google.cloud.netapp.v1.BackupVault.BackupVaultType|keyof typeof google.cloud.netapp.v1.BackupVault.BackupVaultType); + + /** BackupVault sourceRegion. */ + public sourceRegion: string; + + /** BackupVault backupRegion. */ + public backupRegion: string; + + /** BackupVault sourceBackupVault. */ + public sourceBackupVault: string; + + /** BackupVault destinationBackupVault. */ + public destinationBackupVault: string; + + /** BackupVault backupRetentionPolicy. */ + public backupRetentionPolicy?: (google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null); + + /** BackupVault kmsConfig. */ + public kmsConfig: string; + + /** BackupVault encryptionState. */ + public encryptionState: (google.cloud.netapp.v1.BackupVault.EncryptionState|keyof typeof google.cloud.netapp.v1.BackupVault.EncryptionState); + + /** BackupVault backupsCryptoKeyVersion. */ + public backupsCryptoKeyVersion: string; + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.netapp.v1.IBackupVault): google.cloud.netapp.v1.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a BackupRetentionPolicy. */ + interface IBackupRetentionPolicy { + + /** BackupRetentionPolicy backupMinimumEnforcedRetentionDays */ + backupMinimumEnforcedRetentionDays?: (number|null); + + /** BackupRetentionPolicy dailyBackupImmutable */ + dailyBackupImmutable?: (boolean|null); + + /** BackupRetentionPolicy weeklyBackupImmutable */ + weeklyBackupImmutable?: (boolean|null); + + /** BackupRetentionPolicy monthlyBackupImmutable */ + monthlyBackupImmutable?: (boolean|null); + + /** BackupRetentionPolicy manualBackupImmutable */ + manualBackupImmutable?: (boolean|null); + } + + /** Represents a BackupRetentionPolicy. */ + class BackupRetentionPolicy implements IBackupRetentionPolicy { + + /** + * Constructs a new BackupRetentionPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy); + + /** BackupRetentionPolicy backupMinimumEnforcedRetentionDays. */ + public backupMinimumEnforcedRetentionDays: number; + + /** BackupRetentionPolicy dailyBackupImmutable. */ + public dailyBackupImmutable: boolean; + + /** BackupRetentionPolicy weeklyBackupImmutable. */ + public weeklyBackupImmutable: boolean; + + /** BackupRetentionPolicy monthlyBackupImmutable. */ + public monthlyBackupImmutable: boolean; + + /** BackupRetentionPolicy manualBackupImmutable. */ + public manualBackupImmutable: boolean; + + /** + * Creates a new BackupRetentionPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRetentionPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy): google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy; + + /** + * Encodes the specified BackupRetentionPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. + * @param message BackupRetentionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRetentionPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. + * @param message BackupRetentionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRetentionPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRetentionPolicy + * @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.netapp.v1.BackupVault.BackupRetentionPolicy; + + /** + * Decodes a BackupRetentionPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRetentionPolicy + * @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.netapp.v1.BackupVault.BackupRetentionPolicy; + + /** + * Verifies a BackupRetentionPolicy 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 BackupRetentionPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRetentionPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy; + + /** + * Creates a plain object from a BackupRetentionPolicy message. Also converts values to other types if specified. + * @param message BackupRetentionPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRetentionPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRetentionPolicy + * @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, + READY = 2, + DELETING = 3, + ERROR = 4, + UPDATING = 5 + } + + /** BackupVaultType enum. */ + enum BackupVaultType { + BACKUP_VAULT_TYPE_UNSPECIFIED = 0, + IN_REGION = 1, + CROSS_REGION = 2 + } + + /** EncryptionState enum. */ + enum EncryptionState { + ENCRYPTION_STATE_UNSPECIFIED = 0, + ENCRYPTION_STATE_PENDING = 1, + ENCRYPTION_STATE_COMPLETED = 2, + ENCRYPTION_STATE_IN_PROGRESS = 3, + ENCRYPTION_STATE_FAILED = 4 + } + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetBackupVaultRequest): google.cloud.netapp.v1.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListBackupVaultsRequest): google.cloud.netapp.v1.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsResponse): google.cloud.netapp.v1.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.netapp.v1.IBackupVault|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.netapp.v1.IBackupVault|null); + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateBackupVaultRequest): google.cloud.netapp.v1.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteBackupVaultRequest): google.cloud.netapp.v1.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.netapp.v1.IBackupVault|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.netapp.v1.IBackupVault|null); + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateBackupVaultRequest): google.cloud.netapp.v1.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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; + } + + /** Represents a NetApp */ + class NetApp extends $protobuf.rpc.Service { + + /** + * Constructs a new NetApp 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 NetApp 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): NetApp; + + /** + * Calls ListStoragePools. + * @param request ListStoragePoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListStoragePoolsResponse + */ + public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest, callback: google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback): void; + + /** + * Calls ListStoragePools. + * @param request ListStoragePoolsRequest message or plain object + * @returns Promise + */ + public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest): Promise; + + /** + * Calls CreateStoragePool. + * @param request CreateStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback): void; + + /** + * Calls CreateStoragePool. + * @param request CreateStoragePoolRequest message or plain object + * @returns Promise + */ + public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest): Promise; + + /** + * Calls GetStoragePool. + * @param request GetStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StoragePool + */ + public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.GetStoragePoolCallback): void; + + /** + * Calls GetStoragePool. + * @param request GetStoragePoolRequest message or plain object + * @returns Promise + */ + public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest): Promise; + + /** + * Calls UpdateStoragePool. + * @param request UpdateStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback): void; + + /** + * Calls UpdateStoragePool. + * @param request UpdateStoragePoolRequest message or plain object + * @returns Promise + */ + public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest): Promise; + + /** + * Calls DeleteStoragePool. + * @param request DeleteStoragePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback): void; + + /** + * Calls DeleteStoragePool. + * @param request DeleteStoragePoolRequest message or plain object + * @returns Promise + */ + public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest): Promise; + + /** + * Calls ValidateDirectoryService. + * @param request ValidateDirectoryServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public validateDirectoryService(request: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, callback: google.cloud.netapp.v1.NetApp.ValidateDirectoryServiceCallback): void; + + /** + * Calls ValidateDirectoryService. + * @param request ValidateDirectoryServiceRequest message or plain object + * @returns Promise + */ + public validateDirectoryService(request: google.cloud.netapp.v1.IValidateDirectoryServiceRequest): Promise; + + /** + * Calls SwitchActiveReplicaZone. + * @param request SwitchActiveReplicaZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public switchActiveReplicaZone(request: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, callback: google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZoneCallback): void; + + /** + * Calls SwitchActiveReplicaZone. + * @param request SwitchActiveReplicaZoneRequest message or plain object + * @returns Promise + */ + public switchActiveReplicaZone(request: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest): Promise; + + /** + * Calls ListVolumes. + * @param request ListVolumesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVolumesResponse + */ + public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest, callback: google.cloud.netapp.v1.NetApp.ListVolumesCallback): void; + + /** + * Calls ListVolumes. + * @param request ListVolumesRequest message or plain object + * @returns Promise + */ + public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest): Promise; + + /** + * Calls GetVolume. + * @param request GetVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Volume + */ + public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest, callback: google.cloud.netapp.v1.NetApp.GetVolumeCallback): void; + + /** + * Calls GetVolume. + * @param request GetVolumeRequest message or plain object + * @returns Promise + */ + public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest): Promise; + + /** + * Calls CreateVolume. + * @param request CreateVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.CreateVolumeCallback): void; + + /** + * Calls CreateVolume. + * @param request CreateVolumeRequest message or plain object + * @returns Promise + */ + public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest): Promise; + + /** + * Calls UpdateVolume. + * @param request UpdateVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.UpdateVolumeCallback): void; + + /** + * Calls UpdateVolume. + * @param request UpdateVolumeRequest message or plain object + * @returns Promise + */ + public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest): Promise; + + /** + * Calls DeleteVolume. + * @param request DeleteVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest, callback: google.cloud.netapp.v1.NetApp.DeleteVolumeCallback): void; + + /** + * Calls DeleteVolume. + * @param request DeleteVolumeRequest message or plain object + * @returns Promise + */ + public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest): Promise; + + /** + * Calls RevertVolume. + * @param request RevertVolumeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest, callback: google.cloud.netapp.v1.NetApp.RevertVolumeCallback): void; + + /** + * Calls RevertVolume. + * @param request RevertVolumeRequest message or plain object + * @returns Promise + */ + public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest): Promise; + + /** + * Calls EstablishVolumePeering. + * @param request EstablishVolumePeeringRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, callback: google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback): void; + + /** + * Calls EstablishVolumePeering. + * @param request EstablishVolumePeeringRequest message or plain object + * @returns Promise + */ + public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): Promise; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSnapshotsResponse + */ + public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest, callback: google.cloud.netapp.v1.NetApp.ListSnapshotsCallback): void; + + /** + * Calls ListSnapshots. + * @param request ListSnapshotsRequest message or plain object + * @returns Promise + */ + public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest): Promise; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Snapshot + */ + public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.GetSnapshotCallback): void; + + /** + * Calls GetSnapshot. + * @param request GetSnapshotRequest message or plain object + * @returns Promise + */ + public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest): Promise; + + /** + * Calls CreateSnapshot. + * @param request CreateSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.CreateSnapshotCallback): void; + + /** + * Calls CreateSnapshot. + * @param request CreateSnapshotRequest message or plain object + * @returns Promise + */ + public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest): Promise; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback): void; + + /** + * Calls DeleteSnapshot. + * @param request DeleteSnapshotRequest message or plain object + * @returns Promise + */ + public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest): Promise; + + /** + * Calls UpdateSnapshot. + * @param request UpdateSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback): void; + + /** + * Calls UpdateSnapshot. + * @param request UpdateSnapshotRequest message or plain object + * @returns Promise + */ + public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest): Promise; + + /** + * Calls ListActiveDirectories. + * @param request ListActiveDirectoriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse + */ + public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest, callback: google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback): void; + + /** + * Calls ListActiveDirectories. + * @param request ListActiveDirectoriesRequest message or plain object + * @returns Promise + */ + public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest): Promise; + + /** + * Calls GetActiveDirectory. + * @param request GetActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ActiveDirectory + */ + public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback): void; + + /** + * Calls GetActiveDirectory. + * @param request GetActiveDirectoryRequest message or plain object + * @returns Promise + */ + public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest): Promise; + + /** + * Calls CreateActiveDirectory. + * @param request CreateActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback): void; + + /** + * Calls CreateActiveDirectory. + * @param request CreateActiveDirectoryRequest message or plain object + * @returns Promise + */ + public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): Promise; + + /** + * Calls UpdateActiveDirectory. + * @param request UpdateActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback): void; + + /** + * Calls UpdateActiveDirectory. + * @param request UpdateActiveDirectoryRequest message or plain object + * @returns Promise + */ + public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): Promise; + + /** + * Calls DeleteActiveDirectory. + * @param request DeleteActiveDirectoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback): void; + + /** + * Calls DeleteActiveDirectory. + * @param request DeleteActiveDirectoryRequest message or plain object + * @returns Promise + */ + public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): Promise; + + /** + * Calls ListKmsConfigs. + * @param request ListKmsConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListKmsConfigsResponse + */ + public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest, callback: google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback): void; + + /** + * Calls ListKmsConfigs. + * @param request ListKmsConfigsRequest message or plain object + * @returns Promise + */ + public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest): Promise; + + /** + * Calls CreateKmsConfig. + * @param request CreateKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback): void; + + /** + * Calls CreateKmsConfig. + * @param request CreateKmsConfigRequest message or plain object + * @returns Promise + */ + public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest): Promise; + + /** + * Calls GetKmsConfig. + * @param request GetKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and KmsConfig + */ + public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.GetKmsConfigCallback): void; + + /** + * Calls GetKmsConfig. + * @param request GetKmsConfigRequest message or plain object + * @returns Promise + */ + public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest): Promise; + + /** + * Calls UpdateKmsConfig. + * @param request UpdateKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback): void; + + /** + * Calls UpdateKmsConfig. + * @param request UpdateKmsConfigRequest message or plain object + * @returns Promise + */ + public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest): Promise; + + /** + * Calls EncryptVolumes. + * @param request EncryptVolumesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest, callback: google.cloud.netapp.v1.NetApp.EncryptVolumesCallback): void; + + /** + * Calls EncryptVolumes. + * @param request EncryptVolumesRequest message or plain object + * @returns Promise + */ + public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest): Promise; + + /** + * Calls VerifyKmsConfig. + * @param request VerifyKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse + */ + public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback): void; + + /** + * Calls VerifyKmsConfig. + * @param request VerifyKmsConfigRequest message or plain object + * @returns Promise + */ + public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest): Promise; + + /** + * Calls DeleteKmsConfig. + * @param request DeleteKmsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback): void; + + /** + * Calls DeleteKmsConfig. + * @param request DeleteKmsConfigRequest message or plain object + * @returns Promise + */ + public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest): Promise; + + /** + * Calls ListReplications. + * @param request ListReplicationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReplicationsResponse + */ + public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest, callback: google.cloud.netapp.v1.NetApp.ListReplicationsCallback): void; + + /** + * Calls ListReplications. + * @param request ListReplicationsRequest message or plain object + * @returns Promise + */ + public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest): Promise; + + /** + * Calls GetReplication. + * @param request GetReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Replication + */ + public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest, callback: google.cloud.netapp.v1.NetApp.GetReplicationCallback): void; + + /** + * Calls GetReplication. + * @param request GetReplicationRequest message or plain object + * @returns Promise + */ + public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest): Promise; + + /** + * Calls CreateReplication. + * @param request CreateReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.CreateReplicationCallback): void; + + /** + * Calls CreateReplication. + * @param request CreateReplicationRequest message or plain object + * @returns Promise + */ + public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest): Promise; + + /** + * Calls DeleteReplication. + * @param request DeleteReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest, callback: google.cloud.netapp.v1.NetApp.DeleteReplicationCallback): void; + + /** + * Calls DeleteReplication. + * @param request DeleteReplicationRequest message or plain object + * @returns Promise + */ + public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest): Promise; + + /** + * Calls UpdateReplication. + * @param request UpdateReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.UpdateReplicationCallback): void; + + /** + * Calls UpdateReplication. + * @param request UpdateReplicationRequest message or plain object + * @returns Promise + */ + public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest): Promise; + + /** + * Calls StopReplication. + * @param request StopReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest, callback: google.cloud.netapp.v1.NetApp.StopReplicationCallback): void; + + /** + * Calls StopReplication. + * @param request StopReplicationRequest message or plain object + * @returns Promise + */ + public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest): Promise; + + /** + * Calls ResumeReplication. + * @param request ResumeReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest, callback: google.cloud.netapp.v1.NetApp.ResumeReplicationCallback): void; + + /** + * Calls ResumeReplication. + * @param request ResumeReplicationRequest message or plain object + * @returns Promise + */ + public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest): Promise; + + /** + * Calls ReverseReplicationDirection. + * @param request ReverseReplicationDirectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, callback: google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback): void; + + /** + * Calls ReverseReplicationDirection. + * @param request ReverseReplicationDirectionRequest message or plain object + * @returns Promise + */ + public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): Promise; + + /** + * Calls EstablishPeering. + * @param request EstablishPeeringRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public establishPeering(request: google.cloud.netapp.v1.IEstablishPeeringRequest, callback: google.cloud.netapp.v1.NetApp.EstablishPeeringCallback): void; + + /** + * Calls EstablishPeering. + * @param request EstablishPeeringRequest message or plain object + * @returns Promise + */ + public establishPeering(request: google.cloud.netapp.v1.IEstablishPeeringRequest): Promise; + + /** + * Calls SyncReplication. + * @param request SyncReplicationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public syncReplication(request: google.cloud.netapp.v1.ISyncReplicationRequest, callback: google.cloud.netapp.v1.NetApp.SyncReplicationCallback): void; + + /** + * Calls SyncReplication. + * @param request SyncReplicationRequest message or plain object + * @returns Promise + */ + public syncReplication(request: google.cloud.netapp.v1.ISyncReplicationRequest): 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.netapp.v1.ICreateBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupVaultCallback): void; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise + */ + public createBackupVault(request: google.cloud.netapp.v1.ICreateBackupVaultRequest): 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.netapp.v1.IGetBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupVaultCallback): void; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise + */ + public getBackupVault(request: google.cloud.netapp.v1.IGetBackupVaultRequest): 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.netapp.v1.IListBackupVaultsRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupVaultsCallback): void; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise + */ + public listBackupVaults(request: google.cloud.netapp.v1.IListBackupVaultsRequest): 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.netapp.v1.IUpdateBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupVaultCallback): void; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise + */ + public updateBackupVault(request: google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupVaultCallback): void; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise + */ + public deleteBackupVault(request: google.cloud.netapp.v1.IDeleteBackupVaultRequest): Promise; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackup(request: google.cloud.netapp.v1.ICreateBackupRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupCallback): void; + + /** + * Calls CreateBackup. + * @param request CreateBackupRequest message or plain object + * @returns Promise + */ + public createBackup(request: google.cloud.netapp.v1.ICreateBackupRequest): 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.netapp.v1.IGetBackupRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.cloud.netapp.v1.IGetBackupRequest): 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.netapp.v1.IListBackupsRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.netapp.v1.IListBackupsRequest): 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.netapp.v1.IDeleteBackupRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.netapp.v1.IDeleteBackupRequest): 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.netapp.v1.IUpdateBackupRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupCallback): void; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.netapp.v1.IUpdateBackupRequest): Promise; + + /** + * Calls CreateBackupPolicy. + * @param request CreateBackupPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPolicy(request: google.cloud.netapp.v1.ICreateBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupPolicyCallback): void; + + /** + * Calls CreateBackupPolicy. + * @param request CreateBackupPolicyRequest message or plain object + * @returns Promise + */ + public createBackupPolicy(request: google.cloud.netapp.v1.ICreateBackupPolicyRequest): Promise; + + /** + * Calls GetBackupPolicy. + * @param request GetBackupPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPolicy + */ + public getBackupPolicy(request: google.cloud.netapp.v1.IGetBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupPolicyCallback): void; + + /** + * Calls GetBackupPolicy. + * @param request GetBackupPolicyRequest message or plain object + * @returns Promise + */ + public getBackupPolicy(request: google.cloud.netapp.v1.IGetBackupPolicyRequest): Promise; + + /** + * Calls ListBackupPolicies. + * @param request ListBackupPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPoliciesResponse + */ + public listBackupPolicies(request: google.cloud.netapp.v1.IListBackupPoliciesRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupPoliciesCallback): void; + + /** + * Calls ListBackupPolicies. + * @param request ListBackupPoliciesRequest message or plain object + * @returns Promise + */ + public listBackupPolicies(request: google.cloud.netapp.v1.IListBackupPoliciesRequest): Promise; + + /** + * Calls UpdateBackupPolicy. + * @param request UpdateBackupPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupPolicy(request: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupPolicyCallback): void; + + /** + * Calls UpdateBackupPolicy. + * @param request UpdateBackupPolicyRequest message or plain object + * @returns Promise + */ + public updateBackupPolicy(request: google.cloud.netapp.v1.IUpdateBackupPolicyRequest): Promise; + + /** + * Calls DeleteBackupPolicy. + * @param request DeleteBackupPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPolicy(request: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupPolicyCallback): void; + + /** + * Calls DeleteBackupPolicy. + * @param request DeleteBackupPolicyRequest message or plain object + * @returns Promise + */ + public deleteBackupPolicy(request: google.cloud.netapp.v1.IDeleteBackupPolicyRequest): Promise; + + /** + * Calls ListQuotaRules. + * @param request ListQuotaRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListQuotaRulesResponse + */ + public listQuotaRules(request: google.cloud.netapp.v1.IListQuotaRulesRequest, callback: google.cloud.netapp.v1.NetApp.ListQuotaRulesCallback): void; + + /** + * Calls ListQuotaRules. + * @param request ListQuotaRulesRequest message or plain object + * @returns Promise + */ + public listQuotaRules(request: google.cloud.netapp.v1.IListQuotaRulesRequest): Promise; + + /** + * Calls GetQuotaRule. + * @param request GetQuotaRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QuotaRule + */ + public getQuotaRule(request: google.cloud.netapp.v1.IGetQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.GetQuotaRuleCallback): void; + + /** + * Calls GetQuotaRule. + * @param request GetQuotaRuleRequest message or plain object + * @returns Promise + */ + public getQuotaRule(request: google.cloud.netapp.v1.IGetQuotaRuleRequest): Promise; + + /** + * Calls CreateQuotaRule. + * @param request CreateQuotaRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createQuotaRule(request: google.cloud.netapp.v1.ICreateQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.CreateQuotaRuleCallback): void; + + /** + * Calls CreateQuotaRule. + * @param request CreateQuotaRuleRequest message or plain object + * @returns Promise + */ + public createQuotaRule(request: google.cloud.netapp.v1.ICreateQuotaRuleRequest): Promise; + + /** + * Calls UpdateQuotaRule. + * @param request UpdateQuotaRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateQuotaRule(request: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.UpdateQuotaRuleCallback): void; + + /** + * Calls UpdateQuotaRule. + * @param request UpdateQuotaRuleRequest message or plain object + * @returns Promise + */ + public updateQuotaRule(request: google.cloud.netapp.v1.IUpdateQuotaRuleRequest): Promise; + + /** + * Calls DeleteQuotaRule. + * @param request DeleteQuotaRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteQuotaRule(request: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.DeleteQuotaRuleCallback): void; + + /** + * Calls DeleteQuotaRule. + * @param request DeleteQuotaRuleRequest message or plain object + * @returns Promise + */ + public deleteQuotaRule(request: google.cloud.netapp.v1.IDeleteQuotaRuleRequest): Promise; + + /** + * Calls RestoreBackupFiles. + * @param request RestoreBackupFilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreBackupFiles(request: google.cloud.netapp.v1.IRestoreBackupFilesRequest, callback: google.cloud.netapp.v1.NetApp.RestoreBackupFilesCallback): void; + + /** + * Calls RestoreBackupFiles. + * @param request RestoreBackupFilesRequest message or plain object + * @returns Promise + */ + public restoreBackupFiles(request: google.cloud.netapp.v1.IRestoreBackupFilesRequest): Promise; + + /** + * Calls ListHostGroups. + * @param request ListHostGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListHostGroupsResponse + */ + public listHostGroups(request: google.cloud.netapp.v1.IListHostGroupsRequest, callback: google.cloud.netapp.v1.NetApp.ListHostGroupsCallback): void; + + /** + * Calls ListHostGroups. + * @param request ListHostGroupsRequest message or plain object + * @returns Promise + */ + public listHostGroups(request: google.cloud.netapp.v1.IListHostGroupsRequest): Promise; + + /** + * Calls GetHostGroup. + * @param request GetHostGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HostGroup + */ + public getHostGroup(request: google.cloud.netapp.v1.IGetHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.GetHostGroupCallback): void; + + /** + * Calls GetHostGroup. + * @param request GetHostGroupRequest message or plain object + * @returns Promise + */ + public getHostGroup(request: google.cloud.netapp.v1.IGetHostGroupRequest): Promise; + + /** + * Calls CreateHostGroup. + * @param request CreateHostGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createHostGroup(request: google.cloud.netapp.v1.ICreateHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.CreateHostGroupCallback): void; + + /** + * Calls CreateHostGroup. + * @param request CreateHostGroupRequest message or plain object + * @returns Promise + */ + public createHostGroup(request: google.cloud.netapp.v1.ICreateHostGroupRequest): Promise; + + /** + * Calls UpdateHostGroup. + * @param request UpdateHostGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateHostGroup(request: google.cloud.netapp.v1.IUpdateHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.UpdateHostGroupCallback): void; + + /** + * Calls UpdateHostGroup. + * @param request UpdateHostGroupRequest message or plain object + * @returns Promise + */ + public updateHostGroup(request: google.cloud.netapp.v1.IUpdateHostGroupRequest): Promise; + + /** + * Calls DeleteHostGroup. + * @param request DeleteHostGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteHostGroup(request: google.cloud.netapp.v1.IDeleteHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.DeleteHostGroupCallback): void; + + /** + * Calls DeleteHostGroup. + * @param request DeleteHostGroupRequest message or plain object + * @returns Promise + */ + public deleteHostGroup(request: google.cloud.netapp.v1.IDeleteHostGroupRequest): Promise; + + /** + * Calls ExecuteOntapPost. + * @param request ExecuteOntapPostRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse + */ + public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback): void; + + /** + * Calls ExecuteOntapPost. + * @param request ExecuteOntapPostRequest message or plain object + * @returns Promise + */ + public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest): Promise; + + /** + * Calls ExecuteOntapGet. + * @param request ExecuteOntapGetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse + */ + public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback): void; + + /** + * Calls ExecuteOntapGet. + * @param request ExecuteOntapGetRequest message or plain object + * @returns Promise + */ + public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest): Promise; + + /** + * Calls ExecuteOntapDelete. + * @param request ExecuteOntapDeleteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse + */ + public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback): void; + + /** + * Calls ExecuteOntapDelete. + * @param request ExecuteOntapDeleteRequest message or plain object + * @returns Promise + */ + public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): Promise; + + /** + * Calls ExecuteOntapPatch. + * @param request ExecuteOntapPatchRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse + */ + public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback): void; + + /** + * Calls ExecuteOntapPatch. + * @param request ExecuteOntapPatchRequest message or plain object + * @returns Promise + */ + public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest): Promise; + } + + namespace NetApp { + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. + * @param error Error, if any + * @param [response] ListStoragePoolsResponse + */ + type ListStoragePoolsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListStoragePoolsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. + * @param error Error, if any + * @param [response] StoragePool + */ + type GetStoragePoolCallback = (error: (Error|null), response?: google.cloud.netapp.v1.StoragePool) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|validateDirectoryService}. + * @param error Error, if any + * @param [response] Operation + */ + type ValidateDirectoryServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|switchActiveReplicaZone}. + * @param error Error, if any + * @param [response] Operation + */ + type SwitchActiveReplicaZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. + * @param error Error, if any + * @param [response] ListVolumesResponse + */ + type ListVolumesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListVolumesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. + * @param error Error, if any + * @param [response] Volume + */ + type GetVolumeCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Volume) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. + * @param error Error, if any + * @param [response] Operation + */ + type RevertVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. + * @param error Error, if any + * @param [response] Operation + */ + type EstablishVolumePeeringCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. + * @param error Error, if any + * @param [response] ListSnapshotsResponse + */ + type ListSnapshotsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListSnapshotsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. + * @param error Error, if any + * @param [response] Snapshot + */ + type GetSnapshotCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Snapshot) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. + * @param error Error, if any + * @param [response] ListActiveDirectoriesResponse + */ + type ListActiveDirectoriesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListActiveDirectoriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. + * @param error Error, if any + * @param [response] ActiveDirectory + */ + type GetActiveDirectoryCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ActiveDirectory) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. + * @param error Error, if any + * @param [response] ListKmsConfigsResponse + */ + type ListKmsConfigsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListKmsConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. + * @param error Error, if any + * @param [response] KmsConfig + */ + type GetKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.KmsConfig) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. + * @param error Error, if any + * @param [response] Operation + */ + type EncryptVolumesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. + * @param error Error, if any + * @param [response] VerifyKmsConfigResponse + */ + type VerifyKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.VerifyKmsConfigResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. + * @param error Error, if any + * @param [response] ListReplicationsResponse + */ + type ListReplicationsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListReplicationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. + * @param error Error, if any + * @param [response] Replication + */ + type GetReplicationCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Replication) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type StopReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type ResumeReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. + * @param error Error, if any + * @param [response] Operation + */ + type ReverseReplicationDirectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishPeering}. + * @param error Error, if any + * @param [response] Operation + */ + type EstablishPeeringCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|syncReplication}. + * @param error Error, if any + * @param [response] Operation + */ + type SyncReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault + */ + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.netapp.v1.BackupVault) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse + */ + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|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.netapp.v1.NetApp|createBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Backup) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|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.netapp.v1.NetApp|createBackupPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupPolicy}. + * @param error Error, if any + * @param [response] BackupPolicy + */ + type GetBackupPolicyCallback = (error: (Error|null), response?: google.cloud.netapp.v1.BackupPolicy) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupPolicies}. + * @param error Error, if any + * @param [response] ListBackupPoliciesResponse + */ + type ListBackupPoliciesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupPoliciesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listQuotaRules}. + * @param error Error, if any + * @param [response] ListQuotaRulesResponse + */ + type ListQuotaRulesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListQuotaRulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getQuotaRule}. + * @param error Error, if any + * @param [response] QuotaRule + */ + type GetQuotaRuleCallback = (error: (Error|null), response?: google.cloud.netapp.v1.QuotaRule) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createQuotaRule}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateQuotaRule}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteQuotaRule}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|restoreBackupFiles}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupFilesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listHostGroups}. + * @param error Error, if any + * @param [response] ListHostGroupsResponse + */ + type ListHostGroupsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListHostGroupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getHostGroup}. + * @param error Error, if any + * @param [response] HostGroup + */ + type GetHostGroupCallback = (error: (Error|null), response?: google.cloud.netapp.v1.HostGroup) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createHostGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateHostGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteHostGroup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. + * @param error Error, if any + * @param [response] ExecuteOntapPostResponse + */ + type ExecuteOntapPostCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPostResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. + * @param error Error, if any + * @param [response] ExecuteOntapGetResponse + */ + type ExecuteOntapGetCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapGetResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. + * @param error Error, if any + * @param [response] ExecuteOntapDeleteResponse + */ + type ExecuteOntapDeleteCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapDeleteResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. + * @param error Error, if any + * @param [response] ExecuteOntapPatchResponse + */ + type ExecuteOntapPatchCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPatchResponse) => void; + } + + /** 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); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.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; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.netapp.v1.IOperationMetadata): google.cloud.netapp.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 ListHostGroupsRequest. */ + interface IListHostGroupsRequest { + + /** ListHostGroupsRequest parent */ + parent?: (string|null); + + /** ListHostGroupsRequest pageSize */ + pageSize?: (number|null); + + /** ListHostGroupsRequest pageToken */ + pageToken?: (string|null); + + /** ListHostGroupsRequest filter */ + filter?: (string|null); + + /** ListHostGroupsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListHostGroupsRequest. */ + class ListHostGroupsRequest implements IListHostGroupsRequest { + + /** + * Constructs a new ListHostGroupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListHostGroupsRequest); + + /** ListHostGroupsRequest parent. */ + public parent: string; + + /** ListHostGroupsRequest pageSize. */ + public pageSize: number; + + /** ListHostGroupsRequest pageToken. */ + public pageToken: string; + + /** ListHostGroupsRequest filter. */ + public filter: string; + + /** ListHostGroupsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListHostGroupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListHostGroupsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListHostGroupsRequest): google.cloud.netapp.v1.ListHostGroupsRequest; + + /** + * Encodes the specified ListHostGroupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. + * @param message ListHostGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListHostGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListHostGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. + * @param message ListHostGroupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListHostGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListHostGroupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListHostGroupsRequest + * @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.netapp.v1.ListHostGroupsRequest; + + /** + * Decodes a ListHostGroupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListHostGroupsRequest + * @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.netapp.v1.ListHostGroupsRequest; + + /** + * Verifies a ListHostGroupsRequest 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 ListHostGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListHostGroupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListHostGroupsRequest; + + /** + * Creates a plain object from a ListHostGroupsRequest message. Also converts values to other types if specified. + * @param message ListHostGroupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListHostGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListHostGroupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListHostGroupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListHostGroupsResponse. */ + interface IListHostGroupsResponse { + + /** ListHostGroupsResponse hostGroups */ + hostGroups?: (google.cloud.netapp.v1.IHostGroup[]|null); + + /** ListHostGroupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListHostGroupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListHostGroupsResponse. */ + class ListHostGroupsResponse implements IListHostGroupsResponse { + + /** + * Constructs a new ListHostGroupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListHostGroupsResponse); + + /** ListHostGroupsResponse hostGroups. */ + public hostGroups: google.cloud.netapp.v1.IHostGroup[]; + + /** ListHostGroupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListHostGroupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListHostGroupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListHostGroupsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListHostGroupsResponse): google.cloud.netapp.v1.ListHostGroupsResponse; + + /** + * Encodes the specified ListHostGroupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. + * @param message ListHostGroupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListHostGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListHostGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. + * @param message ListHostGroupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListHostGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListHostGroupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListHostGroupsResponse + * @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.netapp.v1.ListHostGroupsResponse; + + /** + * Decodes a ListHostGroupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListHostGroupsResponse + * @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.netapp.v1.ListHostGroupsResponse; + + /** + * Verifies a ListHostGroupsResponse 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 ListHostGroupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListHostGroupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListHostGroupsResponse; + + /** + * Creates a plain object from a ListHostGroupsResponse message. Also converts values to other types if specified. + * @param message ListHostGroupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListHostGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListHostGroupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListHostGroupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetHostGroupRequest. */ + interface IGetHostGroupRequest { + + /** GetHostGroupRequest name */ + name?: (string|null); + } + + /** Represents a GetHostGroupRequest. */ + class GetHostGroupRequest implements IGetHostGroupRequest { + + /** + * Constructs a new GetHostGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetHostGroupRequest); + + /** GetHostGroupRequest name. */ + public name: string; + + /** + * Creates a new GetHostGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetHostGroupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetHostGroupRequest): google.cloud.netapp.v1.GetHostGroupRequest; + + /** + * Encodes the specified GetHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. + * @param message GetHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. + * @param message GetHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetHostGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetHostGroupRequest + * @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.netapp.v1.GetHostGroupRequest; + + /** + * Decodes a GetHostGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetHostGroupRequest + * @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.netapp.v1.GetHostGroupRequest; + + /** + * Verifies a GetHostGroupRequest 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 GetHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetHostGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetHostGroupRequest; + + /** + * Creates a plain object from a GetHostGroupRequest message. Also converts values to other types if specified. + * @param message GetHostGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetHostGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetHostGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateHostGroupRequest. */ + interface ICreateHostGroupRequest { + + /** CreateHostGroupRequest parent */ + parent?: (string|null); + + /** CreateHostGroupRequest hostGroup */ + hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); + + /** CreateHostGroupRequest hostGroupId */ + hostGroupId?: (string|null); + } + + /** Represents a CreateHostGroupRequest. */ + class CreateHostGroupRequest implements ICreateHostGroupRequest { + + /** + * Constructs a new CreateHostGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateHostGroupRequest); + + /** CreateHostGroupRequest parent. */ + public parent: string; + + /** CreateHostGroupRequest hostGroup. */ + public hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); + + /** CreateHostGroupRequest hostGroupId. */ + public hostGroupId: string; + + /** + * Creates a new CreateHostGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateHostGroupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateHostGroupRequest): google.cloud.netapp.v1.CreateHostGroupRequest; + + /** + * Encodes the specified CreateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. + * @param message CreateHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. + * @param message CreateHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateHostGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateHostGroupRequest + * @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.netapp.v1.CreateHostGroupRequest; + + /** + * Decodes a CreateHostGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateHostGroupRequest + * @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.netapp.v1.CreateHostGroupRequest; + + /** + * Verifies a CreateHostGroupRequest 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 CreateHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateHostGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateHostGroupRequest; + + /** + * Creates a plain object from a CreateHostGroupRequest message. Also converts values to other types if specified. + * @param message CreateHostGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateHostGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateHostGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateHostGroupRequest. */ + interface IUpdateHostGroupRequest { + + /** UpdateHostGroupRequest hostGroup */ + hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); + + /** UpdateHostGroupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateHostGroupRequest. */ + class UpdateHostGroupRequest implements IUpdateHostGroupRequest { + + /** + * Constructs a new UpdateHostGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateHostGroupRequest); + + /** UpdateHostGroupRequest hostGroup. */ + public hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); + + /** UpdateHostGroupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateHostGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateHostGroupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateHostGroupRequest): google.cloud.netapp.v1.UpdateHostGroupRequest; + + /** + * Encodes the specified UpdateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. + * @param message UpdateHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. + * @param message UpdateHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateHostGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateHostGroupRequest + * @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.netapp.v1.UpdateHostGroupRequest; + + /** + * Decodes an UpdateHostGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateHostGroupRequest + * @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.netapp.v1.UpdateHostGroupRequest; + + /** + * Verifies an UpdateHostGroupRequest 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 UpdateHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateHostGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateHostGroupRequest; + + /** + * Creates a plain object from an UpdateHostGroupRequest message. Also converts values to other types if specified. + * @param message UpdateHostGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateHostGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateHostGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteHostGroupRequest. */ + interface IDeleteHostGroupRequest { + + /** DeleteHostGroupRequest name */ + name?: (string|null); + } + + /** Represents a DeleteHostGroupRequest. */ + class DeleteHostGroupRequest implements IDeleteHostGroupRequest { + + /** + * Constructs a new DeleteHostGroupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteHostGroupRequest); + + /** DeleteHostGroupRequest name. */ + public name: string; + + /** + * Creates a new DeleteHostGroupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteHostGroupRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteHostGroupRequest): google.cloud.netapp.v1.DeleteHostGroupRequest; + + /** + * Encodes the specified DeleteHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. + * @param message DeleteHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. + * @param message DeleteHostGroupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteHostGroupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteHostGroupRequest + * @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.netapp.v1.DeleteHostGroupRequest; + + /** + * Decodes a DeleteHostGroupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteHostGroupRequest + * @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.netapp.v1.DeleteHostGroupRequest; + + /** + * Verifies a DeleteHostGroupRequest 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 DeleteHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteHostGroupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteHostGroupRequest; + + /** + * Creates a plain object from a DeleteHostGroupRequest message. Also converts values to other types if specified. + * @param message DeleteHostGroupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteHostGroupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteHostGroupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HostGroup. */ + interface IHostGroup { + + /** HostGroup name */ + name?: (string|null); + + /** HostGroup type */ + type?: (google.cloud.netapp.v1.HostGroup.Type|keyof typeof google.cloud.netapp.v1.HostGroup.Type|null); + + /** HostGroup state */ + state?: (google.cloud.netapp.v1.HostGroup.State|keyof typeof google.cloud.netapp.v1.HostGroup.State|null); + + /** HostGroup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** HostGroup hosts */ + hosts?: (string[]|null); + + /** HostGroup osType */ + osType?: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType|null); + + /** HostGroup description */ + description?: (string|null); + + /** HostGroup labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a HostGroup. */ + class HostGroup implements IHostGroup { + + /** + * Constructs a new HostGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IHostGroup); + + /** HostGroup name. */ + public name: string; + + /** HostGroup type. */ + public type: (google.cloud.netapp.v1.HostGroup.Type|keyof typeof google.cloud.netapp.v1.HostGroup.Type); + + /** HostGroup state. */ + public state: (google.cloud.netapp.v1.HostGroup.State|keyof typeof google.cloud.netapp.v1.HostGroup.State); + + /** HostGroup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** HostGroup hosts. */ + public hosts: string[]; + + /** HostGroup osType. */ + public osType: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType); + + /** HostGroup description. */ + public description: string; + + /** HostGroup labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new HostGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns HostGroup instance + */ + public static create(properties?: google.cloud.netapp.v1.IHostGroup): google.cloud.netapp.v1.HostGroup; + + /** + * Encodes the specified HostGroup message. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. + * @param message HostGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IHostGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HostGroup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. + * @param message HostGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IHostGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HostGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HostGroup + * @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.netapp.v1.HostGroup; + + /** + * Decodes a HostGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HostGroup + * @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.netapp.v1.HostGroup; + + /** + * Verifies a HostGroup 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 HostGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HostGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HostGroup; + + /** + * Creates a plain object from a HostGroup message. Also converts values to other types if specified. + * @param message HostGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.HostGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HostGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HostGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace HostGroup { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ISCSI_INITIATOR = 1 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + DISABLED = 5 + } + } + + /** ServiceLevel enum. */ + enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0, + PREMIUM = 1, + EXTREME = 2, + STANDARD = 3, + FLEX = 4 + } + + /** FlexPerformance enum. */ + enum FlexPerformance { + FLEX_PERFORMANCE_UNSPECIFIED = 0, + FLEX_PERFORMANCE_DEFAULT = 1, + FLEX_PERFORMANCE_CUSTOM = 2 + } + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + SERVICE_MANAGED = 1, + CLOUD_KMS = 2 + } + + /** DirectoryServiceType enum. */ + enum DirectoryServiceType { + DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0, + ACTIVE_DIRECTORY = 1 + } + + /** StoragePoolType enum. */ + enum StoragePoolType { + STORAGE_POOL_TYPE_UNSPECIFIED = 0, + FILE = 1, + UNIFIED = 2 + } + + /** HybridReplicationSchedule enum. */ + enum HybridReplicationSchedule { + HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED = 0, + EVERY_10_MINUTES = 1, + HOURLY = 2, + DAILY = 3 + } + + /** QosType enum. */ + enum QosType { + QOS_TYPE_UNSPECIFIED = 0, + AUTO = 1, + MANUAL = 2 + } + + /** OsType enum. */ + enum OsType { + OS_TYPE_UNSPECIFIED = 0, + LINUX = 1, + WINDOWS = 2, + ESXI = 3 + } + + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { + + /** LocationMetadata supportedServiceLevels */ + supportedServiceLevels?: (google.cloud.netapp.v1.ServiceLevel[]|null); + + /** LocationMetadata supportedFlexPerformance */ + supportedFlexPerformance?: (google.cloud.netapp.v1.FlexPerformance[]|null); + + /** LocationMetadata hasVcp */ + hasVcp?: (boolean|null); + + /** LocationMetadata hasOntapProxy */ + hasOntapProxy?: (boolean|null); + } + + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { + + /** + * Constructs a new LocationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ILocationMetadata); + + /** LocationMetadata supportedServiceLevels. */ + public supportedServiceLevels: google.cloud.netapp.v1.ServiceLevel[]; + + /** LocationMetadata supportedFlexPerformance. */ + public supportedFlexPerformance: google.cloud.netapp.v1.FlexPerformance[]; + + /** LocationMetadata hasVcp. */ + public hasVcp: boolean; + + /** LocationMetadata hasOntapProxy. */ + public hasOntapProxy: boolean; + + /** + * Creates a new LocationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationMetadata instance + */ + public static create(properties?: google.cloud.netapp.v1.ILocationMetadata): google.cloud.netapp.v1.LocationMetadata; + + /** + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. + * @param message LocationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationMetadata + * @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.netapp.v1.LocationMetadata; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationMetadata + * @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.netapp.v1.LocationMetadata; + + /** + * Verifies a LocationMetadata 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 LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.LocationMetadata; + + /** + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserCommands. */ + interface IUserCommands { + + /** UserCommands commands */ + commands?: (string[]|null); + } + + /** Represents a UserCommands. */ + class UserCommands implements IUserCommands { + + /** + * Constructs a new UserCommands. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUserCommands); + + /** UserCommands commands. */ + public commands: string[]; + + /** + * Creates a new UserCommands instance using the specified properties. + * @param [properties] Properties to set + * @returns UserCommands instance + */ + public static create(properties?: google.cloud.netapp.v1.IUserCommands): google.cloud.netapp.v1.UserCommands; + + /** + * Encodes the specified UserCommands message. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. + * @param message UserCommands message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUserCommands, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserCommands message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. + * @param message UserCommands message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUserCommands, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserCommands message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserCommands + * @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.netapp.v1.UserCommands; + + /** + * Decodes a UserCommands message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserCommands + * @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.netapp.v1.UserCommands; + + /** + * Verifies a UserCommands 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 UserCommands message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserCommands + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UserCommands; + + /** + * Creates a plain object from a UserCommands message. Also converts values to other types if specified. + * @param message UserCommands + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UserCommands, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserCommands to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserCommands + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetKmsConfigRequest. */ + interface IGetKmsConfigRequest { + + /** GetKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetKmsConfigRequest. */ + class GetKmsConfigRequest implements IGetKmsConfigRequest { + + /** + * Constructs a new GetKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest); + + /** GetKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new GetKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @param message GetKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @param message GetKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetKmsConfigRequest + * @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.netapp.v1.GetKmsConfigRequest; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetKmsConfigRequest + * @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.netapp.v1.GetKmsConfigRequest; + + /** + * Verifies a GetKmsConfigRequest 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 GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetKmsConfigRequest; + + /** + * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. + * @param message GetKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListKmsConfigsRequest. */ + interface IListKmsConfigsRequest { + + /** ListKmsConfigsRequest parent */ + parent?: (string|null); + + /** ListKmsConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListKmsConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListKmsConfigsRequest orderBy */ + orderBy?: (string|null); + + /** ListKmsConfigsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListKmsConfigsRequest. */ + class ListKmsConfigsRequest implements IListKmsConfigsRequest { + + /** + * Constructs a new ListKmsConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest); + + /** ListKmsConfigsRequest parent. */ + public parent: string; + + /** ListKmsConfigsRequest pageSize. */ + public pageSize: number; + + /** ListKmsConfigsRequest pageToken. */ + public pageToken: string; + + /** ListKmsConfigsRequest orderBy. */ + public orderBy: string; + + /** ListKmsConfigsRequest filter. */ + public filter: string; + + /** + * Creates a new ListKmsConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListKmsConfigsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @param message ListKmsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @param message ListKmsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListKmsConfigsRequest + * @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.netapp.v1.ListKmsConfigsRequest; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListKmsConfigsRequest + * @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.netapp.v1.ListKmsConfigsRequest; + + /** + * Verifies a ListKmsConfigsRequest 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 ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListKmsConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsRequest; + + /** + * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. + * @param message ListKmsConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListKmsConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListKmsConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListKmsConfigsResponse. */ + interface IListKmsConfigsResponse { + + /** ListKmsConfigsResponse kmsConfigs */ + kmsConfigs?: (google.cloud.netapp.v1.IKmsConfig[]|null); + + /** ListKmsConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListKmsConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListKmsConfigsResponse. */ + class ListKmsConfigsResponse implements IListKmsConfigsResponse { + + /** + * Constructs a new ListKmsConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse); + + /** ListKmsConfigsResponse kmsConfigs. */ + public kmsConfigs: google.cloud.netapp.v1.IKmsConfig[]; + + /** ListKmsConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListKmsConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListKmsConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListKmsConfigsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @param message ListKmsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @param message ListKmsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListKmsConfigsResponse + * @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.netapp.v1.ListKmsConfigsResponse; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListKmsConfigsResponse + * @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.netapp.v1.ListKmsConfigsResponse; + + /** + * Verifies a ListKmsConfigsResponse 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 ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListKmsConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsResponse; + + /** + * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. + * @param message ListKmsConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListKmsConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListKmsConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateKmsConfigRequest. */ + interface ICreateKmsConfigRequest { + + /** CreateKmsConfigRequest parent */ + parent?: (string|null); + + /** CreateKmsConfigRequest kmsConfigId */ + kmsConfigId?: (string|null); + + /** CreateKmsConfigRequest kmsConfig */ + kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + } + + /** Represents a CreateKmsConfigRequest. */ + class CreateKmsConfigRequest implements ICreateKmsConfigRequest { + + /** + * Constructs a new CreateKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest); + + /** CreateKmsConfigRequest parent. */ + public parent: string; + + /** CreateKmsConfigRequest kmsConfigId. */ + public kmsConfigId: string; + + /** CreateKmsConfigRequest kmsConfig. */ + public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + + /** + * Creates a new CreateKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @param message CreateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @param message CreateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateKmsConfigRequest + * @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.netapp.v1.CreateKmsConfigRequest; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateKmsConfigRequest + * @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.netapp.v1.CreateKmsConfigRequest; + + /** + * Verifies a CreateKmsConfigRequest 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 CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateKmsConfigRequest; + + /** + * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. + * @param message CreateKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateKmsConfigRequest. */ + interface IUpdateKmsConfigRequest { + + /** UpdateKmsConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateKmsConfigRequest kmsConfig */ + kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + } + + /** Represents an UpdateKmsConfigRequest. */ + class UpdateKmsConfigRequest implements IUpdateKmsConfigRequest { + + /** + * Constructs a new UpdateKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest); + + /** UpdateKmsConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateKmsConfigRequest kmsConfig. */ + public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); + + /** + * Creates a new UpdateKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @param message UpdateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @param message UpdateKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateKmsConfigRequest + * @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.netapp.v1.UpdateKmsConfigRequest; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateKmsConfigRequest + * @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.netapp.v1.UpdateKmsConfigRequest; + + /** + * Verifies an UpdateKmsConfigRequest 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 UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateKmsConfigRequest; + + /** + * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. + * @param message UpdateKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteKmsConfigRequest. */ + interface IDeleteKmsConfigRequest { + + /** DeleteKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteKmsConfigRequest. */ + class DeleteKmsConfigRequest implements IDeleteKmsConfigRequest { + + /** + * Constructs a new DeleteKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest); + + /** DeleteKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @param message DeleteKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @param message DeleteKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteKmsConfigRequest + * @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.netapp.v1.DeleteKmsConfigRequest; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteKmsConfigRequest + * @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.netapp.v1.DeleteKmsConfigRequest; + + /** + * Verifies a DeleteKmsConfigRequest 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 DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteKmsConfigRequest; + + /** + * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. + * @param message DeleteKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptVolumesRequest. */ + interface IEncryptVolumesRequest { + + /** EncryptVolumesRequest name */ + name?: (string|null); + } + + /** Represents an EncryptVolumesRequest. */ + class EncryptVolumesRequest implements IEncryptVolumesRequest { + + /** + * Constructs a new EncryptVolumesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest); + + /** EncryptVolumesRequest name. */ + public name: string; + + /** + * Creates a new EncryptVolumesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptVolumesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @param message EncryptVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @param message EncryptVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptVolumesRequest + * @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.netapp.v1.EncryptVolumesRequest; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptVolumesRequest + * @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.netapp.v1.EncryptVolumesRequest; + + /** + * Verifies an EncryptVolumesRequest 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 EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptVolumesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EncryptVolumesRequest; + + /** + * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. + * @param message EncryptVolumesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.EncryptVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptVolumesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptVolumesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyKmsConfigRequest. */ + interface IVerifyKmsConfigRequest { + + /** VerifyKmsConfigRequest name */ + name?: (string|null); + } + + /** Represents a VerifyKmsConfigRequest. */ + class VerifyKmsConfigRequest implements IVerifyKmsConfigRequest { + + /** + * Constructs a new VerifyKmsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest); + + /** VerifyKmsConfigRequest name. */ + public name: string; + + /** + * Creates a new VerifyKmsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyKmsConfigRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @param message VerifyKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @param message VerifyKmsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyKmsConfigRequest + * @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.netapp.v1.VerifyKmsConfigRequest; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyKmsConfigRequest + * @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.netapp.v1.VerifyKmsConfigRequest; + + /** + * Verifies a VerifyKmsConfigRequest 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 VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyKmsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigRequest; + + /** + * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. + * @param message VerifyKmsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyKmsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyKmsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyKmsConfigResponse. */ + interface IVerifyKmsConfigResponse { + + /** VerifyKmsConfigResponse healthy */ + healthy?: (boolean|null); + + /** VerifyKmsConfigResponse healthError */ + healthError?: (string|null); + + /** VerifyKmsConfigResponse instructions */ + instructions?: (string|null); + } + + /** Represents a VerifyKmsConfigResponse. */ + class VerifyKmsConfigResponse implements IVerifyKmsConfigResponse { + + /** + * Constructs a new VerifyKmsConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse); + + /** VerifyKmsConfigResponse healthy. */ + public healthy: boolean; + + /** VerifyKmsConfigResponse healthError. */ + public healthError: string; + + /** VerifyKmsConfigResponse instructions. */ + public instructions: string; + + /** + * Creates a new VerifyKmsConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyKmsConfigResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @param message VerifyKmsConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @param message VerifyKmsConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyKmsConfigResponse + * @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.netapp.v1.VerifyKmsConfigResponse; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyKmsConfigResponse + * @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.netapp.v1.VerifyKmsConfigResponse; + + /** + * Verifies a VerifyKmsConfigResponse 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 VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyKmsConfigResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigResponse; + + /** + * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. + * @param message VerifyKmsConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyKmsConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyKmsConfigResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KmsConfig. */ + interface IKmsConfig { + + /** KmsConfig name */ + name?: (string|null); + + /** KmsConfig cryptoKeyName */ + cryptoKeyName?: (string|null); + + /** KmsConfig state */ + state?: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State|null); + + /** KmsConfig stateDetails */ + stateDetails?: (string|null); + + /** KmsConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** KmsConfig description */ + description?: (string|null); + + /** KmsConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** KmsConfig instructions */ + instructions?: (string|null); + + /** KmsConfig serviceAccount */ + serviceAccount?: (string|null); + } + + /** Represents a KmsConfig. */ + class KmsConfig implements IKmsConfig { + + /** + * Constructs a new KmsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IKmsConfig); + + /** KmsConfig name. */ + public name: string; + + /** KmsConfig cryptoKeyName. */ + public cryptoKeyName: string; + + /** KmsConfig state. */ + public state: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State); + + /** KmsConfig stateDetails. */ + public stateDetails: string; + + /** KmsConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** KmsConfig description. */ + public description: string; + + /** KmsConfig labels. */ + public labels: { [k: string]: string }; + + /** KmsConfig instructions. */ + public instructions: string; + + /** KmsConfig serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new KmsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KmsConfig instance + */ + public static create(properties?: google.cloud.netapp.v1.IKmsConfig): google.cloud.netapp.v1.KmsConfig; + + /** + * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KmsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KmsConfig + * @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.netapp.v1.KmsConfig; + + /** + * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KmsConfig + * @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.netapp.v1.KmsConfig; + + /** + * Verifies a KmsConfig 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 KmsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KmsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.KmsConfig; + + /** + * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. + * @param message KmsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.KmsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KmsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KmsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KmsConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + IN_USE = 5, + ERROR = 6, + KEY_CHECK_PENDING = 7, + KEY_NOT_REACHABLE = 8, + DISABLING = 9, + DISABLED = 10, + MIGRATING = 11 + } + } + + /** Properties of an ExecuteOntapPostRequest. */ + interface IExecuteOntapPostRequest { + + /** ExecuteOntapPostRequest body */ + body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPostRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapPostRequest. */ + class ExecuteOntapPostRequest implements IExecuteOntapPostRequest { + + /** + * Constructs a new ExecuteOntapPostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest); + + /** ExecuteOntapPostRequest body. */ + public body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPostRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapPostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPostRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest): google.cloud.netapp.v1.ExecuteOntapPostRequest; + + /** + * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @param message ExecuteOntapPostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @param message ExecuteOntapPostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPostRequest + * @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.netapp.v1.ExecuteOntapPostRequest; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPostRequest + * @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.netapp.v1.ExecuteOntapPostRequest; + + /** + * Verifies an ExecuteOntapPostRequest 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 ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPostRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostRequest; + + /** + * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapPostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapPostResponse. */ + interface IExecuteOntapPostResponse { + + /** ExecuteOntapPostResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapPostResponse. */ + class ExecuteOntapPostResponse implements IExecuteOntapPostResponse { + + /** + * Constructs a new ExecuteOntapPostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse); + + /** ExecuteOntapPostResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapPostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPostResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse): google.cloud.netapp.v1.ExecuteOntapPostResponse; + + /** + * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @param message ExecuteOntapPostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @param message ExecuteOntapPostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPostResponse + * @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.netapp.v1.ExecuteOntapPostResponse; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPostResponse + * @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.netapp.v1.ExecuteOntapPostResponse; + + /** + * Verifies an ExecuteOntapPostResponse 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 ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPostResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostResponse; + + /** + * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapPostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapGetRequest. */ + interface IExecuteOntapGetRequest { + + /** ExecuteOntapGetRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapGetRequest. */ + class ExecuteOntapGetRequest implements IExecuteOntapGetRequest { + + /** + * Constructs a new ExecuteOntapGetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest); + + /** ExecuteOntapGetRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapGetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapGetRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest): google.cloud.netapp.v1.ExecuteOntapGetRequest; + + /** + * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @param message ExecuteOntapGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @param message ExecuteOntapGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapGetRequest + * @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.netapp.v1.ExecuteOntapGetRequest; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapGetRequest + * @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.netapp.v1.ExecuteOntapGetRequest; + + /** + * Verifies an ExecuteOntapGetRequest 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 ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapGetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetRequest; + + /** + * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapGetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapGetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapGetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapGetResponse. */ + interface IExecuteOntapGetResponse { + + /** ExecuteOntapGetResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapGetResponse. */ + class ExecuteOntapGetResponse implements IExecuteOntapGetResponse { + + /** + * Constructs a new ExecuteOntapGetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse); + + /** ExecuteOntapGetResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapGetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapGetResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse): google.cloud.netapp.v1.ExecuteOntapGetResponse; + + /** + * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @param message ExecuteOntapGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @param message ExecuteOntapGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapGetResponse + * @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.netapp.v1.ExecuteOntapGetResponse; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapGetResponse + * @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.netapp.v1.ExecuteOntapGetResponse; + + /** + * Verifies an ExecuteOntapGetResponse 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 ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapGetResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetResponse; + + /** + * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapGetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapGetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapGetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapDeleteRequest. */ + interface IExecuteOntapDeleteRequest { + + /** ExecuteOntapDeleteRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapDeleteRequest. */ + class ExecuteOntapDeleteRequest implements IExecuteOntapDeleteRequest { + + /** + * Constructs a new ExecuteOntapDeleteRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest); + + /** ExecuteOntapDeleteRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapDeleteRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @param message ExecuteOntapDeleteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @param message ExecuteOntapDeleteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapDeleteRequest + * @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.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapDeleteRequest + * @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.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Verifies an ExecuteOntapDeleteRequest 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 ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapDeleteRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapDeleteRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapDeleteRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapDeleteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapDeleteResponse. */ + interface IExecuteOntapDeleteResponse { + + /** ExecuteOntapDeleteResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapDeleteResponse. */ + class ExecuteOntapDeleteResponse implements IExecuteOntapDeleteResponse { + + /** + * Constructs a new ExecuteOntapDeleteResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse); + + /** ExecuteOntapDeleteResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapDeleteResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @param message ExecuteOntapDeleteResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @param message ExecuteOntapDeleteResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapDeleteResponse + * @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.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapDeleteResponse + * @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.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Verifies an ExecuteOntapDeleteResponse 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 ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapDeleteResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapDeleteResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapDeleteResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapDeleteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapPatchRequest. */ + interface IExecuteOntapPatchRequest { + + /** ExecuteOntapPatchRequest body */ + body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPatchRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapPatchRequest. */ + class ExecuteOntapPatchRequest implements IExecuteOntapPatchRequest { + + /** + * Constructs a new ExecuteOntapPatchRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest); + + /** ExecuteOntapPatchRequest body. */ + public body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPatchRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapPatchRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPatchRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest): google.cloud.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @param message ExecuteOntapPatchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @param message ExecuteOntapPatchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPatchRequest + * @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.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPatchRequest + * @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.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Verifies an ExecuteOntapPatchRequest 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 ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPatchRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapPatchRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPatchRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPatchRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapPatchResponse. */ + interface IExecuteOntapPatchResponse { + + /** ExecuteOntapPatchResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapPatchResponse. */ + class ExecuteOntapPatchResponse implements IExecuteOntapPatchResponse { + + /** + * Constructs a new ExecuteOntapPatchResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse); + + /** ExecuteOntapPatchResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapPatchResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPatchResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse): google.cloud.netapp.v1.ExecuteOntapPatchResponse; + + /** + * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @param message ExecuteOntapPatchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @param message ExecuteOntapPatchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPatchResponse + * @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.netapp.v1.ExecuteOntapPatchResponse; + + /** + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPatchResponse + * @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.netapp.v1.ExecuteOntapPatchResponse; + + /** + * Verifies an ExecuteOntapPatchResponse 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 ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPatchResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchResponse; + + /** + * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapPatchResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPatchResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPatchResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQuotaRulesRequest. */ + interface IListQuotaRulesRequest { + + /** ListQuotaRulesRequest parent */ + parent?: (string|null); + + /** ListQuotaRulesRequest pageSize */ + pageSize?: (number|null); + + /** ListQuotaRulesRequest pageToken */ + pageToken?: (string|null); + + /** ListQuotaRulesRequest filter */ + filter?: (string|null); + + /** ListQuotaRulesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListQuotaRulesRequest. */ + class ListQuotaRulesRequest implements IListQuotaRulesRequest { + + /** + * Constructs a new ListQuotaRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListQuotaRulesRequest); + + /** ListQuotaRulesRequest parent. */ + public parent: string; + + /** ListQuotaRulesRequest pageSize. */ + public pageSize: number; + + /** ListQuotaRulesRequest pageToken. */ + public pageToken: string; + + /** ListQuotaRulesRequest filter. */ + public filter: string; + + /** ListQuotaRulesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListQuotaRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQuotaRulesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListQuotaRulesRequest): google.cloud.netapp.v1.ListQuotaRulesRequest; + + /** + * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @param message ListQuotaRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListQuotaRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @param message ListQuotaRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListQuotaRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQuotaRulesRequest + * @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.netapp.v1.ListQuotaRulesRequest; + + /** + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQuotaRulesRequest + * @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.netapp.v1.ListQuotaRulesRequest; + + /** + * Verifies a ListQuotaRulesRequest 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 ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQuotaRulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListQuotaRulesRequest; + + /** + * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. + * @param message ListQuotaRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListQuotaRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQuotaRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQuotaRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQuotaRulesResponse. */ + interface IListQuotaRulesResponse { + + /** ListQuotaRulesResponse quotaRules */ + quotaRules?: (google.cloud.netapp.v1.IQuotaRule[]|null); + + /** ListQuotaRulesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListQuotaRulesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListQuotaRulesResponse. */ + class ListQuotaRulesResponse implements IListQuotaRulesResponse { + + /** + * Constructs a new ListQuotaRulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListQuotaRulesResponse); + + /** ListQuotaRulesResponse quotaRules. */ + public quotaRules: google.cloud.netapp.v1.IQuotaRule[]; + + /** ListQuotaRulesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListQuotaRulesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListQuotaRulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQuotaRulesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListQuotaRulesResponse): google.cloud.netapp.v1.ListQuotaRulesResponse; + + /** + * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * @param message ListQuotaRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListQuotaRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * @param message ListQuotaRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListQuotaRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQuotaRulesResponse + * @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.netapp.v1.ListQuotaRulesResponse; + + /** + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQuotaRulesResponse + * @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.netapp.v1.ListQuotaRulesResponse; + + /** + * Verifies a ListQuotaRulesResponse 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 ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQuotaRulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListQuotaRulesResponse; + + /** + * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. + * @param message ListQuotaRulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListQuotaRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQuotaRulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQuotaRulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetQuotaRuleRequest. */ + interface IGetQuotaRuleRequest { + + /** GetQuotaRuleRequest name */ + name?: (string|null); + } + + /** Represents a GetQuotaRuleRequest. */ + class GetQuotaRuleRequest implements IGetQuotaRuleRequest { + + /** + * Constructs a new GetQuotaRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetQuotaRuleRequest); + + /** GetQuotaRuleRequest name. */ + public name: string; + + /** + * Creates a new GetQuotaRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetQuotaRuleRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetQuotaRuleRequest): google.cloud.netapp.v1.GetQuotaRuleRequest; + + /** + * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * @param message GetQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * @param message GetQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetQuotaRuleRequest + * @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.netapp.v1.GetQuotaRuleRequest; + + /** + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetQuotaRuleRequest + * @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.netapp.v1.GetQuotaRuleRequest; + + /** + * Verifies a GetQuotaRuleRequest 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 GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetQuotaRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetQuotaRuleRequest; + + /** + * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. + * @param message GetQuotaRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetQuotaRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetQuotaRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateQuotaRuleRequest. */ + interface ICreateQuotaRuleRequest { + + /** CreateQuotaRuleRequest parent */ + parent?: (string|null); + + /** CreateQuotaRuleRequest quotaRule */ + quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); + + /** CreateQuotaRuleRequest quotaRuleId */ + quotaRuleId?: (string|null); + } + + /** Represents a CreateQuotaRuleRequest. */ + class CreateQuotaRuleRequest implements ICreateQuotaRuleRequest { + + /** + * Constructs a new CreateQuotaRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateQuotaRuleRequest); + + /** CreateQuotaRuleRequest parent. */ + public parent: string; + + /** CreateQuotaRuleRequest quotaRule. */ + public quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); + + /** CreateQuotaRuleRequest quotaRuleId. */ + public quotaRuleId: string; + + /** + * Creates a new CreateQuotaRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateQuotaRuleRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateQuotaRuleRequest): google.cloud.netapp.v1.CreateQuotaRuleRequest; + + /** + * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * @param message CreateQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * @param message CreateQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateQuotaRuleRequest + * @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.netapp.v1.CreateQuotaRuleRequest; + + /** + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateQuotaRuleRequest + * @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.netapp.v1.CreateQuotaRuleRequest; + + /** + * Verifies a CreateQuotaRuleRequest 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 CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateQuotaRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateQuotaRuleRequest; + + /** + * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. + * @param message CreateQuotaRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateQuotaRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateQuotaRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateQuotaRuleRequest. */ + interface IUpdateQuotaRuleRequest { + + /** UpdateQuotaRuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateQuotaRuleRequest quotaRule */ + quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); + } + + /** Represents an UpdateQuotaRuleRequest. */ + class UpdateQuotaRuleRequest implements IUpdateQuotaRuleRequest { + + /** + * Constructs a new UpdateQuotaRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateQuotaRuleRequest); + + /** UpdateQuotaRuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateQuotaRuleRequest quotaRule. */ + public quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); + + /** + * Creates a new UpdateQuotaRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateQuotaRuleRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateQuotaRuleRequest): google.cloud.netapp.v1.UpdateQuotaRuleRequest; + + /** + * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * @param message UpdateQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * @param message UpdateQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateQuotaRuleRequest + * @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.netapp.v1.UpdateQuotaRuleRequest; + + /** + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateQuotaRuleRequest + * @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.netapp.v1.UpdateQuotaRuleRequest; + + /** + * Verifies an UpdateQuotaRuleRequest 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 UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateQuotaRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateQuotaRuleRequest; + + /** + * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. + * @param message UpdateQuotaRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateQuotaRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateQuotaRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteQuotaRuleRequest. */ + interface IDeleteQuotaRuleRequest { + + /** DeleteQuotaRuleRequest name */ + name?: (string|null); + } + + /** Represents a DeleteQuotaRuleRequest. */ + class DeleteQuotaRuleRequest implements IDeleteQuotaRuleRequest { + + /** + * Constructs a new DeleteQuotaRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteQuotaRuleRequest); + + /** DeleteQuotaRuleRequest name. */ + public name: string; + + /** + * Creates a new DeleteQuotaRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteQuotaRuleRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteQuotaRuleRequest): google.cloud.netapp.v1.DeleteQuotaRuleRequest; + + /** + * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * @param message DeleteQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * @param message DeleteQuotaRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteQuotaRuleRequest + * @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.netapp.v1.DeleteQuotaRuleRequest; + + /** + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteQuotaRuleRequest + * @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.netapp.v1.DeleteQuotaRuleRequest; + + /** + * Verifies a DeleteQuotaRuleRequest 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 DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteQuotaRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteQuotaRuleRequest; + + /** + * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. + * @param message DeleteQuotaRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteQuotaRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteQuotaRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaRule. */ + interface IQuotaRule { + + /** QuotaRule name */ + name?: (string|null); + + /** QuotaRule target */ + target?: (string|null); + + /** QuotaRule type */ + type?: (google.cloud.netapp.v1.QuotaRule.Type|keyof typeof google.cloud.netapp.v1.QuotaRule.Type|null); + + /** QuotaRule diskLimitMib */ + diskLimitMib?: (number|null); + + /** QuotaRule state */ + state?: (google.cloud.netapp.v1.QuotaRule.State|keyof typeof google.cloud.netapp.v1.QuotaRule.State|null); + + /** QuotaRule stateDetails */ + stateDetails?: (string|null); + + /** QuotaRule createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** QuotaRule description */ + description?: (string|null); + + /** QuotaRule labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a QuotaRule. */ + class QuotaRule implements IQuotaRule { + + /** + * Constructs a new QuotaRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IQuotaRule); + + /** QuotaRule name. */ + public name: string; + + /** QuotaRule target. */ + public target: string; + + /** QuotaRule type. */ + public type: (google.cloud.netapp.v1.QuotaRule.Type|keyof typeof google.cloud.netapp.v1.QuotaRule.Type); + + /** QuotaRule diskLimitMib. */ + public diskLimitMib: number; + + /** QuotaRule state. */ + public state: (google.cloud.netapp.v1.QuotaRule.State|keyof typeof google.cloud.netapp.v1.QuotaRule.State); + + /** QuotaRule stateDetails. */ + public stateDetails: string; + + /** QuotaRule createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** QuotaRule description. */ + public description: string; + + /** QuotaRule labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new QuotaRule instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaRule instance + */ + public static create(properties?: google.cloud.netapp.v1.IQuotaRule): google.cloud.netapp.v1.QuotaRule; + + /** + * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * @param message QuotaRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IQuotaRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * @param message QuotaRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IQuotaRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaRule + * @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.netapp.v1.QuotaRule; + + /** + * Decodes a QuotaRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaRule + * @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.netapp.v1.QuotaRule; + + /** + * Verifies a QuotaRule 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 QuotaRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.QuotaRule; + + /** + * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. + * @param message QuotaRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.QuotaRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QuotaRule { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INDIVIDUAL_USER_QUOTA = 1, + INDIVIDUAL_GROUP_QUOTA = 2, + DEFAULT_USER_QUOTA = 3, + DEFAULT_GROUP_QUOTA = 4 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + UPDATING = 2, + DELETING = 3, + READY = 4, + ERROR = 5 + } + } + + /** Properties of a TransferStats. */ + interface ITransferStats { + + /** TransferStats transferBytes */ + transferBytes?: (number|Long|string|null); + + /** TransferStats totalTransferDuration */ + totalTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lastTransferBytes */ + lastTransferBytes?: (number|Long|string|null); + + /** TransferStats lastTransferDuration */ + lastTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lagDuration */ + lagDuration?: (google.protobuf.IDuration|null); + + /** TransferStats updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferEndTime */ + lastTransferEndTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferError */ + lastTransferError?: (string|null); + } + + /** Represents a TransferStats. */ + class TransferStats implements ITransferStats { + + /** + * Constructs a new TransferStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ITransferStats); + + /** TransferStats transferBytes. */ + public transferBytes?: (number|Long|string|null); + + /** TransferStats totalTransferDuration. */ + public totalTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lastTransferBytes. */ + public lastTransferBytes?: (number|Long|string|null); + + /** TransferStats lastTransferDuration. */ + public lastTransferDuration?: (google.protobuf.IDuration|null); + + /** TransferStats lagDuration. */ + public lagDuration?: (google.protobuf.IDuration|null); + + /** TransferStats updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferEndTime. */ + public lastTransferEndTime?: (google.protobuf.ITimestamp|null); + + /** TransferStats lastTransferError. */ + public lastTransferError?: (string|null); + + /** + * Creates a new TransferStats instance using the specified properties. + * @param [properties] Properties to set + * @returns TransferStats instance + */ + public static create(properties?: google.cloud.netapp.v1.ITransferStats): google.cloud.netapp.v1.TransferStats; + + /** + * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @param message TransferStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @param message TransferStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransferStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransferStats + * @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.netapp.v1.TransferStats; + + /** + * Decodes a TransferStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransferStats + * @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.netapp.v1.TransferStats; + + /** + * Verifies a TransferStats 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 TransferStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransferStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.TransferStats; + + /** + * Creates a plain object from a TransferStats message. Also converts values to other types if specified. + * @param message TransferStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.TransferStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransferStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransferStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Replication. */ + interface IReplication { + + /** Replication name */ + name?: (string|null); + + /** Replication state */ + state?: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State|null); + + /** Replication stateDetails */ + stateDetails?: (string|null); + + /** Replication role */ + role?: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole|null); + + /** Replication replicationSchedule */ + replicationSchedule?: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule|null); + + /** Replication mirrorState */ + mirrorState?: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState|null); + + /** Replication healthy */ + healthy?: (boolean|null); + + /** Replication createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Replication destinationVolume */ + destinationVolume?: (string|null); + + /** Replication transferStats */ + transferStats?: (google.cloud.netapp.v1.ITransferStats|null); + + /** Replication labels */ + labels?: ({ [k: string]: string }|null); + + /** Replication description */ + description?: (string|null); + + /** Replication destinationVolumeParameters */ + destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); + + /** Replication sourceVolume */ + sourceVolume?: (string|null); + + /** Replication hybridPeeringDetails */ + hybridPeeringDetails?: (google.cloud.netapp.v1.IHybridPeeringDetails|null); + + /** Replication clusterLocation */ + clusterLocation?: (string|null); + + /** Replication hybridReplicationType */ + hybridReplicationType?: (google.cloud.netapp.v1.Replication.HybridReplicationType|keyof typeof google.cloud.netapp.v1.Replication.HybridReplicationType|null); + + /** Replication hybridReplicationUserCommands */ + hybridReplicationUserCommands?: (google.cloud.netapp.v1.IUserCommands|null); + } + + /** Represents a Replication. */ + class Replication implements IReplication { + + /** + * Constructs a new Replication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IReplication); + + /** Replication name. */ + public name: string; + + /** Replication state. */ + public state: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State); + + /** Replication stateDetails. */ + public stateDetails: string; + + /** Replication role. */ + public role: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole); + + /** Replication replicationSchedule. */ + public replicationSchedule: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule); + + /** Replication mirrorState. */ + public mirrorState: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState); + + /** Replication healthy. */ + public healthy?: (boolean|null); + + /** Replication createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Replication destinationVolume. */ + public destinationVolume: string; + + /** Replication transferStats. */ + public transferStats?: (google.cloud.netapp.v1.ITransferStats|null); + + /** Replication labels. */ + public labels: { [k: string]: string }; + + /** Replication description. */ + public description?: (string|null); + + /** Replication destinationVolumeParameters. */ + public destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); + + /** Replication sourceVolume. */ + public sourceVolume: string; + + /** Replication hybridPeeringDetails. */ + public hybridPeeringDetails?: (google.cloud.netapp.v1.IHybridPeeringDetails|null); + + /** Replication clusterLocation. */ + public clusterLocation: string; + + /** Replication hybridReplicationType. */ + public hybridReplicationType: (google.cloud.netapp.v1.Replication.HybridReplicationType|keyof typeof google.cloud.netapp.v1.Replication.HybridReplicationType); + + /** Replication hybridReplicationUserCommands. */ + public hybridReplicationUserCommands?: (google.cloud.netapp.v1.IUserCommands|null); + + /** + * Creates a new Replication instance using the specified properties. + * @param [properties] Properties to set + * @returns Replication instance + */ + public static create(properties?: google.cloud.netapp.v1.IReplication): google.cloud.netapp.v1.Replication; + + /** + * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @param message Replication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @param message Replication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Replication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Replication + * @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.netapp.v1.Replication; + + /** + * Decodes a Replication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Replication + * @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.netapp.v1.Replication; + + /** + * Verifies a Replication 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 Replication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Replication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Replication; + + /** + * Creates a plain object from a Replication message. Also converts values to other types if specified. + * @param message Replication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Replication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Replication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Replication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Replication { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 5, + ERROR = 6, + PENDING_CLUSTER_PEERING = 8, + PENDING_SVM_PEERING = 9, + PENDING_REMOTE_RESYNC = 10, + EXTERNALLY_MANAGED_REPLICATION = 11 + } + + /** ReplicationRole enum. */ + enum ReplicationRole { + REPLICATION_ROLE_UNSPECIFIED = 0, + SOURCE = 1, + DESTINATION = 2 + } + + /** ReplicationSchedule enum. */ + enum ReplicationSchedule { + REPLICATION_SCHEDULE_UNSPECIFIED = 0, + EVERY_10_MINUTES = 1, + HOURLY = 2, + DAILY = 3 + } + + /** MirrorState enum. */ + enum MirrorState { + MIRROR_STATE_UNSPECIFIED = 0, + PREPARING = 1, + MIRRORED = 2, + STOPPED = 3, + TRANSFERRING = 4, + BASELINE_TRANSFERRING = 5, + ABORTED = 6, + EXTERNALLY_MANAGED = 7, + PENDING_PEERING = 8 + } + + /** HybridReplicationType enum. */ + enum HybridReplicationType { + HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0, + MIGRATION = 1, + CONTINUOUS_REPLICATION = 2, + ONPREM_REPLICATION = 3, + REVERSE_ONPREM_REPLICATION = 4 + } + } + + /** Properties of a HybridPeeringDetails. */ + interface IHybridPeeringDetails { + + /** HybridPeeringDetails subnetIp */ + subnetIp?: (string|null); + + /** HybridPeeringDetails command */ + command?: (string|null); + + /** HybridPeeringDetails commandExpiryTime */ + commandExpiryTime?: (google.protobuf.ITimestamp|null); + + /** HybridPeeringDetails passphrase */ + passphrase?: (string|null); + + /** HybridPeeringDetails peerVolumeName */ + peerVolumeName?: (string|null); + + /** HybridPeeringDetails peerClusterName */ + peerClusterName?: (string|null); + + /** HybridPeeringDetails peerSvmName */ + peerSvmName?: (string|null); + } + + /** Represents a HybridPeeringDetails. */ + class HybridPeeringDetails implements IHybridPeeringDetails { + + /** + * Constructs a new HybridPeeringDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IHybridPeeringDetails); + + /** HybridPeeringDetails subnetIp. */ + public subnetIp: string; + + /** HybridPeeringDetails command. */ + public command: string; + + /** HybridPeeringDetails commandExpiryTime. */ + public commandExpiryTime?: (google.protobuf.ITimestamp|null); + + /** HybridPeeringDetails passphrase. */ + public passphrase: string; + + /** HybridPeeringDetails peerVolumeName. */ + public peerVolumeName: string; + + /** HybridPeeringDetails peerClusterName. */ + public peerClusterName: string; + + /** HybridPeeringDetails peerSvmName. */ + public peerSvmName: string; + + /** + * Creates a new HybridPeeringDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridPeeringDetails instance + */ + public static create(properties?: google.cloud.netapp.v1.IHybridPeeringDetails): google.cloud.netapp.v1.HybridPeeringDetails; + + /** + * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * @param message HybridPeeringDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IHybridPeeringDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * @param message HybridPeeringDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IHybridPeeringDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridPeeringDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridPeeringDetails + * @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.netapp.v1.HybridPeeringDetails; + + /** + * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridPeeringDetails + * @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.netapp.v1.HybridPeeringDetails; + + /** + * Verifies a HybridPeeringDetails 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 HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridPeeringDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HybridPeeringDetails; + + /** + * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. + * @param message HybridPeeringDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.HybridPeeringDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridPeeringDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridPeeringDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReplicationsRequest. */ + interface IListReplicationsRequest { + + /** ListReplicationsRequest parent */ + parent?: (string|null); + + /** ListReplicationsRequest pageSize */ + pageSize?: (number|null); + + /** ListReplicationsRequest pageToken */ + pageToken?: (string|null); + + /** ListReplicationsRequest orderBy */ + orderBy?: (string|null); + + /** ListReplicationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListReplicationsRequest. */ + class ListReplicationsRequest implements IListReplicationsRequest { + + /** + * Constructs a new ListReplicationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListReplicationsRequest); + + /** ListReplicationsRequest parent. */ + public parent: string; + + /** ListReplicationsRequest pageSize. */ + public pageSize: number; + + /** ListReplicationsRequest pageToken. */ + public pageToken: string; + + /** ListReplicationsRequest orderBy. */ + public orderBy: string; + + /** ListReplicationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListReplicationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReplicationsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListReplicationsRequest): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @param message ListReplicationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @param message ListReplicationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReplicationsRequest + * @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.netapp.v1.ListReplicationsRequest; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReplicationsRequest + * @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.netapp.v1.ListReplicationsRequest; + + /** + * Verifies a ListReplicationsRequest 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 ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReplicationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsRequest; + + /** + * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. + * @param message ListReplicationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListReplicationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReplicationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReplicationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReplicationsResponse. */ + interface IListReplicationsResponse { + + /** ListReplicationsResponse replications */ + replications?: (google.cloud.netapp.v1.IReplication[]|null); + + /** ListReplicationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReplicationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReplicationsResponse. */ + class ListReplicationsResponse implements IListReplicationsResponse { + + /** + * Constructs a new ListReplicationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListReplicationsResponse); + + /** ListReplicationsResponse replications. */ + public replications: google.cloud.netapp.v1.IReplication[]; + + /** ListReplicationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReplicationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReplicationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReplicationsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListReplicationsResponse): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @param message ListReplicationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @param message ListReplicationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReplicationsResponse + * @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.netapp.v1.ListReplicationsResponse; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReplicationsResponse + * @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.netapp.v1.ListReplicationsResponse; + + /** + * Verifies a ListReplicationsResponse 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 ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReplicationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsResponse; + + /** + * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. + * @param message ListReplicationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListReplicationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReplicationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReplicationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReplicationRequest. */ + interface IGetReplicationRequest { + + /** GetReplicationRequest name */ + name?: (string|null); + } + + /** Represents a GetReplicationRequest. */ + class GetReplicationRequest implements IGetReplicationRequest { + + /** + * Constructs a new GetReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetReplicationRequest); + + /** GetReplicationRequest name. */ + public name: string; + + /** + * Creates a new GetReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetReplicationRequest): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @param message GetReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @param message GetReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReplicationRequest + * @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.netapp.v1.GetReplicationRequest; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReplicationRequest + * @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.netapp.v1.GetReplicationRequest; + + /** + * Verifies a GetReplicationRequest 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 GetReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetReplicationRequest; + + /** + * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. + * @param message GetReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DestinationVolumeParameters. */ + interface IDestinationVolumeParameters { + + /** DestinationVolumeParameters storagePool */ + storagePool?: (string|null); + + /** DestinationVolumeParameters volumeId */ + volumeId?: (string|null); + + /** DestinationVolumeParameters shareName */ + shareName?: (string|null); + + /** DestinationVolumeParameters description */ + description?: (string|null); + + /** DestinationVolumeParameters tieringPolicy */ + tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); + } + + /** Represents a DestinationVolumeParameters. */ + class DestinationVolumeParameters implements IDestinationVolumeParameters { + + /** + * Constructs a new DestinationVolumeParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters); + + /** DestinationVolumeParameters storagePool. */ + public storagePool: string; + + /** DestinationVolumeParameters volumeId. */ + public volumeId: string; + + /** DestinationVolumeParameters shareName. */ + public shareName: string; + + /** DestinationVolumeParameters description. */ + public description?: (string|null); + + /** DestinationVolumeParameters tieringPolicy. */ + public tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); + + /** + * Creates a new DestinationVolumeParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns DestinationVolumeParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @param message DestinationVolumeParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @param message DestinationVolumeParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DestinationVolumeParameters + * @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.netapp.v1.DestinationVolumeParameters; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DestinationVolumeParameters + * @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.netapp.v1.DestinationVolumeParameters; + + /** + * Verifies a DestinationVolumeParameters 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 DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DestinationVolumeParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DestinationVolumeParameters; + + /** + * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. + * @param message DestinationVolumeParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DestinationVolumeParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DestinationVolumeParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DestinationVolumeParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateReplicationRequest. */ + interface ICreateReplicationRequest { + + /** CreateReplicationRequest parent */ + parent?: (string|null); + + /** CreateReplicationRequest replication */ + replication?: (google.cloud.netapp.v1.IReplication|null); + + /** CreateReplicationRequest replicationId */ + replicationId?: (string|null); + } + + /** Represents a CreateReplicationRequest. */ + class CreateReplicationRequest implements ICreateReplicationRequest { + + /** + * Constructs a new CreateReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateReplicationRequest); + + /** CreateReplicationRequest parent. */ + public parent: string; + + /** CreateReplicationRequest replication. */ + public replication?: (google.cloud.netapp.v1.IReplication|null); + + /** CreateReplicationRequest replicationId. */ + public replicationId: string; + + /** + * Creates a new CreateReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateReplicationRequest): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @param message CreateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @param message CreateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReplicationRequest + * @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.netapp.v1.CreateReplicationRequest; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReplicationRequest + * @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.netapp.v1.CreateReplicationRequest; + + /** + * Verifies a CreateReplicationRequest 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 CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateReplicationRequest; + + /** + * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. + * @param message CreateReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteReplicationRequest. */ + interface IDeleteReplicationRequest { + + /** DeleteReplicationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteReplicationRequest. */ + class DeleteReplicationRequest implements IDeleteReplicationRequest { + + /** + * Constructs a new DeleteReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest); + + /** DeleteReplicationRequest name. */ + public name: string; + + /** + * Creates a new DeleteReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @param message DeleteReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @param message DeleteReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteReplicationRequest + * @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.netapp.v1.DeleteReplicationRequest; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteReplicationRequest + * @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.netapp.v1.DeleteReplicationRequest; + + /** + * Verifies a DeleteReplicationRequest 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 DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteReplicationRequest; + + /** + * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. + * @param message DeleteReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateReplicationRequest. */ + interface IUpdateReplicationRequest { + + /** UpdateReplicationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReplicationRequest replication */ + replication?: (google.cloud.netapp.v1.IReplication|null); + } + + /** Represents an UpdateReplicationRequest. */ + class UpdateReplicationRequest implements IUpdateReplicationRequest { + + /** + * Constructs a new UpdateReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest); + + /** UpdateReplicationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReplicationRequest replication. */ + public replication?: (google.cloud.netapp.v1.IReplication|null); + + /** + * Creates a new UpdateReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @param message UpdateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @param message UpdateReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateReplicationRequest + * @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.netapp.v1.UpdateReplicationRequest; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateReplicationRequest + * @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.netapp.v1.UpdateReplicationRequest; + + /** + * Verifies an UpdateReplicationRequest 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 UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateReplicationRequest; + + /** + * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. + * @param message UpdateReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopReplicationRequest. */ + interface IStopReplicationRequest { + + /** StopReplicationRequest name */ + name?: (string|null); + + /** StopReplicationRequest force */ + force?: (boolean|null); + } + + /** Represents a StopReplicationRequest. */ + class StopReplicationRequest implements IStopReplicationRequest { + + /** + * Constructs a new StopReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IStopReplicationRequest); + + /** StopReplicationRequest name. */ + public name: string; + + /** StopReplicationRequest force. */ + public force: boolean; + + /** + * Creates a new StopReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IStopReplicationRequest): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @param message StopReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopReplicationRequest + * @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.netapp.v1.StopReplicationRequest; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopReplicationRequest + * @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.netapp.v1.StopReplicationRequest; + + /** + * Verifies a StopReplicationRequest 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 StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StopReplicationRequest; + + /** + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * @param message StopReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResumeReplicationRequest. */ + interface IResumeReplicationRequest { + + /** ResumeReplicationRequest name */ + name?: (string|null); + } + + /** Represents a ResumeReplicationRequest. */ + class ResumeReplicationRequest implements IResumeReplicationRequest { + + /** + * Constructs a new ResumeReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IResumeReplicationRequest); + + /** ResumeReplicationRequest name. */ + public name: string; + + /** + * Creates a new ResumeReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResumeReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IResumeReplicationRequest): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @param message ResumeReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @param message ResumeReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResumeReplicationRequest + * @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.netapp.v1.ResumeReplicationRequest; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResumeReplicationRequest + * @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.netapp.v1.ResumeReplicationRequest; + + /** + * Verifies a ResumeReplicationRequest 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 ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResumeReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ResumeReplicationRequest; + + /** + * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. + * @param message ResumeReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ResumeReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResumeReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResumeReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReverseReplicationDirectionRequest. */ + interface IReverseReplicationDirectionRequest { + + /** ReverseReplicationDirectionRequest name */ + name?: (string|null); + } + + /** Represents a ReverseReplicationDirectionRequest. */ + class ReverseReplicationDirectionRequest implements IReverseReplicationDirectionRequest { + + /** + * Constructs a new ReverseReplicationDirectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest); + + /** ReverseReplicationDirectionRequest name. */ + public name: string; + + /** + * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReverseReplicationDirectionRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @param message ReverseReplicationDirectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @param message ReverseReplicationDirectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReverseReplicationDirectionRequest + * @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.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReverseReplicationDirectionRequest + * @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.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Verifies a ReverseReplicationDirectionRequest 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 ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReverseReplicationDirectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; + + /** + * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. + * @param message ReverseReplicationDirectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ReverseReplicationDirectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReverseReplicationDirectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReverseReplicationDirectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EstablishPeeringRequest. */ + interface IEstablishPeeringRequest { + + /** EstablishPeeringRequest name */ + name?: (string|null); + + /** EstablishPeeringRequest peerClusterName */ + peerClusterName?: (string|null); + + /** EstablishPeeringRequest peerSvmName */ + peerSvmName?: (string|null); + + /** EstablishPeeringRequest peerIpAddresses */ + peerIpAddresses?: (string[]|null); + + /** EstablishPeeringRequest peerVolumeName */ + peerVolumeName?: (string|null); + } + + /** Represents an EstablishPeeringRequest. */ + class EstablishPeeringRequest implements IEstablishPeeringRequest { + + /** + * Constructs a new EstablishPeeringRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IEstablishPeeringRequest); + + /** EstablishPeeringRequest name. */ + public name: string; + + /** EstablishPeeringRequest peerClusterName. */ + public peerClusterName: string; + + /** EstablishPeeringRequest peerSvmName. */ + public peerSvmName: string; + + /** EstablishPeeringRequest peerIpAddresses. */ + public peerIpAddresses: string[]; + + /** EstablishPeeringRequest peerVolumeName. */ + public peerVolumeName: string; + + /** + * Creates a new EstablishPeeringRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EstablishPeeringRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IEstablishPeeringRequest): google.cloud.netapp.v1.EstablishPeeringRequest; + + /** + * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * @param message EstablishPeeringRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IEstablishPeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * @param message EstablishPeeringRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IEstablishPeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EstablishPeeringRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EstablishPeeringRequest + * @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.netapp.v1.EstablishPeeringRequest; + + /** + * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EstablishPeeringRequest + * @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.netapp.v1.EstablishPeeringRequest; + + /** + * Verifies an EstablishPeeringRequest 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 EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EstablishPeeringRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EstablishPeeringRequest; + + /** + * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. + * @param message EstablishPeeringRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.EstablishPeeringRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EstablishPeeringRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EstablishPeeringRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SyncReplicationRequest. */ + interface ISyncReplicationRequest { + + /** SyncReplicationRequest name */ + name?: (string|null); + } + + /** Represents a SyncReplicationRequest. */ + class SyncReplicationRequest implements ISyncReplicationRequest { + + /** + * Constructs a new SyncReplicationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISyncReplicationRequest); + + /** SyncReplicationRequest name. */ + public name: string; + + /** + * Creates a new SyncReplicationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncReplicationRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ISyncReplicationRequest): google.cloud.netapp.v1.SyncReplicationRequest; + + /** + * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @param message SyncReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISyncReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @param message SyncReplicationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISyncReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncReplicationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncReplicationRequest + * @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.netapp.v1.SyncReplicationRequest; + + /** + * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncReplicationRequest + * @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.netapp.v1.SyncReplicationRequest; + + /** + * Verifies a SyncReplicationRequest 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 SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncReplicationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SyncReplicationRequest; + + /** + * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. + * @param message SyncReplicationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SyncReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncReplicationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncReplicationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Protocols enum. */ + enum Protocols { + PROTOCOLS_UNSPECIFIED = 0, + NFSV3 = 1, + NFSV4 = 2, + SMB = 3, + ISCSI = 4 + } + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + READ_ONLY = 1, + READ_WRITE = 2, + READ_NONE = 3 + } + + /** SMBSettings enum. */ + enum SMBSettings { + SMB_SETTINGS_UNSPECIFIED = 0, + ENCRYPT_DATA = 1, + BROWSABLE = 2, + CHANGE_NOTIFY = 3, + NON_BROWSABLE = 4, + OPLOCKS = 5, + SHOW_SNAPSHOT = 6, + SHOW_PREVIOUS_VERSIONS = 7, + ACCESS_BASED_ENUMERATION = 8, + CONTINUOUSLY_AVAILABLE = 9 + } + + /** SecurityStyle enum. */ + enum SecurityStyle { + SECURITY_STYLE_UNSPECIFIED = 0, + NTFS = 1, + UNIX = 2 + } + + /** RestrictedAction enum. */ + enum RestrictedAction { + RESTRICTED_ACTION_UNSPECIFIED = 0, + DELETE = 1 + } + + /** Properties of a ListVolumesRequest. */ + interface IListVolumesRequest { + + /** ListVolumesRequest parent */ + parent?: (string|null); + + /** ListVolumesRequest pageSize */ + pageSize?: (number|null); + + /** ListVolumesRequest pageToken */ + pageToken?: (string|null); + + /** ListVolumesRequest filter */ + filter?: (string|null); + + /** ListVolumesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVolumesRequest. */ + class ListVolumesRequest implements IListVolumesRequest { + + /** + * Constructs a new ListVolumesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListVolumesRequest); + + /** ListVolumesRequest parent. */ + public parent: string; + + /** ListVolumesRequest pageSize. */ + public pageSize: number; + + /** ListVolumesRequest pageToken. */ + public pageToken: string; + + /** ListVolumesRequest filter. */ + public filter: string; + + /** ListVolumesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListVolumesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVolumesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListVolumesRequest): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @param message ListVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @param message ListVolumesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVolumesRequest + * @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.netapp.v1.ListVolumesRequest; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVolumesRequest + * @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.netapp.v1.ListVolumesRequest; + + /** + * Verifies a ListVolumesRequest 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 ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVolumesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesRequest; + + /** + * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * @param message ListVolumesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVolumesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVolumesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVolumesResponse. */ + interface IListVolumesResponse { + + /** ListVolumesResponse volumes */ + volumes?: (google.cloud.netapp.v1.IVolume[]|null); + + /** ListVolumesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListVolumesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListVolumesResponse. */ + class ListVolumesResponse implements IListVolumesResponse { + + /** + * Constructs a new ListVolumesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListVolumesResponse); + + /** ListVolumesResponse volumes. */ + public volumes: google.cloud.netapp.v1.IVolume[]; + + /** ListVolumesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListVolumesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListVolumesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVolumesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListVolumesResponse): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @param message ListVolumesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @param message ListVolumesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVolumesResponse + * @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.netapp.v1.ListVolumesResponse; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVolumesResponse + * @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.netapp.v1.ListVolumesResponse; + + /** + * Verifies a ListVolumesResponse 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 ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVolumesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesResponse; + + /** + * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * @param message ListVolumesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListVolumesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVolumesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVolumesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVolumeRequest. */ + interface IGetVolumeRequest { + + /** GetVolumeRequest name */ + name?: (string|null); + } + + /** Represents a GetVolumeRequest. */ + class GetVolumeRequest implements IGetVolumeRequest { + + /** + * Constructs a new GetVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetVolumeRequest); + + /** GetVolumeRequest name. */ + public name: string; + + /** + * Creates a new GetVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetVolumeRequest): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @param message GetVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @param message GetVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVolumeRequest + * @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.netapp.v1.GetVolumeRequest; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVolumeRequest + * @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.netapp.v1.GetVolumeRequest; + + /** + * Verifies a GetVolumeRequest 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 GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetVolumeRequest; + + /** + * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * @param message GetVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVolumeRequest. */ + interface ICreateVolumeRequest { + + /** CreateVolumeRequest parent */ + parent?: (string|null); + + /** CreateVolumeRequest volumeId */ + volumeId?: (string|null); + + /** CreateVolumeRequest volume */ + volume?: (google.cloud.netapp.v1.IVolume|null); + } + + /** Represents a CreateVolumeRequest. */ + class CreateVolumeRequest implements ICreateVolumeRequest { + + /** + * Constructs a new CreateVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateVolumeRequest); + + /** CreateVolumeRequest parent. */ + public parent: string; + + /** CreateVolumeRequest volumeId. */ + public volumeId: string; + + /** CreateVolumeRequest volume. */ + public volume?: (google.cloud.netapp.v1.IVolume|null); + + /** + * Creates a new CreateVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateVolumeRequest): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @param message CreateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @param message CreateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVolumeRequest + * @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.netapp.v1.CreateVolumeRequest; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVolumeRequest + * @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.netapp.v1.CreateVolumeRequest; + + /** + * Verifies a CreateVolumeRequest 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 CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateVolumeRequest; + + /** + * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * @param message CreateVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVolumeRequest. */ + interface IUpdateVolumeRequest { + + /** UpdateVolumeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVolumeRequest volume */ + volume?: (google.cloud.netapp.v1.IVolume|null); + } + + /** Represents an UpdateVolumeRequest. */ + class UpdateVolumeRequest implements IUpdateVolumeRequest { + + /** + * Constructs a new UpdateVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest); + + /** UpdateVolumeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVolumeRequest volume. */ + public volume?: (google.cloud.netapp.v1.IVolume|null); + + /** + * Creates a new UpdateVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @param message UpdateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @param message UpdateVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVolumeRequest + * @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.netapp.v1.UpdateVolumeRequest; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVolumeRequest + * @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.netapp.v1.UpdateVolumeRequest; + + /** + * Verifies an UpdateVolumeRequest 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 UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateVolumeRequest; + + /** + * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * @param message UpdateVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVolumeRequest. */ + interface IDeleteVolumeRequest { + + /** DeleteVolumeRequest name */ + name?: (string|null); + + /** DeleteVolumeRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteVolumeRequest. */ + class DeleteVolumeRequest implements IDeleteVolumeRequest { + + /** + * Constructs a new DeleteVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest); + + /** DeleteVolumeRequest name. */ + public name: string; + + /** DeleteVolumeRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @param message DeleteVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @param message DeleteVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVolumeRequest + * @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.netapp.v1.DeleteVolumeRequest; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVolumeRequest + * @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.netapp.v1.DeleteVolumeRequest; + + /** + * Verifies a DeleteVolumeRequest 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 DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteVolumeRequest; + + /** + * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * @param message DeleteVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RevertVolumeRequest. */ + interface IRevertVolumeRequest { + + /** RevertVolumeRequest name */ + name?: (string|null); + + /** RevertVolumeRequest snapshotId */ + snapshotId?: (string|null); + } + + /** Represents a RevertVolumeRequest. */ + class RevertVolumeRequest implements IRevertVolumeRequest { + + /** + * Constructs a new RevertVolumeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRevertVolumeRequest); + + /** RevertVolumeRequest name. */ + public name: string; + + /** RevertVolumeRequest snapshotId. */ + public snapshotId: string; + + /** + * Creates a new RevertVolumeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RevertVolumeRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IRevertVolumeRequest): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @param message RevertVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @param message RevertVolumeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevertVolumeRequest + * @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.netapp.v1.RevertVolumeRequest; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevertVolumeRequest + * @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.netapp.v1.RevertVolumeRequest; + + /** + * Verifies a RevertVolumeRequest 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 RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevertVolumeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RevertVolumeRequest; + + /** + * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * @param message RevertVolumeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RevertVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevertVolumeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevertVolumeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Volume. */ + interface IVolume { + + /** Volume name */ + name?: (string|null); + + /** Volume state */ + state?: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State|null); + + /** Volume stateDetails */ + stateDetails?: (string|null); + + /** Volume createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Volume shareName */ + shareName?: (string|null); + + /** Volume psaRange */ + psaRange?: (string|null); + + /** Volume storagePool */ + storagePool?: (string|null); + + /** Volume network */ + network?: (string|null); + + /** Volume serviceLevel */ + serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); + + /** Volume capacityGib */ + capacityGib?: (number|Long|string|null); + + /** Volume exportPolicy */ + exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); + + /** Volume protocols */ + protocols?: (google.cloud.netapp.v1.Protocols[]|null); + + /** Volume smbSettings */ + smbSettings?: (google.cloud.netapp.v1.SMBSettings[]|null); + + /** Volume mountOptions */ + mountOptions?: (google.cloud.netapp.v1.IMountOption[]|null); + + /** Volume unixPermissions */ + unixPermissions?: (string|null); + + /** Volume labels */ + labels?: ({ [k: string]: string }|null); + + /** Volume description */ + description?: (string|null); + + /** Volume snapshotPolicy */ + snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); + + /** Volume snapReserve */ + snapReserve?: (number|null); + + /** Volume snapshotDirectory */ + snapshotDirectory?: (boolean|null); + + /** Volume usedGib */ + usedGib?: (number|Long|string|null); + + /** Volume securityStyle */ + securityStyle?: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle|null); + + /** Volume kerberosEnabled */ + kerberosEnabled?: (boolean|null); + + /** Volume ldapEnabled */ + ldapEnabled?: (boolean|null); + + /** Volume activeDirectory */ + activeDirectory?: (string|null); + + /** Volume restoreParameters */ + restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); + + /** Volume kmsConfig */ + kmsConfig?: (string|null); + + /** Volume encryptionType */ + encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); + + /** Volume hasReplication */ + hasReplication?: (boolean|null); + + /** Volume backupConfig */ + backupConfig?: (google.cloud.netapp.v1.IBackupConfig|null); + + /** Volume restrictedActions */ + restrictedActions?: (google.cloud.netapp.v1.RestrictedAction[]|null); + + /** Volume largeCapacity */ + largeCapacity?: (boolean|null); + + /** Volume multipleEndpoints */ + multipleEndpoints?: (boolean|null); + + /** Volume tieringPolicy */ + tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); + + /** Volume replicaZone */ + replicaZone?: (string|null); + + /** Volume zone */ + zone?: (string|null); + + /** Volume coldTierSizeGib */ + coldTierSizeGib?: (number|Long|string|null); + + /** Volume hybridReplicationParameters */ + hybridReplicationParameters?: (google.cloud.netapp.v1.IHybridReplicationParameters|null); + + /** Volume throughputMibps */ + throughputMibps?: (number|null); + + /** Volume cacheParameters */ + cacheParameters?: (google.cloud.netapp.v1.ICacheParameters|null); + + /** Volume hotTierSizeUsedGib */ + hotTierSizeUsedGib?: (number|Long|string|null); + + /** Volume blockDevices */ + blockDevices?: (google.cloud.netapp.v1.IBlockDevice[]|null); + + /** Volume cloneDetails */ + cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); + } + + /** Represents a Volume. */ + class Volume implements IVolume { + + /** + * Constructs a new Volume. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IVolume); + + /** Volume name. */ + public name: string; + + /** Volume state. */ + public state: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State); + + /** Volume stateDetails. */ + public stateDetails: string; + + /** Volume createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Volume shareName. */ + public shareName: string; + + /** Volume psaRange. */ + public psaRange: string; + + /** Volume storagePool. */ + public storagePool: string; + + /** Volume network. */ + public network: string; + + /** Volume serviceLevel. */ + public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); + + /** Volume capacityGib. */ + public capacityGib: (number|Long|string); + + /** Volume exportPolicy. */ + public exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); + + /** Volume protocols. */ + public protocols: google.cloud.netapp.v1.Protocols[]; + + /** Volume smbSettings. */ + public smbSettings: google.cloud.netapp.v1.SMBSettings[]; + + /** Volume mountOptions. */ + public mountOptions: google.cloud.netapp.v1.IMountOption[]; + + /** Volume unixPermissions. */ + public unixPermissions: string; + + /** Volume labels. */ + public labels: { [k: string]: string }; + + /** Volume description. */ + public description: string; + + /** Volume snapshotPolicy. */ + public snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); + + /** Volume snapReserve. */ + public snapReserve: number; + + /** Volume snapshotDirectory. */ + public snapshotDirectory: boolean; + + /** Volume usedGib. */ + public usedGib: (number|Long|string); + + /** Volume securityStyle. */ + public securityStyle: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle); + + /** Volume kerberosEnabled. */ + public kerberosEnabled: boolean; + + /** Volume ldapEnabled. */ + public ldapEnabled: boolean; + + /** Volume activeDirectory. */ + public activeDirectory: string; + + /** Volume restoreParameters. */ + public restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); + + /** Volume kmsConfig. */ + public kmsConfig: string; + + /** Volume encryptionType. */ + public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); + + /** Volume hasReplication. */ + public hasReplication: boolean; + + /** Volume backupConfig. */ + public backupConfig?: (google.cloud.netapp.v1.IBackupConfig|null); + + /** Volume restrictedActions. */ + public restrictedActions: google.cloud.netapp.v1.RestrictedAction[]; + + /** Volume largeCapacity. */ + public largeCapacity: boolean; + + /** Volume multipleEndpoints. */ + public multipleEndpoints: boolean; + + /** Volume tieringPolicy. */ + public tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); + + /** Volume replicaZone. */ + public replicaZone: string; + + /** Volume zone. */ + public zone: string; + + /** Volume coldTierSizeGib. */ + public coldTierSizeGib: (number|Long|string); + + /** Volume hybridReplicationParameters. */ + public hybridReplicationParameters?: (google.cloud.netapp.v1.IHybridReplicationParameters|null); + + /** Volume throughputMibps. */ + public throughputMibps: number; + + /** Volume cacheParameters. */ + public cacheParameters?: (google.cloud.netapp.v1.ICacheParameters|null); + + /** Volume hotTierSizeUsedGib. */ + public hotTierSizeUsedGib: (number|Long|string); + + /** Volume blockDevices. */ + public blockDevices: google.cloud.netapp.v1.IBlockDevice[]; + + /** Volume cloneDetails. */ + public cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); + + /** + * Creates a new Volume instance using the specified properties. + * @param [properties] Properties to set + * @returns Volume instance + */ + public static create(properties?: google.cloud.netapp.v1.IVolume): google.cloud.netapp.v1.Volume; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Volume + * @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.netapp.v1.Volume; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Volume + * @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.netapp.v1.Volume; + + /** + * Verifies a Volume 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 Volume message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Volume + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @param message Volume + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Volume, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Volume to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Volume + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Volume { + + /** Properties of a CloneDetails. */ + interface ICloneDetails { + + /** CloneDetails sourceSnapshot */ + sourceSnapshot?: (string|null); + + /** CloneDetails sourceVolume */ + sourceVolume?: (string|null); + + /** CloneDetails sharedSpaceGib */ + sharedSpaceGib?: (number|Long|string|null); + } + + /** Represents a CloneDetails. */ + class CloneDetails implements ICloneDetails { + + /** + * Constructs a new CloneDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.Volume.ICloneDetails); + + /** CloneDetails sourceSnapshot. */ + public sourceSnapshot: string; + + /** CloneDetails sourceVolume. */ + public sourceVolume: string; + + /** CloneDetails sharedSpaceGib. */ + public sharedSpaceGib: (number|Long|string); + + /** + * Creates a new CloneDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloneDetails instance + */ + public static create(properties?: google.cloud.netapp.v1.Volume.ICloneDetails): google.cloud.netapp.v1.Volume.CloneDetails; + + /** + * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @param message CloneDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @param message CloneDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloneDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloneDetails + * @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.netapp.v1.Volume.CloneDetails; + + /** + * Decodes a CloneDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloneDetails + * @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.netapp.v1.Volume.CloneDetails; + + /** + * Verifies a CloneDetails 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 CloneDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloneDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume.CloneDetails; + + /** + * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. + * @param message CloneDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Volume.CloneDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloneDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloneDetails + * @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, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + RESTORING = 5, + DISABLED = 6, + ERROR = 7, + PREPARING = 8, + READ_ONLY = 9 + } + } + + /** Properties of an ExportPolicy. */ + interface IExportPolicy { + + /** ExportPolicy rules */ + rules?: (google.cloud.netapp.v1.ISimpleExportPolicyRule[]|null); + } + + /** Represents an ExportPolicy. */ + class ExportPolicy implements IExportPolicy { + + /** + * Constructs a new ExportPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExportPolicy); + + /** ExportPolicy rules. */ + public rules: google.cloud.netapp.v1.ISimpleExportPolicyRule[]; + + /** + * Creates a new ExportPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.IExportPolicy): google.cloud.netapp.v1.ExportPolicy; + + /** + * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @param message ExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @param message ExportPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportPolicy + * @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.netapp.v1.ExportPolicy; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportPolicy + * @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.netapp.v1.ExportPolicy; + + /** + * Verifies an ExportPolicy 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 ExportPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExportPolicy; + + /** + * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. + * @param message ExportPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExportPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SimpleExportPolicyRule. */ + interface ISimpleExportPolicyRule { + + /** SimpleExportPolicyRule allowedClients */ + allowedClients?: (string|null); + + /** SimpleExportPolicyRule hasRootAccess */ + hasRootAccess?: (string|null); + + /** SimpleExportPolicyRule accessType */ + accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); + + /** SimpleExportPolicyRule nfsv3 */ + nfsv3?: (boolean|null); + + /** SimpleExportPolicyRule nfsv4 */ + nfsv4?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadOnly */ + kerberos_5ReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadWrite */ + kerberos_5ReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadOnly */ + kerberos_5iReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadWrite */ + kerberos_5iReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadOnly */ + kerberos_5pReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadWrite */ + kerberos_5pReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule squashMode */ + squashMode?: (google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|keyof typeof google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null); + + /** SimpleExportPolicyRule anonUid */ + anonUid?: (number|Long|string|null); + } + + /** Represents a SimpleExportPolicyRule. */ + class SimpleExportPolicyRule implements ISimpleExportPolicyRule { + + /** + * Constructs a new SimpleExportPolicyRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule); + + /** SimpleExportPolicyRule allowedClients. */ + public allowedClients?: (string|null); + + /** SimpleExportPolicyRule hasRootAccess. */ + public hasRootAccess?: (string|null); + + /** SimpleExportPolicyRule accessType. */ + public accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); + + /** SimpleExportPolicyRule nfsv3. */ + public nfsv3?: (boolean|null); + + /** SimpleExportPolicyRule nfsv4. */ + public nfsv4?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadOnly. */ + public kerberos_5ReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5ReadWrite. */ + public kerberos_5ReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadOnly. */ + public kerberos_5iReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5iReadWrite. */ + public kerberos_5iReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadOnly. */ + public kerberos_5pReadOnly?: (boolean|null); + + /** SimpleExportPolicyRule kerberos_5pReadWrite. */ + public kerberos_5pReadWrite?: (boolean|null); + + /** SimpleExportPolicyRule squashMode. */ + public squashMode?: (google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|keyof typeof google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null); + + /** SimpleExportPolicyRule anonUid. */ + public anonUid?: (number|Long|string|null); + + /** + * Creates a new SimpleExportPolicyRule instance using the specified properties. + * @param [properties] Properties to set + * @returns SimpleExportPolicyRule instance + */ + public static create(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @param message SimpleExportPolicyRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @param message SimpleExportPolicyRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimpleExportPolicyRule + * @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.netapp.v1.SimpleExportPolicyRule; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimpleExportPolicyRule + * @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.netapp.v1.SimpleExportPolicyRule; + + /** + * Verifies a SimpleExportPolicyRule 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 SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimpleExportPolicyRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SimpleExportPolicyRule; + + /** + * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. + * @param message SimpleExportPolicyRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SimpleExportPolicyRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimpleExportPolicyRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimpleExportPolicyRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SimpleExportPolicyRule { + + /** SquashMode enum. */ + enum SquashMode { + SQUASH_MODE_UNSPECIFIED = 0, + NO_ROOT_SQUASH = 1, + ROOT_SQUASH = 2, + ALL_SQUASH = 3 + } + } + + /** Properties of a SnapshotPolicy. */ + interface ISnapshotPolicy { + + /** SnapshotPolicy enabled */ + enabled?: (boolean|null); + + /** SnapshotPolicy hourlySchedule */ + hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); + + /** SnapshotPolicy dailySchedule */ + dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); + + /** SnapshotPolicy weeklySchedule */ + weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); + + /** SnapshotPolicy monthlySchedule */ + monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); + } + + /** Represents a SnapshotPolicy. */ + class SnapshotPolicy implements ISnapshotPolicy { + + /** + * Constructs a new SnapshotPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISnapshotPolicy); + + /** SnapshotPolicy enabled. */ + public enabled?: (boolean|null); + + /** SnapshotPolicy hourlySchedule. */ + public hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); + + /** SnapshotPolicy dailySchedule. */ + public dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); + + /** SnapshotPolicy weeklySchedule. */ + public weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); + + /** SnapshotPolicy monthlySchedule. */ + public monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); + + /** + * Creates a new SnapshotPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns SnapshotPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.ISnapshotPolicy): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @param message SnapshotPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @param message SnapshotPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnapshotPolicy + * @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.netapp.v1.SnapshotPolicy; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnapshotPolicy + * @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.netapp.v1.SnapshotPolicy; + + /** + * Verifies a SnapshotPolicy 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 SnapshotPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnapshotPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SnapshotPolicy; + + /** + * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. + * @param message SnapshotPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SnapshotPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnapshotPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnapshotPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an HourlySchedule. */ + interface IHourlySchedule { + + /** HourlySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** HourlySchedule minute */ + minute?: (number|null); + } + + /** Represents an HourlySchedule. */ + class HourlySchedule implements IHourlySchedule { + + /** + * Constructs a new HourlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IHourlySchedule); + + /** HourlySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** HourlySchedule minute. */ + public minute?: (number|null); + + /** + * Creates a new HourlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns HourlySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IHourlySchedule): google.cloud.netapp.v1.HourlySchedule; + + /** + * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @param message HourlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @param message HourlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HourlySchedule + * @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.netapp.v1.HourlySchedule; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HourlySchedule + * @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.netapp.v1.HourlySchedule; + + /** + * Verifies an HourlySchedule 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 HourlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HourlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HourlySchedule; + + /** + * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. + * @param message HourlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.HourlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HourlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HourlySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DailySchedule. */ + interface IDailySchedule { + + /** DailySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** DailySchedule minute */ + minute?: (number|null); + + /** DailySchedule hour */ + hour?: (number|null); + } + + /** Represents a DailySchedule. */ + class DailySchedule implements IDailySchedule { + + /** + * Constructs a new DailySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDailySchedule); + + /** DailySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** DailySchedule minute. */ + public minute?: (number|null); + + /** DailySchedule hour. */ + public hour?: (number|null); + + /** + * Creates a new DailySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns DailySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IDailySchedule): google.cloud.netapp.v1.DailySchedule; + + /** + * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @param message DailySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @param message DailySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DailySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DailySchedule + * @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.netapp.v1.DailySchedule; + + /** + * Decodes a DailySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DailySchedule + * @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.netapp.v1.DailySchedule; + + /** + * Verifies a DailySchedule 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 DailySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DailySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DailySchedule; + + /** + * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. + * @param message DailySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DailySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DailySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DailySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeeklySchedule. */ + interface IWeeklySchedule { + + /** WeeklySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** WeeklySchedule minute */ + minute?: (number|null); + + /** WeeklySchedule hour */ + hour?: (number|null); + + /** WeeklySchedule day */ + day?: (string|null); + } + + /** Represents a WeeklySchedule. */ + class WeeklySchedule implements IWeeklySchedule { + + /** + * Constructs a new WeeklySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IWeeklySchedule); + + /** WeeklySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** WeeklySchedule minute. */ + public minute?: (number|null); + + /** WeeklySchedule hour. */ + public hour?: (number|null); + + /** WeeklySchedule day. */ + public day?: (string|null); + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns WeeklySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IWeeklySchedule): google.cloud.netapp.v1.WeeklySchedule; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @param message WeeklySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeeklySchedule + * @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.netapp.v1.WeeklySchedule; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeeklySchedule + * @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.netapp.v1.WeeklySchedule; + + /** + * Verifies a WeeklySchedule 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 WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeeklySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.WeeklySchedule; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @param message WeeklySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeeklySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeeklySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MonthlySchedule. */ + interface IMonthlySchedule { + + /** MonthlySchedule snapshotsToKeep */ + snapshotsToKeep?: (number|null); + + /** MonthlySchedule minute */ + minute?: (number|null); + + /** MonthlySchedule hour */ + hour?: (number|null); + + /** MonthlySchedule daysOfMonth */ + daysOfMonth?: (string|null); + } + + /** Represents a MonthlySchedule. */ + class MonthlySchedule implements IMonthlySchedule { + + /** + * Constructs a new MonthlySchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IMonthlySchedule); + + /** MonthlySchedule snapshotsToKeep. */ + public snapshotsToKeep?: (number|null); + + /** MonthlySchedule minute. */ + public minute?: (number|null); + + /** MonthlySchedule hour. */ + public hour?: (number|null); + + /** MonthlySchedule daysOfMonth. */ + public daysOfMonth?: (string|null); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns MonthlySchedule instance + */ + public static create(properties?: google.cloud.netapp.v1.IMonthlySchedule): google.cloud.netapp.v1.MonthlySchedule; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @param message MonthlySchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonthlySchedule + * @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.netapp.v1.MonthlySchedule; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonthlySchedule + * @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.netapp.v1.MonthlySchedule; + + /** + * Verifies a MonthlySchedule 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 MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonthlySchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.MonthlySchedule; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @param message MonthlySchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonthlySchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonthlySchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MountOption. */ + interface IMountOption { + + /** MountOption export */ + "export"?: (string|null); + + /** MountOption exportFull */ + exportFull?: (string|null); + + /** MountOption protocol */ + protocol?: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols|null); + + /** MountOption instructions */ + instructions?: (string|null); + + /** MountOption ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a MountOption. */ + class MountOption implements IMountOption { + + /** + * Constructs a new MountOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IMountOption); + + /** MountOption export. */ + public export: string; + + /** MountOption exportFull. */ + public exportFull: string; + + /** MountOption protocol. */ + public protocol: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols); + + /** MountOption instructions. */ + public instructions: string; + + /** MountOption ipAddress. */ + public ipAddress: string; + + /** + * Creates a new MountOption instance using the specified properties. + * @param [properties] Properties to set + * @returns MountOption instance + */ + public static create(properties?: google.cloud.netapp.v1.IMountOption): google.cloud.netapp.v1.MountOption; + + /** + * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @param message MountOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @param message MountOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MountOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MountOption + * @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.netapp.v1.MountOption; + + /** + * Decodes a MountOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MountOption + * @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.netapp.v1.MountOption; + + /** + * Verifies a MountOption 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 MountOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MountOption + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.MountOption; + + /** + * Creates a plain object from a MountOption message. Also converts values to other types if specified. + * @param message MountOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.MountOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MountOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MountOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreParameters. */ + interface IRestoreParameters { + + /** RestoreParameters sourceSnapshot */ + sourceSnapshot?: (string|null); + + /** RestoreParameters sourceBackup */ + sourceBackup?: (string|null); + } + + /** Represents a RestoreParameters. */ + class RestoreParameters implements IRestoreParameters { + + /** + * Constructs a new RestoreParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRestoreParameters); + + /** RestoreParameters sourceSnapshot. */ + public sourceSnapshot?: (string|null); + + /** RestoreParameters sourceBackup. */ + public sourceBackup?: (string|null); + + /** RestoreParameters source. */ + public source?: ("sourceSnapshot"|"sourceBackup"); + + /** + * Creates a new RestoreParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.IRestoreParameters): google.cloud.netapp.v1.RestoreParameters; + + /** + * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @param message RestoreParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @param message RestoreParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreParameters + * @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.netapp.v1.RestoreParameters; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreParameters + * @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.netapp.v1.RestoreParameters; + + /** + * Verifies a RestoreParameters 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 RestoreParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreParameters; + + /** + * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. + * @param message RestoreParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RestoreParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupConfig. */ + interface IBackupConfig { + + /** BackupConfig backupPolicies */ + backupPolicies?: (string[]|null); + + /** BackupConfig backupVault */ + backupVault?: (string|null); + + /** BackupConfig scheduledBackupEnabled */ + scheduledBackupEnabled?: (boolean|null); + + /** BackupConfig backupChainBytes */ + backupChainBytes?: (number|Long|string|null); + } + + /** Represents a BackupConfig. */ + class BackupConfig implements IBackupConfig { + + /** + * Constructs a new BackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IBackupConfig); + + /** BackupConfig backupPolicies. */ + public backupPolicies: string[]; + + /** BackupConfig backupVault. */ + public backupVault: string; + + /** BackupConfig scheduledBackupEnabled. */ + public scheduledBackupEnabled?: (boolean|null); + + /** BackupConfig backupChainBytes. */ + public backupChainBytes?: (number|Long|string|null); + + /** + * Creates a new BackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfig instance + */ + public static create(properties?: google.cloud.netapp.v1.IBackupConfig): google.cloud.netapp.v1.BackupConfig; + + /** + * Encodes the specified BackupConfig message. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. + * @param message BackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. + * @param message BackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfig + * @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.netapp.v1.BackupConfig; + + /** + * Decodes a BackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfig + * @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.netapp.v1.BackupConfig; + + /** + * Verifies a BackupConfig 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 BackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupConfig; + + /** + * Creates a plain object from a BackupConfig message. Also converts values to other types if specified. + * @param message BackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.BackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TieringPolicy. */ + interface ITieringPolicy { + + /** TieringPolicy tierAction */ + tierAction?: (google.cloud.netapp.v1.TieringPolicy.TierAction|keyof typeof google.cloud.netapp.v1.TieringPolicy.TierAction|null); + + /** TieringPolicy coolingThresholdDays */ + coolingThresholdDays?: (number|null); + + /** TieringPolicy hotTierBypassModeEnabled */ + hotTierBypassModeEnabled?: (boolean|null); + } + + /** Represents a TieringPolicy. */ + class TieringPolicy implements ITieringPolicy { + + /** + * Constructs a new TieringPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ITieringPolicy); + + /** TieringPolicy tierAction. */ + public tierAction?: (google.cloud.netapp.v1.TieringPolicy.TierAction|keyof typeof google.cloud.netapp.v1.TieringPolicy.TierAction|null); + + /** TieringPolicy coolingThresholdDays. */ + public coolingThresholdDays?: (number|null); + + /** TieringPolicy hotTierBypassModeEnabled. */ + public hotTierBypassModeEnabled?: (boolean|null); + + /** + * Creates a new TieringPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns TieringPolicy instance + */ + public static create(properties?: google.cloud.netapp.v1.ITieringPolicy): google.cloud.netapp.v1.TieringPolicy; + + /** + * Encodes the specified TieringPolicy message. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. + * @param message TieringPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ITieringPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TieringPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. + * @param message TieringPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ITieringPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TieringPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TieringPolicy + * @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.netapp.v1.TieringPolicy; + + /** + * Decodes a TieringPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TieringPolicy + * @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.netapp.v1.TieringPolicy; + + /** + * Verifies a TieringPolicy 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 TieringPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TieringPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.TieringPolicy; + + /** + * Creates a plain object from a TieringPolicy message. Also converts values to other types if specified. + * @param message TieringPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.TieringPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TieringPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TieringPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TieringPolicy { + + /** TierAction enum. */ + enum TierAction { + TIER_ACTION_UNSPECIFIED = 0, + ENABLED = 1, + PAUSED = 2 + } + } + + /** Properties of a HybridReplicationParameters. */ + interface IHybridReplicationParameters { + + /** HybridReplicationParameters replication */ + replication?: (string|null); + + /** HybridReplicationParameters peerVolumeName */ + peerVolumeName?: (string|null); + + /** HybridReplicationParameters peerClusterName */ + peerClusterName?: (string|null); + + /** HybridReplicationParameters peerSvmName */ + peerSvmName?: (string|null); + + /** HybridReplicationParameters peerIpAddresses */ + peerIpAddresses?: (string[]|null); + + /** HybridReplicationParameters clusterLocation */ + clusterLocation?: (string|null); + + /** HybridReplicationParameters description */ + description?: (string|null); + + /** HybridReplicationParameters labels */ + labels?: ({ [k: string]: string }|null); + + /** HybridReplicationParameters replicationSchedule */ + replicationSchedule?: (google.cloud.netapp.v1.HybridReplicationSchedule|keyof typeof google.cloud.netapp.v1.HybridReplicationSchedule|null); + + /** HybridReplicationParameters hybridReplicationType */ + hybridReplicationType?: (google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|keyof typeof google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|null); + + /** HybridReplicationParameters largeVolumeConstituentCount */ + largeVolumeConstituentCount?: (number|null); + } + + /** Represents a HybridReplicationParameters. */ + class HybridReplicationParameters implements IHybridReplicationParameters { + + /** + * Constructs a new HybridReplicationParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IHybridReplicationParameters); + + /** HybridReplicationParameters replication. */ + public replication: string; + + /** HybridReplicationParameters peerVolumeName. */ + public peerVolumeName: string; + + /** HybridReplicationParameters peerClusterName. */ + public peerClusterName: string; + + /** HybridReplicationParameters peerSvmName. */ + public peerSvmName: string; + + /** HybridReplicationParameters peerIpAddresses. */ + public peerIpAddresses: string[]; + + /** HybridReplicationParameters clusterLocation. */ + public clusterLocation: string; + + /** HybridReplicationParameters description. */ + public description: string; + + /** HybridReplicationParameters labels. */ + public labels: { [k: string]: string }; + + /** HybridReplicationParameters replicationSchedule. */ + public replicationSchedule: (google.cloud.netapp.v1.HybridReplicationSchedule|keyof typeof google.cloud.netapp.v1.HybridReplicationSchedule); + + /** HybridReplicationParameters hybridReplicationType. */ + public hybridReplicationType: (google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|keyof typeof google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType); + + /** HybridReplicationParameters largeVolumeConstituentCount. */ + public largeVolumeConstituentCount: number; + + /** + * Creates a new HybridReplicationParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridReplicationParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.IHybridReplicationParameters): google.cloud.netapp.v1.HybridReplicationParameters; + + /** + * Encodes the specified HybridReplicationParameters message. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. + * @param message HybridReplicationParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IHybridReplicationParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridReplicationParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. + * @param message HybridReplicationParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IHybridReplicationParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridReplicationParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridReplicationParameters + * @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.netapp.v1.HybridReplicationParameters; + + /** + * Decodes a HybridReplicationParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridReplicationParameters + * @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.netapp.v1.HybridReplicationParameters; + + /** + * Verifies a HybridReplicationParameters 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 HybridReplicationParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridReplicationParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HybridReplicationParameters; + + /** + * Creates a plain object from a HybridReplicationParameters message. Also converts values to other types if specified. + * @param message HybridReplicationParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.HybridReplicationParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridReplicationParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridReplicationParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace HybridReplicationParameters { + + /** VolumeHybridReplicationType enum. */ + enum VolumeHybridReplicationType { + VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0, + MIGRATION = 1, + CONTINUOUS_REPLICATION = 2, + ONPREM_REPLICATION = 3, + REVERSE_ONPREM_REPLICATION = 4 + } + } + + /** Properties of a CacheParameters. */ + interface ICacheParameters { + + /** CacheParameters peerVolumeName */ + peerVolumeName?: (string|null); + + /** CacheParameters peerClusterName */ + peerClusterName?: (string|null); + + /** CacheParameters peerSvmName */ + peerSvmName?: (string|null); + + /** CacheParameters peerIpAddresses */ + peerIpAddresses?: (string[]|null); + + /** CacheParameters enableGlobalFileLock */ + enableGlobalFileLock?: (boolean|null); + + /** CacheParameters cacheConfig */ + cacheConfig?: (google.cloud.netapp.v1.ICacheConfig|null); + + /** CacheParameters cacheState */ + cacheState?: (google.cloud.netapp.v1.CacheParameters.CacheState|keyof typeof google.cloud.netapp.v1.CacheParameters.CacheState|null); + + /** CacheParameters command */ + command?: (string|null); + + /** CacheParameters peeringCommandExpiryTime */ + peeringCommandExpiryTime?: (google.protobuf.ITimestamp|null); + + /** CacheParameters passphrase */ + passphrase?: (string|null); + + /** CacheParameters stateDetails */ + stateDetails?: (string|null); + } + + /** Represents a CacheParameters. */ + class CacheParameters implements ICacheParameters { + + /** + * Constructs a new CacheParameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICacheParameters); + + /** CacheParameters peerVolumeName. */ + public peerVolumeName: string; + + /** CacheParameters peerClusterName. */ + public peerClusterName: string; + + /** CacheParameters peerSvmName. */ + public peerSvmName: string; + + /** CacheParameters peerIpAddresses. */ + public peerIpAddresses: string[]; + + /** CacheParameters enableGlobalFileLock. */ + public enableGlobalFileLock?: (boolean|null); + + /** CacheParameters cacheConfig. */ + public cacheConfig?: (google.cloud.netapp.v1.ICacheConfig|null); + + /** CacheParameters cacheState. */ + public cacheState: (google.cloud.netapp.v1.CacheParameters.CacheState|keyof typeof google.cloud.netapp.v1.CacheParameters.CacheState); + + /** CacheParameters command. */ + public command: string; + + /** CacheParameters peeringCommandExpiryTime. */ + public peeringCommandExpiryTime?: (google.protobuf.ITimestamp|null); + + /** CacheParameters passphrase. */ + public passphrase: string; + + /** CacheParameters stateDetails. */ + public stateDetails: string; + + /** + * Creates a new CacheParameters instance using the specified properties. + * @param [properties] Properties to set + * @returns CacheParameters instance + */ + public static create(properties?: google.cloud.netapp.v1.ICacheParameters): google.cloud.netapp.v1.CacheParameters; + + /** + * Encodes the specified CacheParameters message. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. + * @param message CacheParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICacheParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CacheParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. + * @param message CacheParameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICacheParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CacheParameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CacheParameters + * @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.netapp.v1.CacheParameters; + + /** + * Decodes a CacheParameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CacheParameters + * @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.netapp.v1.CacheParameters; + + /** + * Verifies a CacheParameters 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 CacheParameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CacheParameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CacheParameters; + + /** + * Creates a plain object from a CacheParameters message. Also converts values to other types if specified. + * @param message CacheParameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CacheParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CacheParameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CacheParameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CacheParameters { + + /** CacheState enum. */ + enum CacheState { + CACHE_STATE_UNSPECIFIED = 0, + PENDING_CLUSTER_PEERING = 1, + PENDING_SVM_PEERING = 2, + PEERED = 3, + ERROR = 4 + } + } + + /** Properties of a CacheConfig. */ + interface ICacheConfig { + + /** CacheConfig cachePrePopulate */ + cachePrePopulate?: (google.cloud.netapp.v1.ICachePrePopulate|null); + + /** CacheConfig writebackEnabled */ + writebackEnabled?: (boolean|null); + + /** CacheConfig cifsChangeNotifyEnabled */ + cifsChangeNotifyEnabled?: (boolean|null); + + /** CacheConfig cachePrePopulateState */ + cachePrePopulateState?: (google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|keyof typeof google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|null); + } + + /** Represents a CacheConfig. */ + class CacheConfig implements ICacheConfig { + + /** + * Constructs a new CacheConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICacheConfig); + + /** CacheConfig cachePrePopulate. */ + public cachePrePopulate?: (google.cloud.netapp.v1.ICachePrePopulate|null); + + /** CacheConfig writebackEnabled. */ + public writebackEnabled?: (boolean|null); + + /** CacheConfig cifsChangeNotifyEnabled. */ + public cifsChangeNotifyEnabled?: (boolean|null); + + /** CacheConfig cachePrePopulateState. */ + public cachePrePopulateState: (google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|keyof typeof google.cloud.netapp.v1.CacheConfig.CachePrePopulateState); + + /** + * Creates a new CacheConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CacheConfig instance + */ + public static create(properties?: google.cloud.netapp.v1.ICacheConfig): google.cloud.netapp.v1.CacheConfig; + + /** + * Encodes the specified CacheConfig message. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. + * @param message CacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CacheConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. + * @param message CacheConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CacheConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CacheConfig + * @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.netapp.v1.CacheConfig; + + /** + * Decodes a CacheConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CacheConfig + * @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.netapp.v1.CacheConfig; + + /** + * Verifies a CacheConfig 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 CacheConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CacheConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CacheConfig; + + /** + * Creates a plain object from a CacheConfig message. Also converts values to other types if specified. + * @param message CacheConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CacheConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CacheConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CacheConfig { + + /** CachePrePopulateState enum. */ + enum CachePrePopulateState { + CACHE_PRE_POPULATE_STATE_UNSPECIFIED = 0, + NOT_NEEDED = 1, + IN_PROGRESS = 2, + COMPLETE = 3, + ERROR = 4 + } + } + + /** Properties of a CachePrePopulate. */ + interface ICachePrePopulate { + + /** CachePrePopulate pathList */ + pathList?: (string[]|null); + + /** CachePrePopulate excludePathList */ + excludePathList?: (string[]|null); + + /** CachePrePopulate recursion */ + recursion?: (boolean|null); + } + + /** Represents a CachePrePopulate. */ + class CachePrePopulate implements ICachePrePopulate { + + /** + * Constructs a new CachePrePopulate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICachePrePopulate); + + /** CachePrePopulate pathList. */ + public pathList: string[]; + + /** CachePrePopulate excludePathList. */ + public excludePathList: string[]; + + /** CachePrePopulate recursion. */ + public recursion?: (boolean|null); + + /** + * Creates a new CachePrePopulate instance using the specified properties. + * @param [properties] Properties to set + * @returns CachePrePopulate instance + */ + public static create(properties?: google.cloud.netapp.v1.ICachePrePopulate): google.cloud.netapp.v1.CachePrePopulate; + + /** + * Encodes the specified CachePrePopulate message. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. + * @param message CachePrePopulate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICachePrePopulate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CachePrePopulate message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. + * @param message CachePrePopulate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICachePrePopulate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CachePrePopulate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CachePrePopulate + * @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.netapp.v1.CachePrePopulate; + + /** + * Decodes a CachePrePopulate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CachePrePopulate + * @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.netapp.v1.CachePrePopulate; + + /** + * Verifies a CachePrePopulate 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 CachePrePopulate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CachePrePopulate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CachePrePopulate; + + /** + * Creates a plain object from a CachePrePopulate message. Also converts values to other types if specified. + * @param message CachePrePopulate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CachePrePopulate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CachePrePopulate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CachePrePopulate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BlockDevice. */ + interface IBlockDevice { + + /** BlockDevice name */ + name?: (string|null); + + /** BlockDevice hostGroups */ + hostGroups?: (string[]|null); + + /** BlockDevice identifier */ + identifier?: (string|null); + + /** BlockDevice sizeGib */ + sizeGib?: (number|Long|string|null); + + /** BlockDevice osType */ + osType?: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType|null); + } + + /** Represents a BlockDevice. */ + class BlockDevice implements IBlockDevice { + + /** + * Constructs a new BlockDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IBlockDevice); + + /** BlockDevice name. */ + public name?: (string|null); + + /** BlockDevice hostGroups. */ + public hostGroups: string[]; + + /** BlockDevice identifier. */ + public identifier: string; + + /** BlockDevice sizeGib. */ + public sizeGib?: (number|Long|string|null); + + /** BlockDevice osType. */ + public osType: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType); + + /** + * Creates a new BlockDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockDevice instance + */ + public static create(properties?: google.cloud.netapp.v1.IBlockDevice): google.cloud.netapp.v1.BlockDevice; + + /** + * Encodes the specified BlockDevice message. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. + * @param message BlockDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IBlockDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlockDevice message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. + * @param message BlockDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IBlockDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlockDevice + * @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.netapp.v1.BlockDevice; + + /** + * Decodes a BlockDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlockDevice + * @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.netapp.v1.BlockDevice; + + /** + * Verifies a BlockDevice 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 BlockDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BlockDevice; + + /** + * Creates a plain object from a BlockDevice message. Also converts values to other types if specified. + * @param message BlockDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.BlockDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlockDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlockDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupFilesRequest. */ + interface IRestoreBackupFilesRequest { + + /** RestoreBackupFilesRequest name */ + name?: (string|null); + + /** RestoreBackupFilesRequest backup */ + backup?: (string|null); + + /** RestoreBackupFilesRequest fileList */ + fileList?: (string[]|null); + + /** RestoreBackupFilesRequest restoreDestinationPath */ + restoreDestinationPath?: (string|null); + } + + /** Represents a RestoreBackupFilesRequest. */ + class RestoreBackupFilesRequest implements IRestoreBackupFilesRequest { + + /** + * Constructs a new RestoreBackupFilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesRequest); + + /** RestoreBackupFilesRequest name. */ + public name: string; + + /** RestoreBackupFilesRequest backup. */ + public backup: string; + + /** RestoreBackupFilesRequest fileList. */ + public fileList: string[]; + + /** RestoreBackupFilesRequest restoreDestinationPath. */ + public restoreDestinationPath: string; + + /** + * Creates a new RestoreBackupFilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupFilesRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesRequest): google.cloud.netapp.v1.RestoreBackupFilesRequest; + + /** + * Encodes the specified RestoreBackupFilesRequest message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. + * @param message RestoreBackupFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupFilesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. + * @param message RestoreBackupFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupFilesRequest + * @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.netapp.v1.RestoreBackupFilesRequest; + + /** + * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupFilesRequest + * @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.netapp.v1.RestoreBackupFilesRequest; + + /** + * Verifies a RestoreBackupFilesRequest 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 RestoreBackupFilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupFilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesRequest; + + /** + * Creates a plain object from a RestoreBackupFilesRequest message. Also converts values to other types if specified. + * @param message RestoreBackupFilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupFilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupFilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupFilesResponse. */ + interface IRestoreBackupFilesResponse { + } + + /** Represents a RestoreBackupFilesResponse. */ + class RestoreBackupFilesResponse implements IRestoreBackupFilesResponse { + + /** + * Constructs a new RestoreBackupFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse); + + /** + * Creates a new RestoreBackupFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupFilesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse): google.cloud.netapp.v1.RestoreBackupFilesResponse; + + /** + * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @param message RestoreBackupFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @param message RestoreBackupFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupFilesResponse + * @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.netapp.v1.RestoreBackupFilesResponse; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupFilesResponse + * @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.netapp.v1.RestoreBackupFilesResponse; + + /** + * Verifies a RestoreBackupFilesResponse 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 RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupFilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesResponse; + + /** + * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. + * @param message RestoreBackupFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupFilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupFilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EstablishVolumePeeringRequest. */ + interface IEstablishVolumePeeringRequest { + + /** EstablishVolumePeeringRequest name */ + name?: (string|null); + + /** EstablishVolumePeeringRequest peerClusterName */ + peerClusterName?: (string|null); + + /** EstablishVolumePeeringRequest peerSvmName */ + peerSvmName?: (string|null); + + /** EstablishVolumePeeringRequest peerIpAddresses */ + peerIpAddresses?: (string[]|null); + + /** EstablishVolumePeeringRequest peerVolumeName */ + peerVolumeName?: (string|null); + } + + /** Represents an EstablishVolumePeeringRequest. */ + class EstablishVolumePeeringRequest implements IEstablishVolumePeeringRequest { + + /** + * Constructs a new EstablishVolumePeeringRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest); + + /** EstablishVolumePeeringRequest name. */ + public name: string; + + /** EstablishVolumePeeringRequest peerClusterName. */ + public peerClusterName: string; + + /** EstablishVolumePeeringRequest peerSvmName. */ + public peerSvmName: string; + + /** EstablishVolumePeeringRequest peerIpAddresses. */ + public peerIpAddresses: string[]; + + /** EstablishVolumePeeringRequest peerVolumeName. */ + public peerVolumeName: string; + + /** + * Creates a new EstablishVolumePeeringRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EstablishVolumePeeringRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): google.cloud.netapp.v1.EstablishVolumePeeringRequest; + + /** + * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @param message EstablishVolumePeeringRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @param message EstablishVolumePeeringRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EstablishVolumePeeringRequest + * @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.netapp.v1.EstablishVolumePeeringRequest; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EstablishVolumePeeringRequest + * @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.netapp.v1.EstablishVolumePeeringRequest; + + /** + * Verifies an EstablishVolumePeeringRequest 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 EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EstablishVolumePeeringRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EstablishVolumePeeringRequest; + + /** + * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. + * @param message EstablishVolumePeeringRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.EstablishVolumePeeringRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EstablishVolumePeeringRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EstablishVolumePeeringRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsRequest. */ + interface IListSnapshotsRequest { + + /** ListSnapshotsRequest parent */ + parent?: (string|null); + + /** ListSnapshotsRequest pageSize */ + pageSize?: (number|null); + + /** ListSnapshotsRequest pageToken */ + pageToken?: (string|null); + + /** ListSnapshotsRequest orderBy */ + orderBy?: (string|null); + + /** ListSnapshotsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListSnapshotsRequest. */ + class ListSnapshotsRequest implements IListSnapshotsRequest { + + /** + * Constructs a new ListSnapshotsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListSnapshotsRequest); + + /** ListSnapshotsRequest parent. */ + public parent: string; + + /** ListSnapshotsRequest pageSize. */ + public pageSize: number; + + /** ListSnapshotsRequest pageToken. */ + public pageToken: string; + + /** ListSnapshotsRequest orderBy. */ + public orderBy: string; + + /** ListSnapshotsRequest filter. */ + public filter: string; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListSnapshotsRequest): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @param message ListSnapshotsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsRequest + * @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.netapp.v1.ListSnapshotsRequest; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsRequest + * @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.netapp.v1.ListSnapshotsRequest; + + /** + * Verifies a ListSnapshotsRequest 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 ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsRequest; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @param message ListSnapshotsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSnapshotsResponse. */ + interface IListSnapshotsResponse { + + /** ListSnapshotsResponse snapshots */ + snapshots?: (google.cloud.netapp.v1.ISnapshot[]|null); + + /** ListSnapshotsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListSnapshotsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListSnapshotsResponse. */ + class ListSnapshotsResponse implements IListSnapshotsResponse { + + /** + * Constructs a new ListSnapshotsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListSnapshotsResponse); + + /** ListSnapshotsResponse snapshots. */ + public snapshots: google.cloud.netapp.v1.ISnapshot[]; + + /** ListSnapshotsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListSnapshotsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSnapshotsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListSnapshotsResponse): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @param message ListSnapshotsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSnapshotsResponse + * @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.netapp.v1.ListSnapshotsResponse; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSnapshotsResponse + * @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.netapp.v1.ListSnapshotsResponse; + + /** + * Verifies a ListSnapshotsResponse 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 ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSnapshotsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsResponse; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @param message ListSnapshotsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSnapshotRequest. */ + interface IGetSnapshotRequest { + + /** GetSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a GetSnapshotRequest. */ + class GetSnapshotRequest implements IGetSnapshotRequest { + + /** + * Constructs a new GetSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetSnapshotRequest); + + /** GetSnapshotRequest name. */ + public name: string; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetSnapshotRequest): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @param message GetSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSnapshotRequest + * @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.netapp.v1.GetSnapshotRequest; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSnapshotRequest + * @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.netapp.v1.GetSnapshotRequest; + + /** + * Verifies a GetSnapshotRequest 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 GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetSnapshotRequest; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @param message GetSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSnapshotRequest. */ + interface ICreateSnapshotRequest { + + /** CreateSnapshotRequest parent */ + parent?: (string|null); + + /** CreateSnapshotRequest snapshot */ + snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** CreateSnapshotRequest snapshotId */ + snapshotId?: (string|null); + } + + /** Represents a CreateSnapshotRequest. */ + class CreateSnapshotRequest implements ICreateSnapshotRequest { + + /** + * Constructs a new CreateSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest); + + /** CreateSnapshotRequest parent. */ + public parent: string; + + /** CreateSnapshotRequest snapshot. */ + public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** CreateSnapshotRequest snapshotId. */ + public snapshotId: string; + + /** + * Creates a new CreateSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @param message CreateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @param message CreateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSnapshotRequest + * @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.netapp.v1.CreateSnapshotRequest; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSnapshotRequest + * @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.netapp.v1.CreateSnapshotRequest; + + /** + * Verifies a CreateSnapshotRequest 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 CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateSnapshotRequest; + + /** + * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. + * @param message CreateSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSnapshotRequest. */ + interface IDeleteSnapshotRequest { + + /** DeleteSnapshotRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSnapshotRequest. */ + class DeleteSnapshotRequest implements IDeleteSnapshotRequest { + + /** + * Constructs a new DeleteSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest); + + /** DeleteSnapshotRequest name. */ + public name: string; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @param message DeleteSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSnapshotRequest + * @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.netapp.v1.DeleteSnapshotRequest; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSnapshotRequest + * @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.netapp.v1.DeleteSnapshotRequest; + + /** + * Verifies a DeleteSnapshotRequest 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 DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteSnapshotRequest; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @param message DeleteSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSnapshotRequest. */ + interface IUpdateSnapshotRequest { + + /** UpdateSnapshotRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSnapshotRequest snapshot */ + snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + } + + /** Represents an UpdateSnapshotRequest. */ + class UpdateSnapshotRequest implements IUpdateSnapshotRequest { + + /** + * Constructs a new UpdateSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest); + + /** UpdateSnapshotRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSnapshotRequest snapshot. */ + public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); + + /** + * Creates a new UpdateSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSnapshotRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @param message UpdateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @param message UpdateSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSnapshotRequest + * @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.netapp.v1.UpdateSnapshotRequest; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSnapshotRequest + * @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.netapp.v1.UpdateSnapshotRequest; + + /** + * Verifies an UpdateSnapshotRequest 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 UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateSnapshotRequest; + + /** + * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. + * @param message UpdateSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Snapshot. */ + interface ISnapshot { + + /** Snapshot name */ + name?: (string|null); + + /** Snapshot state */ + state?: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State|null); + + /** Snapshot stateDetails */ + stateDetails?: (string|null); + + /** Snapshot description */ + description?: (string|null); + + /** Snapshot usedBytes */ + usedBytes?: (number|null); + + /** Snapshot createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Snapshot. */ + class Snapshot implements ISnapshot { + + /** + * Constructs a new Snapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISnapshot); + + /** Snapshot name. */ + public name: string; + + /** Snapshot state. */ + public state: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State); + + /** Snapshot stateDetails. */ + public stateDetails: string; + + /** Snapshot description. */ + public description: string; + + /** Snapshot usedBytes. */ + public usedBytes: number; + + /** Snapshot createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Snapshot labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Snapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns Snapshot instance + */ + public static create(properties?: google.cloud.netapp.v1.ISnapshot): google.cloud.netapp.v1.Snapshot; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @param message Snapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Snapshot + * @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.netapp.v1.Snapshot; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Snapshot + * @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.netapp.v1.Snapshot; + + /** + * Verifies a Snapshot 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 Snapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Snapshot + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Snapshot; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @param message Snapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Snapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Snapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Snapshot { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + DISABLED = 5, + ERROR = 6 + } + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DEFAULT = 1, + ONTAP = 2 + } + + /** Properties of a GetStoragePoolRequest. */ + interface IGetStoragePoolRequest { + + /** GetStoragePoolRequest name */ + name?: (string|null); + } + + /** Represents a GetStoragePoolRequest. */ + class GetStoragePoolRequest implements IGetStoragePoolRequest { + + /** + * Constructs a new GetStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest); + + /** GetStoragePoolRequest name. */ + public name: string; + + /** + * Creates a new GetStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @param message GetStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @param message GetStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetStoragePoolRequest + * @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.netapp.v1.GetStoragePoolRequest; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetStoragePoolRequest + * @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.netapp.v1.GetStoragePoolRequest; + + /** + * Verifies a GetStoragePoolRequest 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 GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetStoragePoolRequest; + + /** + * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. + * @param message GetStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.GetStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoragePoolsRequest. */ + interface IListStoragePoolsRequest { + + /** ListStoragePoolsRequest parent */ + parent?: (string|null); + + /** ListStoragePoolsRequest pageSize */ + pageSize?: (number|null); + + /** ListStoragePoolsRequest pageToken */ + pageToken?: (string|null); + + /** ListStoragePoolsRequest orderBy */ + orderBy?: (string|null); + + /** ListStoragePoolsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListStoragePoolsRequest. */ + class ListStoragePoolsRequest implements IListStoragePoolsRequest { + + /** + * Constructs a new ListStoragePoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest); + + /** ListStoragePoolsRequest parent. */ + public parent: string; + + /** ListStoragePoolsRequest pageSize. */ + public pageSize: number; + + /** ListStoragePoolsRequest pageToken. */ + public pageToken: string; + + /** ListStoragePoolsRequest orderBy. */ + public orderBy: string; + + /** ListStoragePoolsRequest filter. */ + public filter: string; + + /** + * Creates a new ListStoragePoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoragePoolsRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @param message ListStoragePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @param message ListStoragePoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoragePoolsRequest + * @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.netapp.v1.ListStoragePoolsRequest; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoragePoolsRequest + * @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.netapp.v1.ListStoragePoolsRequest; + + /** + * Verifies a ListStoragePoolsRequest 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 ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoragePoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsRequest; + + /** + * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. + * @param message ListStoragePoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoragePoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoragePoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoragePoolsResponse. */ + interface IListStoragePoolsResponse { + + /** ListStoragePoolsResponse storagePools */ + storagePools?: (google.cloud.netapp.v1.IStoragePool[]|null); + + /** ListStoragePoolsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListStoragePoolsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListStoragePoolsResponse. */ + class ListStoragePoolsResponse implements IListStoragePoolsResponse { + + /** + * Constructs a new ListStoragePoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse); + + /** ListStoragePoolsResponse storagePools. */ + public storagePools: google.cloud.netapp.v1.IStoragePool[]; + + /** ListStoragePoolsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListStoragePoolsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListStoragePoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoragePoolsResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @param message ListStoragePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @param message ListStoragePoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoragePoolsResponse + * @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.netapp.v1.ListStoragePoolsResponse; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoragePoolsResponse + * @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.netapp.v1.ListStoragePoolsResponse; + + /** + * Verifies a ListStoragePoolsResponse 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 ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoragePoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsResponse; + + /** + * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. + * @param message ListStoragePoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoragePoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoragePoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateStoragePoolRequest. */ + interface ICreateStoragePoolRequest { + + /** CreateStoragePoolRequest parent */ + parent?: (string|null); + + /** CreateStoragePoolRequest storagePoolId */ + storagePoolId?: (string|null); + + /** CreateStoragePoolRequest storagePool */ + storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + } + + /** Represents a CreateStoragePoolRequest. */ + class CreateStoragePoolRequest implements ICreateStoragePoolRequest { + + /** + * Constructs a new CreateStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest); + + /** CreateStoragePoolRequest parent. */ + public parent: string; + + /** CreateStoragePoolRequest storagePoolId. */ + public storagePoolId: string; + + /** CreateStoragePoolRequest storagePool. */ + public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + + /** + * Creates a new CreateStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @param message CreateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @param message CreateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateStoragePoolRequest + * @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.netapp.v1.CreateStoragePoolRequest; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateStoragePoolRequest + * @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.netapp.v1.CreateStoragePoolRequest; + + /** + * Verifies a CreateStoragePoolRequest 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 CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateStoragePoolRequest; + + /** + * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. + * @param message CreateStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.CreateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateStoragePoolRequest. */ + interface IUpdateStoragePoolRequest { + + /** UpdateStoragePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateStoragePoolRequest storagePool */ + storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + } + + /** Represents an UpdateStoragePoolRequest. */ + class UpdateStoragePoolRequest implements IUpdateStoragePoolRequest { + + /** + * Constructs a new UpdateStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest); + + /** UpdateStoragePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateStoragePoolRequest storagePool. */ + public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); + + /** + * Creates a new UpdateStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @param message UpdateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @param message UpdateStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateStoragePoolRequest + * @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.netapp.v1.UpdateStoragePoolRequest; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateStoragePoolRequest + * @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.netapp.v1.UpdateStoragePoolRequest; + + /** + * Verifies an UpdateStoragePoolRequest 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 UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateStoragePoolRequest; + + /** + * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. + * @param message UpdateStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.UpdateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteStoragePoolRequest. */ + interface IDeleteStoragePoolRequest { + + /** DeleteStoragePoolRequest name */ + name?: (string|null); + } + + /** Represents a DeleteStoragePoolRequest. */ + class DeleteStoragePoolRequest implements IDeleteStoragePoolRequest { + + /** + * Constructs a new DeleteStoragePoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest); + + /** DeleteStoragePoolRequest name. */ + public name: string; + + /** + * Creates a new DeleteStoragePoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteStoragePoolRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @param message DeleteStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @param message DeleteStoragePoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteStoragePoolRequest + * @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.netapp.v1.DeleteStoragePoolRequest; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteStoragePoolRequest + * @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.netapp.v1.DeleteStoragePoolRequest; + + /** + * Verifies a DeleteStoragePoolRequest 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 DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteStoragePoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteStoragePoolRequest; + + /** + * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. + * @param message DeleteStoragePoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.DeleteStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteStoragePoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteStoragePoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SwitchActiveReplicaZoneRequest. */ + interface ISwitchActiveReplicaZoneRequest { + + /** SwitchActiveReplicaZoneRequest name */ + name?: (string|null); + } + + /** Represents a SwitchActiveReplicaZoneRequest. */ + class SwitchActiveReplicaZoneRequest implements ISwitchActiveReplicaZoneRequest { + + /** + * Constructs a new SwitchActiveReplicaZoneRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest); + + /** SwitchActiveReplicaZoneRequest name. */ + public name: string; + + /** + * Creates a new SwitchActiveReplicaZoneRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SwitchActiveReplicaZoneRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest): google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest; + + /** + * Encodes the specified SwitchActiveReplicaZoneRequest message. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. + * @param message SwitchActiveReplicaZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SwitchActiveReplicaZoneRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. + * @param message SwitchActiveReplicaZoneRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SwitchActiveReplicaZoneRequest + * @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.netapp.v1.SwitchActiveReplicaZoneRequest; + + /** + * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SwitchActiveReplicaZoneRequest + * @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.netapp.v1.SwitchActiveReplicaZoneRequest; + + /** + * Verifies a SwitchActiveReplicaZoneRequest 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 SwitchActiveReplicaZoneRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SwitchActiveReplicaZoneRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest; + + /** + * Creates a plain object from a SwitchActiveReplicaZoneRequest message. Also converts values to other types if specified. + * @param message SwitchActiveReplicaZoneRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SwitchActiveReplicaZoneRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SwitchActiveReplicaZoneRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoragePool. */ + interface IStoragePool { + + /** StoragePool name */ + name?: (string|null); + + /** StoragePool serviceLevel */ + serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); + + /** StoragePool capacityGib */ + capacityGib?: (number|Long|string|null); + + /** StoragePool volumeCapacityGib */ + volumeCapacityGib?: (number|Long|string|null); + + /** StoragePool volumeCount */ + volumeCount?: (number|null); + + /** StoragePool state */ + state?: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State|null); + + /** StoragePool stateDetails */ + stateDetails?: (string|null); + + /** StoragePool createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** StoragePool description */ + description?: (string|null); + + /** StoragePool labels */ + labels?: ({ [k: string]: string }|null); + + /** StoragePool network */ + network?: (string|null); + + /** StoragePool activeDirectory */ + activeDirectory?: (string|null); + + /** StoragePool kmsConfig */ + kmsConfig?: (string|null); + + /** StoragePool ldapEnabled */ + ldapEnabled?: (boolean|null); + + /** StoragePool psaRange */ + psaRange?: (string|null); + + /** StoragePool encryptionType */ + encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); + + /** StoragePool globalAccessAllowed */ + globalAccessAllowed?: (boolean|null); + + /** StoragePool allowAutoTiering */ + allowAutoTiering?: (boolean|null); + + /** StoragePool replicaZone */ + replicaZone?: (string|null); + + /** StoragePool zone */ + zone?: (string|null); + + /** StoragePool satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** StoragePool satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** StoragePool customPerformanceEnabled */ + customPerformanceEnabled?: (boolean|null); + + /** StoragePool totalThroughputMibps */ + totalThroughputMibps?: (number|Long|string|null); + + /** StoragePool totalIops */ + totalIops?: (number|Long|string|null); + + /** StoragePool hotTierSizeGib */ + hotTierSizeGib?: (number|Long|string|null); + + /** StoragePool enableHotTierAutoResize */ + enableHotTierAutoResize?: (boolean|null); + + /** StoragePool qosType */ + qosType?: (google.cloud.netapp.v1.QosType|keyof typeof google.cloud.netapp.v1.QosType|null); + + /** StoragePool availableThroughputMibps */ + availableThroughputMibps?: (number|null); + + /** StoragePool coldTierSizeUsedGib */ + coldTierSizeUsedGib?: (number|Long|string|null); + + /** StoragePool hotTierSizeUsedGib */ + hotTierSizeUsedGib?: (number|Long|string|null); + + /** StoragePool type */ + type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); + + /** StoragePool mode */ + mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); + } + + /** Represents a StoragePool. */ + class StoragePool implements IStoragePool { + + /** + * Constructs a new StoragePool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IStoragePool); + + /** StoragePool name. */ + public name: string; + + /** StoragePool serviceLevel. */ + public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); + + /** StoragePool capacityGib. */ + public capacityGib: (number|Long|string); + + /** StoragePool volumeCapacityGib. */ + public volumeCapacityGib: (number|Long|string); + + /** StoragePool volumeCount. */ + public volumeCount: number; + + /** StoragePool state. */ + public state: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State); + + /** StoragePool stateDetails. */ + public stateDetails: string; + + /** StoragePool createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** StoragePool description. */ + public description: string; + + /** StoragePool labels. */ + public labels: { [k: string]: string }; + + /** StoragePool network. */ + public network: string; + + /** StoragePool activeDirectory. */ + public activeDirectory: string; + + /** StoragePool kmsConfig. */ + public kmsConfig: string; + + /** StoragePool ldapEnabled. */ + public ldapEnabled: boolean; + + /** StoragePool psaRange. */ + public psaRange: string; + + /** StoragePool encryptionType. */ + public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); + + /** StoragePool globalAccessAllowed. */ + public globalAccessAllowed?: (boolean|null); + + /** StoragePool allowAutoTiering. */ + public allowAutoTiering: boolean; + + /** StoragePool replicaZone. */ + public replicaZone: string; + + /** StoragePool zone. */ + public zone: string; + + /** StoragePool satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** StoragePool satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** StoragePool customPerformanceEnabled. */ + public customPerformanceEnabled: boolean; + + /** StoragePool totalThroughputMibps. */ + public totalThroughputMibps: (number|Long|string); + + /** StoragePool totalIops. */ + public totalIops: (number|Long|string); + + /** StoragePool hotTierSizeGib. */ + public hotTierSizeGib: (number|Long|string); + + /** StoragePool enableHotTierAutoResize. */ + public enableHotTierAutoResize?: (boolean|null); + + /** StoragePool qosType. */ + public qosType: (google.cloud.netapp.v1.QosType|keyof typeof google.cloud.netapp.v1.QosType); + + /** StoragePool availableThroughputMibps. */ + public availableThroughputMibps: number; + + /** StoragePool coldTierSizeUsedGib. */ + public coldTierSizeUsedGib: (number|Long|string); + + /** StoragePool hotTierSizeUsedGib. */ + public hotTierSizeUsedGib: (number|Long|string); + + /** StoragePool type. */ + public type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); + + /** StoragePool mode. */ + public mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); + + /** + * Creates a new StoragePool instance using the specified properties. + * @param [properties] Properties to set + * @returns StoragePool instance + */ + public static create(properties?: google.cloud.netapp.v1.IStoragePool): google.cloud.netapp.v1.StoragePool; + + /** + * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @param message StoragePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @param message StoragePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoragePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoragePool + * @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.netapp.v1.StoragePool; + + /** + * Decodes a StoragePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoragePool + * @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.netapp.v1.StoragePool; + + /** + * Verifies a StoragePool 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 StoragePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoragePool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StoragePool; + + /** + * Creates a plain object from a StoragePool message. Also converts values to other types if specified. + * @param message StoragePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.StoragePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoragePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoragePool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StoragePool { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + RESTORING = 5, + DISABLED = 6, + ERROR = 7 + } + } + + /** Properties of a ValidateDirectoryServiceRequest. */ + interface IValidateDirectoryServiceRequest { + + /** ValidateDirectoryServiceRequest name */ + name?: (string|null); + + /** ValidateDirectoryServiceRequest directoryServiceType */ + directoryServiceType?: (google.cloud.netapp.v1.DirectoryServiceType|keyof typeof google.cloud.netapp.v1.DirectoryServiceType|null); + } + + /** Represents a ValidateDirectoryServiceRequest. */ + class ValidateDirectoryServiceRequest implements IValidateDirectoryServiceRequest { + + /** + * Constructs a new ValidateDirectoryServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IValidateDirectoryServiceRequest); + + /** ValidateDirectoryServiceRequest name. */ + public name: string; + + /** ValidateDirectoryServiceRequest directoryServiceType. */ + public directoryServiceType: (google.cloud.netapp.v1.DirectoryServiceType|keyof typeof google.cloud.netapp.v1.DirectoryServiceType); + + /** + * Creates a new ValidateDirectoryServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateDirectoryServiceRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IValidateDirectoryServiceRequest): google.cloud.netapp.v1.ValidateDirectoryServiceRequest; + + /** + * Encodes the specified ValidateDirectoryServiceRequest message. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. + * @param message ValidateDirectoryServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidateDirectoryServiceRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. + * @param message ValidateDirectoryServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateDirectoryServiceRequest + * @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.netapp.v1.ValidateDirectoryServiceRequest; + + /** + * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateDirectoryServiceRequest + * @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.netapp.v1.ValidateDirectoryServiceRequest; + + /** + * Verifies a ValidateDirectoryServiceRequest 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 ValidateDirectoryServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateDirectoryServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ValidateDirectoryServiceRequest; + + /** + * Creates a plain object from a ValidateDirectoryServiceRequest message. Also converts values to other types if specified. + * @param message ValidateDirectoryServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ValidateDirectoryServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidateDirectoryServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValidateDirectoryServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; + + /** + * Verifies a FieldInfo 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 FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.protobuf.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @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.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @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.protobuf.Struct; + + /** + * Verifies a Struct 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 Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @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.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @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.protobuf.Value; + + /** + * Verifies a Value 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 Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Verifies a ListValue 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 ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @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.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @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.protobuf.Any; + + /** + * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @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.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @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.protobuf.Empty; + + /** + * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations 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 Operations 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): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @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.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @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.longrunning.Operation; + + /** + * Verifies an Operation 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 Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @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.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @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.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @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.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @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.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @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.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @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.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @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.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @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.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @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.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @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.rpc.Status; + + /** + * Verifies a Status 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 Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.js b/owl-bot-staging/google-cloud-netapp/protos/protos.js new file mode 100644 index 00000000000..43bea2b29fb --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/protos.js @@ -0,0 +1,64227 @@ +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ 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"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_netapp_protos || ($protobuf.roots._google_cloud_netapp_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.netapp = (function() { + + /** + * Namespace netapp. + * @memberof google.cloud + * @namespace + */ + var netapp = {}; + + netapp.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.netapp + * @namespace + */ + var v1 = {}; + + v1.ListActiveDirectoriesRequest = (function() { + + /** + * Properties of a ListActiveDirectoriesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListActiveDirectoriesRequest + * @property {string|null} [parent] ListActiveDirectoriesRequest parent + * @property {number|null} [pageSize] ListActiveDirectoriesRequest pageSize + * @property {string|null} [pageToken] ListActiveDirectoriesRequest pageToken + * @property {string|null} [filter] ListActiveDirectoriesRequest filter + * @property {string|null} [orderBy] ListActiveDirectoriesRequest orderBy + */ + + /** + * Constructs a new ListActiveDirectoriesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListActiveDirectoriesRequest. + * @implements IListActiveDirectoriesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set + */ + function ListActiveDirectoriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActiveDirectoriesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.parent = ""; + + /** + * ListActiveDirectoriesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.pageSize = 0; + + /** + * ListActiveDirectoriesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.pageToken = ""; + + /** + * ListActiveDirectoriesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.filter = ""; + + /** + * ListActiveDirectoriesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + */ + ListActiveDirectoriesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListActiveDirectoriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest instance + */ + ListActiveDirectoriesRequest.create = function create(properties) { + return new ListActiveDirectoriesRequest(properties); + }; + + /** + * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActiveDirectoriesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActiveDirectoriesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest + */ + ListActiveDirectoriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {google.cloud.netapp.v1.ListActiveDirectoriesRequest} message ListActiveDirectoriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActiveDirectoriesRequest.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; + }; + + /** + * Converts this ListActiveDirectoriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListActiveDirectoriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListActiveDirectoriesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActiveDirectoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesRequest"; + }; + + return ListActiveDirectoriesRequest; + })(); + + v1.ListActiveDirectoriesResponse = (function() { + + /** + * Properties of a ListActiveDirectoriesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListActiveDirectoriesResponse + * @property {Array.|null} [activeDirectories] ListActiveDirectoriesResponse activeDirectories + * @property {string|null} [nextPageToken] ListActiveDirectoriesResponse nextPageToken + * @property {Array.|null} [unreachable] ListActiveDirectoriesResponse unreachable + */ + + /** + * Constructs a new ListActiveDirectoriesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListActiveDirectoriesResponse. + * @implements IListActiveDirectoriesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set + */ + function ListActiveDirectoriesResponse(properties) { + this.activeDirectories = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListActiveDirectoriesResponse activeDirectories. + * @member {Array.} activeDirectories + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.activeDirectories = $util.emptyArray; + + /** + * ListActiveDirectoriesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.nextPageToken = ""; + + /** + * ListActiveDirectoriesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + */ + ListActiveDirectoriesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListActiveDirectoriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse instance + */ + ListActiveDirectoriesResponse.create = function create(properties) { + return new ListActiveDirectoriesResponse(properties); + }; + + /** + * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activeDirectories != null && message.activeDirectories.length) + for (var i = 0; i < message.activeDirectories.length; ++i) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListActiveDirectoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.activeDirectories && message.activeDirectories.length)) + message.activeDirectories = []; + message.activeDirectories.push($root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListActiveDirectoriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListActiveDirectoriesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListActiveDirectoriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.activeDirectories != null && message.hasOwnProperty("activeDirectories")) { + if (!Array.isArray(message.activeDirectories)) + return "activeDirectories: array expected"; + for (var i = 0; i < message.activeDirectories.length; ++i) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectories[i]); + if (error) + return "activeDirectories." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse + */ + ListActiveDirectoriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); + if (object.activeDirectories) { + if (!Array.isArray(object.activeDirectories)) + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: array expected"); + message.activeDirectories = []; + for (var i = 0; i < object.activeDirectories.length; ++i) { + if (typeof object.activeDirectories[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: object expected"); + message.activeDirectories[i] = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectories[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} message ListActiveDirectoriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListActiveDirectoriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.activeDirectories = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.activeDirectories && message.activeDirectories.length) { + object.activeDirectories = []; + for (var j = 0; j < message.activeDirectories.length; ++j) + object.activeDirectories[j] = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectories[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListActiveDirectoriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListActiveDirectoriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListActiveDirectoriesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListActiveDirectoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesResponse"; + }; + + return ListActiveDirectoriesResponse; + })(); + + v1.GetActiveDirectoryRequest = (function() { + + /** + * Properties of a GetActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetActiveDirectoryRequest + * @property {string|null} [name] GetActiveDirectoryRequest name + */ + + /** + * Constructs a new GetActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetActiveDirectoryRequest. + * @implements IGetActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set + */ + function GetActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetActiveDirectoryRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @instance + */ + GetActiveDirectoryRequest.prototype.name = ""; + + /** + * Creates a new GetActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest instance + */ + GetActiveDirectoryRequest.create = function create(properties) { + return new GetActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetActiveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetActiveDirectoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetActiveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest + */ + GetActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.GetActiveDirectoryRequest} message GetActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + GetActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetActiveDirectoryRequest"; + }; + + return GetActiveDirectoryRequest; + })(); + + v1.CreateActiveDirectoryRequest = (function() { + + /** + * Properties of a CreateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateActiveDirectoryRequest + * @property {string|null} [parent] CreateActiveDirectoryRequest parent + * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] CreateActiveDirectoryRequest activeDirectory + * @property {string|null} [activeDirectoryId] CreateActiveDirectoryRequest activeDirectoryId + */ + + /** + * Constructs a new CreateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateActiveDirectoryRequest. + * @implements ICreateActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set + */ + function CreateActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateActiveDirectoryRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.parent = ""; + + /** + * CreateActiveDirectoryRequest activeDirectory. + * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.activeDirectory = null; + + /** + * CreateActiveDirectoryRequest activeDirectoryId. + * @member {string} activeDirectoryId + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + */ + CreateActiveDirectoryRequest.prototype.activeDirectoryId = ""; + + /** + * Creates a new CreateActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest instance + */ + CreateActiveDirectoryRequest.create = function create(properties) { + return new CreateActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateActiveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.activeDirectoryId != null && Object.hasOwnProperty.call(message, "activeDirectoryId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.activeDirectoryId); + return writer; + }; + + /** + * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateActiveDirectoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); + break; + } + case 3: { + message.activeDirectoryId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateActiveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); + if (error) + return "activeDirectory." + error; + } + if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) + if (!$util.isString(message.activeDirectoryId)) + return "activeDirectoryId: string expected"; + return null; + }; + + /** + * Creates a CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest + */ + CreateActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.activeDirectory != null) { + if (typeof object.activeDirectory !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateActiveDirectoryRequest.activeDirectory: object expected"); + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); + } + if (object.activeDirectoryId != null) + message.activeDirectoryId = String(object.activeDirectoryId); + return message; + }; + + /** + * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.CreateActiveDirectoryRequest} message CreateActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.activeDirectory = null; + object.activeDirectoryId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); + if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) + object.activeDirectoryId = message.activeDirectoryId; + return object; + }; + + /** + * Converts this CreateActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateActiveDirectoryRequest"; + }; + + return CreateActiveDirectoryRequest; + })(); + + v1.UpdateActiveDirectoryRequest = (function() { + + /** + * Properties of an UpdateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateActiveDirectoryRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateActiveDirectoryRequest updateMask + * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] UpdateActiveDirectoryRequest activeDirectory + */ + + /** + * Constructs a new UpdateActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateActiveDirectoryRequest. + * @implements IUpdateActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set + */ + function UpdateActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateActiveDirectoryRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + */ + UpdateActiveDirectoryRequest.prototype.updateMask = null; + + /** + * UpdateActiveDirectoryRequest activeDirectory. + * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + */ + UpdateActiveDirectoryRequest.prototype.activeDirectory = null; + + /** + * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest instance + */ + UpdateActiveDirectoryRequest.create = function create(properties) { + return new UpdateActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateActiveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateActiveDirectoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateActiveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { + var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); + if (error) + return "activeDirectory." + error; + } + return null; + }; + + /** + * Creates an UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest + */ + UpdateActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.activeDirectory != null) { + if (typeof object.activeDirectory !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.activeDirectory: object expected"); + message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); + } + return message; + }; + + /** + * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.activeDirectory = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); + return object; + }; + + /** + * Converts this UpdateActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateActiveDirectoryRequest"; + }; + + return UpdateActiveDirectoryRequest; + })(); + + v1.DeleteActiveDirectoryRequest = (function() { + + /** + * Properties of a DeleteActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteActiveDirectoryRequest + * @property {string|null} [name] DeleteActiveDirectoryRequest name + */ + + /** + * Constructs a new DeleteActiveDirectoryRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteActiveDirectoryRequest. + * @implements IDeleteActiveDirectoryRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set + */ + function DeleteActiveDirectoryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteActiveDirectoryRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @instance + */ + DeleteActiveDirectoryRequest.prototype.name = ""; + + /** + * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest instance + */ + DeleteActiveDirectoryRequest.create = function create(properties) { + return new DeleteActiveDirectoryRequest(properties); + }; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteActiveDirectoryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteActiveDirectoryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteActiveDirectoryRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteActiveDirectoryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest + */ + DeleteActiveDirectoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteActiveDirectoryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteActiveDirectoryRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteActiveDirectoryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteActiveDirectoryRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteActiveDirectoryRequest"; + }; + + return DeleteActiveDirectoryRequest; + })(); + + v1.ActiveDirectory = (function() { + + /** + * Properties of an ActiveDirectory. + * @memberof google.cloud.netapp.v1 + * @interface IActiveDirectory + * @property {string|null} [name] ActiveDirectory name + * @property {google.protobuf.ITimestamp|null} [createTime] ActiveDirectory createTime + * @property {google.cloud.netapp.v1.ActiveDirectory.State|null} [state] ActiveDirectory state + * @property {string|null} [domain] ActiveDirectory domain + * @property {string|null} [site] ActiveDirectory site + * @property {string|null} [dns] ActiveDirectory dns + * @property {string|null} [netBiosPrefix] ActiveDirectory netBiosPrefix + * @property {string|null} [organizationalUnit] ActiveDirectory organizationalUnit + * @property {boolean|null} [aesEncryption] ActiveDirectory aesEncryption + * @property {string|null} [username] ActiveDirectory username + * @property {string|null} [password] ActiveDirectory password + * @property {Array.|null} [backupOperators] ActiveDirectory backupOperators + * @property {Array.|null} [administrators] ActiveDirectory administrators + * @property {Array.|null} [securityOperators] ActiveDirectory securityOperators + * @property {string|null} [kdcHostname] ActiveDirectory kdcHostname + * @property {string|null} [kdcIp] ActiveDirectory kdcIp + * @property {boolean|null} [nfsUsersWithLdap] ActiveDirectory nfsUsersWithLdap + * @property {string|null} [description] ActiveDirectory description + * @property {boolean|null} [ldapSigning] ActiveDirectory ldapSigning + * @property {boolean|null} [encryptDcConnections] ActiveDirectory encryptDcConnections + * @property {Object.|null} [labels] ActiveDirectory labels + * @property {string|null} [stateDetails] ActiveDirectory stateDetails + */ + + /** + * Constructs a new ActiveDirectory. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ActiveDirectory. + * @implements IActiveDirectory + * @constructor + * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set + */ + function ActiveDirectory(properties) { + this.backupOperators = []; + this.administrators = []; + this.securityOperators = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActiveDirectory name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.name = ""; + + /** + * ActiveDirectory createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.createTime = null; + + /** + * ActiveDirectory state. + * @member {google.cloud.netapp.v1.ActiveDirectory.State} state + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.state = 0; + + /** + * ActiveDirectory domain. + * @member {string} domain + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.domain = ""; + + /** + * ActiveDirectory site. + * @member {string} site + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.site = ""; + + /** + * ActiveDirectory dns. + * @member {string} dns + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.dns = ""; + + /** + * ActiveDirectory netBiosPrefix. + * @member {string} netBiosPrefix + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.netBiosPrefix = ""; + + /** + * ActiveDirectory organizationalUnit. + * @member {string} organizationalUnit + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.organizationalUnit = ""; + + /** + * ActiveDirectory aesEncryption. + * @member {boolean} aesEncryption + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.aesEncryption = false; + + /** + * ActiveDirectory username. + * @member {string} username + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.username = ""; + + /** + * ActiveDirectory password. + * @member {string} password + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.password = ""; + + /** + * ActiveDirectory backupOperators. + * @member {Array.} backupOperators + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.backupOperators = $util.emptyArray; + + /** + * ActiveDirectory administrators. + * @member {Array.} administrators + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.administrators = $util.emptyArray; + + /** + * ActiveDirectory securityOperators. + * @member {Array.} securityOperators + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.securityOperators = $util.emptyArray; + + /** + * ActiveDirectory kdcHostname. + * @member {string} kdcHostname + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.kdcHostname = ""; + + /** + * ActiveDirectory kdcIp. + * @member {string} kdcIp + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.kdcIp = ""; + + /** + * ActiveDirectory nfsUsersWithLdap. + * @member {boolean} nfsUsersWithLdap + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.nfsUsersWithLdap = false; + + /** + * ActiveDirectory description. + * @member {string} description + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.description = ""; + + /** + * ActiveDirectory ldapSigning. + * @member {boolean} ldapSigning + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.ldapSigning = false; + + /** + * ActiveDirectory encryptDcConnections. + * @member {boolean} encryptDcConnections + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.encryptDcConnections = false; + + /** + * ActiveDirectory labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.labels = $util.emptyObject; + + /** + * ActiveDirectory stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + */ + ActiveDirectory.prototype.stateDetails = ""; + + /** + * Creates a new ActiveDirectory instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory instance + */ + ActiveDirectory.create = function create(properties) { + return new ActiveDirectory(properties); + }; + + /** + * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveDirectory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.domain); + if (message.site != null && Object.hasOwnProperty.call(message, "site")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.site); + if (message.dns != null && Object.hasOwnProperty.call(message, "dns")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dns); + if (message.netBiosPrefix != null && Object.hasOwnProperty.call(message, "netBiosPrefix")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.netBiosPrefix); + if (message.organizationalUnit != null && Object.hasOwnProperty.call(message, "organizationalUnit")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.organizationalUnit); + if (message.aesEncryption != null && Object.hasOwnProperty.call(message, "aesEncryption")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.aesEncryption); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.password); + if (message.backupOperators != null && message.backupOperators.length) + for (var i = 0; i < message.backupOperators.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.backupOperators[i]); + if (message.securityOperators != null && message.securityOperators.length) + for (var i = 0; i < message.securityOperators.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.securityOperators[i]); + if (message.kdcHostname != null && Object.hasOwnProperty.call(message, "kdcHostname")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.kdcHostname); + if (message.kdcIp != null && Object.hasOwnProperty.call(message, "kdcIp")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.kdcIp); + if (message.nfsUsersWithLdap != null && Object.hasOwnProperty.call(message, "nfsUsersWithLdap")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.nfsUsersWithLdap); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); + if (message.ldapSigning != null && Object.hasOwnProperty.call(message, "ldapSigning")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.ldapSigning); + if (message.encryptDcConnections != null && Object.hasOwnProperty.call(message, "encryptDcConnections")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.encryptDcConnections); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.stateDetails); + if (message.administrators != null && message.administrators.length) + for (var i = 0; i < message.administrators.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.administrators[i]); + return writer; + }; + + /** + * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActiveDirectory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveDirectory.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ActiveDirectory(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.domain = reader.string(); + break; + } + case 5: { + message.site = reader.string(); + break; + } + case 6: { + message.dns = reader.string(); + break; + } + case 7: { + message.netBiosPrefix = reader.string(); + break; + } + case 8: { + message.organizationalUnit = reader.string(); + break; + } + case 9: { + message.aesEncryption = reader.bool(); + break; + } + case 10: { + message.username = reader.string(); + break; + } + case 11: { + message.password = reader.string(); + break; + } + case 12: { + if (!(message.backupOperators && message.backupOperators.length)) + message.backupOperators = []; + message.backupOperators.push(reader.string()); + break; + } + case 22: { + if (!(message.administrators && message.administrators.length)) + message.administrators = []; + message.administrators.push(reader.string()); + break; + } + case 13: { + if (!(message.securityOperators && message.securityOperators.length)) + message.securityOperators = []; + message.securityOperators.push(reader.string()); + break; + } + case 14: { + message.kdcHostname = reader.string(); + break; + } + case 15: { + message.kdcIp = reader.string(); + break; + } + case 16: { + message.nfsUsersWithLdap = reader.bool(); + break; + } + case 17: { + message.description = reader.string(); + break; + } + case 18: { + message.ldapSigning = reader.bool(); + break; + } + case 19: { + message.encryptDcConnections = reader.bool(); + break; + } + case 20: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 21: { + message.stateDetails = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActiveDirectory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActiveDirectory message. + * @function verify + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActiveDirectory.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + 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: + case 7: + break; + } + if (message.domain != null && message.hasOwnProperty("domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.site != null && message.hasOwnProperty("site")) + if (!$util.isString(message.site)) + return "site: string expected"; + if (message.dns != null && message.hasOwnProperty("dns")) + if (!$util.isString(message.dns)) + return "dns: string expected"; + if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) + if (!$util.isString(message.netBiosPrefix)) + return "netBiosPrefix: string expected"; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + if (!$util.isString(message.organizationalUnit)) + return "organizationalUnit: string expected"; + if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) + if (typeof message.aesEncryption !== "boolean") + return "aesEncryption: boolean expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.backupOperators != null && message.hasOwnProperty("backupOperators")) { + if (!Array.isArray(message.backupOperators)) + return "backupOperators: array expected"; + for (var i = 0; i < message.backupOperators.length; ++i) + if (!$util.isString(message.backupOperators[i])) + return "backupOperators: string[] expected"; + } + if (message.administrators != null && message.hasOwnProperty("administrators")) { + if (!Array.isArray(message.administrators)) + return "administrators: array expected"; + for (var i = 0; i < message.administrators.length; ++i) + if (!$util.isString(message.administrators[i])) + return "administrators: string[] expected"; + } + if (message.securityOperators != null && message.hasOwnProperty("securityOperators")) { + if (!Array.isArray(message.securityOperators)) + return "securityOperators: array expected"; + for (var i = 0; i < message.securityOperators.length; ++i) + if (!$util.isString(message.securityOperators[i])) + return "securityOperators: string[] expected"; + } + if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) + if (!$util.isString(message.kdcHostname)) + return "kdcHostname: string expected"; + if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) + if (!$util.isString(message.kdcIp)) + return "kdcIp: string expected"; + if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) + if (typeof message.nfsUsersWithLdap !== "boolean") + return "nfsUsersWithLdap: boolean expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) + if (typeof message.ldapSigning !== "boolean") + return "ldapSigning: boolean expected"; + if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) + if (typeof message.encryptDcConnections !== "boolean") + return "encryptDcConnections: boolean expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + return null; + }; + + /** + * Creates an ActiveDirectory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory + */ + ActiveDirectory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ActiveDirectory) + return object; + var message = new $root.google.cloud.netapp.v1.ActiveDirectory(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + 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 "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "IN_USE": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + case "DIAGNOSING": + case 7: + message.state = 7; + break; + } + if (object.domain != null) + message.domain = String(object.domain); + if (object.site != null) + message.site = String(object.site); + if (object.dns != null) + message.dns = String(object.dns); + if (object.netBiosPrefix != null) + message.netBiosPrefix = String(object.netBiosPrefix); + if (object.organizationalUnit != null) + message.organizationalUnit = String(object.organizationalUnit); + if (object.aesEncryption != null) + message.aesEncryption = Boolean(object.aesEncryption); + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.backupOperators) { + if (!Array.isArray(object.backupOperators)) + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.backupOperators: array expected"); + message.backupOperators = []; + for (var i = 0; i < object.backupOperators.length; ++i) + message.backupOperators[i] = String(object.backupOperators[i]); + } + if (object.administrators) { + if (!Array.isArray(object.administrators)) + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.administrators: array expected"); + message.administrators = []; + for (var i = 0; i < object.administrators.length; ++i) + message.administrators[i] = String(object.administrators[i]); + } + if (object.securityOperators) { + if (!Array.isArray(object.securityOperators)) + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.securityOperators: array expected"); + message.securityOperators = []; + for (var i = 0; i < object.securityOperators.length; ++i) + message.securityOperators[i] = String(object.securityOperators[i]); + } + if (object.kdcHostname != null) + message.kdcHostname = String(object.kdcHostname); + if (object.kdcIp != null) + message.kdcIp = String(object.kdcIp); + if (object.nfsUsersWithLdap != null) + message.nfsUsersWithLdap = Boolean(object.nfsUsersWithLdap); + if (object.description != null) + message.description = String(object.description); + if (object.ldapSigning != null) + message.ldapSigning = Boolean(object.ldapSigning); + if (object.encryptDcConnections != null) + message.encryptDcConnections = Boolean(object.encryptDcConnections); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + return message; + }; + + /** + * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {google.cloud.netapp.v1.ActiveDirectory} message ActiveDirectory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActiveDirectory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupOperators = []; + object.securityOperators = []; + object.administrators = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.domain = ""; + object.site = ""; + object.dns = ""; + object.netBiosPrefix = ""; + object.organizationalUnit = ""; + object.aesEncryption = false; + object.username = ""; + object.password = ""; + object.kdcHostname = ""; + object.kdcIp = ""; + object.nfsUsersWithLdap = false; + object.description = ""; + object.ldapSigning = false; + object.encryptDcConnections = false; + object.stateDetails = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] : message.state; + if (message.domain != null && message.hasOwnProperty("domain")) + object.domain = message.domain; + if (message.site != null && message.hasOwnProperty("site")) + object.site = message.site; + if (message.dns != null && message.hasOwnProperty("dns")) + object.dns = message.dns; + if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) + object.netBiosPrefix = message.netBiosPrefix; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + object.organizationalUnit = message.organizationalUnit; + if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) + object.aesEncryption = message.aesEncryption; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.backupOperators && message.backupOperators.length) { + object.backupOperators = []; + for (var j = 0; j < message.backupOperators.length; ++j) + object.backupOperators[j] = message.backupOperators[j]; + } + if (message.securityOperators && message.securityOperators.length) { + object.securityOperators = []; + for (var j = 0; j < message.securityOperators.length; ++j) + object.securityOperators[j] = message.securityOperators[j]; + } + if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) + object.kdcHostname = message.kdcHostname; + if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) + object.kdcIp = message.kdcIp; + if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) + object.nfsUsersWithLdap = message.nfsUsersWithLdap; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) + object.ldapSigning = message.ldapSigning; + if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) + object.encryptDcConnections = message.encryptDcConnections; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.administrators && message.administrators.length) { + object.administrators = []; + for (var j = 0; j < message.administrators.length; ++j) + object.administrators[j] = message.administrators[j]; + } + return object; + }; + + /** + * Converts this ActiveDirectory to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @instance + * @returns {Object.} JSON object + */ + ActiveDirectory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActiveDirectory + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ActiveDirectory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActiveDirectory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ActiveDirectory"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.ActiveDirectory.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} IN_USE=4 IN_USE value + * @property {number} DELETING=5 DELETING value + * @property {number} ERROR=6 ERROR value + * @property {number} DIAGNOSING=7 DIAGNOSING value + */ + ActiveDirectory.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "IN_USE"] = 4; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[7] = "DIAGNOSING"] = 7; + return values; + })(); + + return ActiveDirectory; + })(); + + v1.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.netapp.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {google.cloud.netapp.v1.Backup.State|null} [state] Backup state + * @property {string|null} [description] Backup description + * @property {number|Long|null} [volumeUsageBytes] Backup volumeUsageBytes + * @property {google.cloud.netapp.v1.Backup.Type|null} [backupType] Backup backupType + * @property {string|null} [sourceVolume] Backup sourceVolume + * @property {string|null} [sourceSnapshot] Backup sourceSnapshot + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {Object.|null} [labels] Backup labels + * @property {number|Long|null} [chainStorageBytes] Backup chainStorageBytes + * @property {boolean|null} [satisfiesPzs] Backup satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Backup satisfiesPzi + * @property {string|null} [volumeRegion] Backup volumeRegion + * @property {string|null} [backupRegion] Backup backupRegion + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.netapp.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup state. + * @member {google.cloud.netapp.v1.Backup.State} state + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.description = ""; + + /** + * Backup volumeUsageBytes. + * @member {number|Long} volumeUsageBytes + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.volumeUsageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup backupType. + * @member {google.cloud.netapp.v1.Backup.Type} backupType + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.sourceVolume = ""; + + /** + * Backup sourceSnapshot. + * @member {string|null|undefined} sourceSnapshot + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.sourceSnapshot = null; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; + + /** + * Backup chainStorageBytes. + * @member {number|Long} chainStorageBytes + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.chainStorageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.satisfiesPzs = false; + + /** + * Backup satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.satisfiesPzi = false; + + /** + * Backup volumeRegion. + * @member {string} volumeRegion + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.volumeRegion = ""; + + /** + * Backup backupRegion. + * @member {string} backupRegion + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.backupRegion = ""; + + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.netapp.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_sourceSnapshot", { + get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {google.cloud.netapp.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.netapp.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {google.cloud.netapp.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.volumeUsageBytes != null && Object.hasOwnProperty.call(message, "volumeUsageBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.volumeUsageBytes); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.backupType); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceVolume); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceSnapshot); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.chainStorageBytes != null && Object.hasOwnProperty.call(message, "chainStorageBytes")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.chainStorageBytes); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.satisfiesPzi); + if (message.volumeRegion != null && Object.hasOwnProperty.call(message, "volumeRegion")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.volumeRegion); + if (message.backupRegion != null && Object.hasOwnProperty.call(message, "backupRegion")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupRegion); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {google.cloud.netapp.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.volumeUsageBytes = reader.int64(); + break; + } + case 5: { + message.backupType = reader.int32(); + break; + } + case 6: { + message.sourceVolume = reader.string(); + break; + } + case 7: { + message.sourceSnapshot = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 10: { + message.chainStorageBytes = reader.int64(); + break; + } + case 11: { + message.satisfiesPzs = reader.bool(); + break; + } + case 12: { + message.satisfiesPzi = reader.bool(); + break; + } + case 13: { + message.volumeRegion = reader.string(); + break; + } + case 14: { + message.backupRegion = reader.string(); + break; + } + case 15: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.volumeUsageBytes != null && message.hasOwnProperty("volumeUsageBytes")) + if (!$util.isInteger(message.volumeUsageBytes) && !(message.volumeUsageBytes && $util.isInteger(message.volumeUsageBytes.low) && $util.isInteger(message.volumeUsageBytes.high))) + return "volumeUsageBytes: integer|Long expected"; + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + properties._sourceSnapshot = 1; + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.chainStorageBytes != null && message.hasOwnProperty("chainStorageBytes")) + if (!$util.isInteger(message.chainStorageBytes) && !(message.chainStorageBytes && $util.isInteger(message.chainStorageBytes.low) && $util.isInteger(message.chainStorageBytes.high))) + return "chainStorageBytes: integer|Long expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + if (message.volumeRegion != null && message.hasOwnProperty("volumeRegion")) + if (!$util.isString(message.volumeRegion)) + return "volumeRegion: string expected"; + if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) + if (!$util.isString(message.backupRegion)) + return "backupRegion: string expected"; + if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Backup) + return object; + var message = new $root.google.cloud.netapp.v1.Backup(); + 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 "UPLOADING": + case 2: + message.state = 2; + break; + case "READY": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + case "UPDATING": + case 6: + message.state = 6; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.volumeUsageBytes != null) + if ($util.Long) + (message.volumeUsageBytes = $util.Long.fromValue(object.volumeUsageBytes)).unsigned = false; + else if (typeof object.volumeUsageBytes === "string") + message.volumeUsageBytes = parseInt(object.volumeUsageBytes, 10); + else if (typeof object.volumeUsageBytes === "number") + message.volumeUsageBytes = object.volumeUsageBytes; + else if (typeof object.volumeUsageBytes === "object") + message.volumeUsageBytes = new $util.LongBits(object.volumeUsageBytes.low >>> 0, object.volumeUsageBytes.high >>> 0).toNumber(); + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "MANUAL": + case 1: + message.backupType = 1; + break; + case "SCHEDULED": + case 2: + message.backupType = 2; + break; + } + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Backup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Backup.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.chainStorageBytes != null) + if ($util.Long) + (message.chainStorageBytes = $util.Long.fromValue(object.chainStorageBytes)).unsigned = false; + else if (typeof object.chainStorageBytes === "string") + message.chainStorageBytes = parseInt(object.chainStorageBytes, 10); + else if (typeof object.chainStorageBytes === "number") + message.chainStorageBytes = object.chainStorageBytes; + else if (typeof object.chainStorageBytes === "object") + message.chainStorageBytes = new $util.LongBits(object.chainStorageBytes.low >>> 0, object.chainStorageBytes.high >>> 0).toNumber(); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.volumeRegion != null) + message.volumeRegion = String(object.volumeRegion); + if (object.backupRegion != null) + message.backupRegion = String(object.backupRegion); + if (object.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {google.cloud.netapp.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.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.description = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.volumeUsageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.volumeUsageBytes = options.longs === String ? "0" : 0; + object.backupType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.sourceVolume = ""; + object.createTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.chainStorageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.chainStorageBytes = options.longs === String ? "0" : 0; + object.satisfiesPzs = false; + object.satisfiesPzi = false; + object.volumeRegion = ""; + object.backupRegion = ""; + object.enforcedRetentionEndTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Backup.State[message.state] : message.state; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.volumeUsageBytes != null && message.hasOwnProperty("volumeUsageBytes")) + if (typeof message.volumeUsageBytes === "number") + object.volumeUsageBytes = options.longs === String ? String(message.volumeUsageBytes) : message.volumeUsageBytes; + else + object.volumeUsageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.volumeUsageBytes) : options.longs === Number ? new $util.LongBits(message.volumeUsageBytes.low >>> 0, message.volumeUsageBytes.high >>> 0).toNumber() : message.volumeUsageBytes; + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.netapp.v1.Backup.Type[message.backupType] === undefined ? message.backupType : $root.google.cloud.netapp.v1.Backup.Type[message.backupType] : message.backupType; + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + object.sourceSnapshot = message.sourceSnapshot; + if (options.oneofs) + object._sourceSnapshot = "sourceSnapshot"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.chainStorageBytes != null && message.hasOwnProperty("chainStorageBytes")) + if (typeof message.chainStorageBytes === "number") + object.chainStorageBytes = options.longs === String ? String(message.chainStorageBytes) : message.chainStorageBytes; + else + object.chainStorageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.chainStorageBytes) : options.longs === Number ? new $util.LongBits(message.chainStorageBytes.low >>> 0, message.chainStorageBytes.high >>> 0).toNumber() : message.chainStorageBytes; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + if (message.volumeRegion != null && message.hasOwnProperty("volumeRegion")) + object.volumeRegion = message.volumeRegion; + if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) + object.backupRegion = message.backupRegion; + if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Backup"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} UPLOADING=2 UPLOADING value + * @property {number} READY=3 READY value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + * @property {number} UPDATING=6 UPDATING value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "UPLOADING"] = 2; + values[valuesById[3] = "READY"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + values[valuesById[6] = "UPDATING"] = 6; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.netapp.v1.Backup.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} MANUAL=1 MANUAL value + * @property {number} SCHEDULED=2 SCHEDULED value + */ + Backup.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MANUAL"] = 1; + values[valuesById[2] = "SCHEDULED"] = 2; + return values; + })(); + + return Backup; + })(); + + v1.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {string|null} [filter] ListBackupsRequest filter + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupsRequest) + return object; + var message = new $root.google.cloud.netapp.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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {google.cloud.netapp.v1.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.netapp.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.netapp.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.netapp.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {google.cloud.netapp.v1.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.netapp.v1.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetBackupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {google.cloud.netapp.v1.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1.CreateBackupRequest = (function() { + + /** + * Properties of a CreateBackupRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateBackupRequest + * @property {string|null} [parent] CreateBackupRequest parent + * @property {string|null} [backupId] CreateBackupRequest backupId + * @property {google.cloud.netapp.v1.IBackup|null} [backup] CreateBackupRequest backup + */ + + /** + * Constructs a new CreateBackupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateBackupRequest. + * @implements ICreateBackupRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateBackupRequest=} [properties] Properties to set + */ + function CreateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.parent = ""; + + /** + * CreateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backupId = ""; + + /** + * CreateBackupRequest backup. + * @member {google.cloud.netapp.v1.IBackup|null|undefined} backup + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @instance + */ + CreateBackupRequest.prototype.backup = null; + + /** + * Creates a new CreateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest instance + */ + CreateBackupRequest.create = function create(properties) { + return new CreateBackupRequest(properties); + }; + + /** + * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.netapp.v1.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupId = reader.string(); + break; + } + case 3: { + message.backup = $root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.netapp.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + return null; + }; + + /** + * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest + */ + CreateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateBackupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateBackupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.netapp.v1.Backup.fromObject(object.backup); + } + return message; + }; + + /** + * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {google.cloud.netapp.v1.CreateBackupRequest} message CreateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupId = ""; + object.backup = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.netapp.v1.Backup.toObject(message.backup, options); + return object; + }; + + /** + * Converts this CreateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupRequest"; + }; + + return CreateBackupRequest; + })(); + + v1.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {google.cloud.netapp.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.netapp.v1.IBackup|null} [backup] UpdateBackupRequest backup + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * UpdateBackupRequest backup. + * @member {google.cloud.netapp.v1.IBackup|null|undefined} backup + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.netapp.v1.Backup.encode(message.backup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.backup = $root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.netapp.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.netapp.v1.Backup.fromObject(object.backup); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {google.cloud.netapp.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + } + 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.netapp.v1.Backup.toObject(message.backup, options); + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v1.BackupPolicy = (function() { + + /** + * Properties of a BackupPolicy. + * @memberof google.cloud.netapp.v1 + * @interface IBackupPolicy + * @property {string|null} [name] BackupPolicy name + * @property {number|null} [dailyBackupLimit] BackupPolicy dailyBackupLimit + * @property {number|null} [weeklyBackupLimit] BackupPolicy weeklyBackupLimit + * @property {number|null} [monthlyBackupLimit] BackupPolicy monthlyBackupLimit + * @property {string|null} [description] BackupPolicy description + * @property {boolean|null} [enabled] BackupPolicy enabled + * @property {number|null} [assignedVolumeCount] BackupPolicy assignedVolumeCount + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPolicy createTime + * @property {Object.|null} [labels] BackupPolicy labels + * @property {google.cloud.netapp.v1.BackupPolicy.State|null} [state] BackupPolicy state + */ + + /** + * Constructs a new BackupPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a BackupPolicy. + * @implements IBackupPolicy + * @constructor + * @param {google.cloud.netapp.v1.IBackupPolicy=} [properties] Properties to set + */ + function BackupPolicy(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPolicy name. + * @member {string} name + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.name = ""; + + /** + * BackupPolicy dailyBackupLimit. + * @member {number|null|undefined} dailyBackupLimit + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.dailyBackupLimit = null; + + /** + * BackupPolicy weeklyBackupLimit. + * @member {number|null|undefined} weeklyBackupLimit + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.weeklyBackupLimit = null; + + /** + * BackupPolicy monthlyBackupLimit. + * @member {number|null|undefined} monthlyBackupLimit + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.monthlyBackupLimit = null; + + /** + * BackupPolicy description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.description = null; + + /** + * BackupPolicy enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.enabled = null; + + /** + * BackupPolicy assignedVolumeCount. + * @member {number|null|undefined} assignedVolumeCount + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.assignedVolumeCount = null; + + /** + * BackupPolicy createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.createTime = null; + + /** + * BackupPolicy labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.labels = $util.emptyObject; + + /** + * BackupPolicy state. + * @member {google.cloud.netapp.v1.BackupPolicy.State} state + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + */ + BackupPolicy.prototype.state = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_dailyBackupLimit", { + get: $util.oneOfGetter($oneOfFields = ["dailyBackupLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_weeklyBackupLimit", { + get: $util.oneOfGetter($oneOfFields = ["weeklyBackupLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_monthlyBackupLimit", { + get: $util.oneOfGetter($oneOfFields = ["monthlyBackupLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupPolicy.prototype, "_assignedVolumeCount", { + get: $util.oneOfGetter($oneOfFields = ["assignedVolumeCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {google.cloud.netapp.v1.IBackupPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy instance + */ + BackupPolicy.create = function create(properties) { + return new BackupPolicy(properties); + }; + + /** + * Encodes the specified BackupPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {google.cloud.netapp.v1.IBackupPolicy} message BackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dailyBackupLimit != null && Object.hasOwnProperty.call(message, "dailyBackupLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dailyBackupLimit); + if (message.weeklyBackupLimit != null && Object.hasOwnProperty.call(message, "weeklyBackupLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.weeklyBackupLimit); + if (message.monthlyBackupLimit != null && Object.hasOwnProperty.call(message, "monthlyBackupLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.monthlyBackupLimit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enabled); + if (message.assignedVolumeCount != null && Object.hasOwnProperty.call(message, "assignedVolumeCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.assignedVolumeCount); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + return writer; + }; + + /** + * Encodes the specified BackupPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {google.cloud.netapp.v1.IBackupPolicy} message BackupPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupPolicy(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dailyBackupLimit = reader.int32(); + break; + } + case 3: { + message.weeklyBackupLimit = reader.int32(); + break; + } + case 4: { + message.monthlyBackupLimit = reader.int32(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.enabled = reader.bool(); + break; + } + case 7: { + message.assignedVolumeCount = reader.int32(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 10: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dailyBackupLimit != null && message.hasOwnProperty("dailyBackupLimit")) { + properties._dailyBackupLimit = 1; + if (!$util.isInteger(message.dailyBackupLimit)) + return "dailyBackupLimit: integer expected"; + } + if (message.weeklyBackupLimit != null && message.hasOwnProperty("weeklyBackupLimit")) { + properties._weeklyBackupLimit = 1; + if (!$util.isInteger(message.weeklyBackupLimit)) + return "weeklyBackupLimit: integer expected"; + } + if (message.monthlyBackupLimit != null && message.hasOwnProperty("monthlyBackupLimit")) { + properties._monthlyBackupLimit = 1; + if (!$util.isInteger(message.monthlyBackupLimit)) + return "monthlyBackupLimit: integer expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + if (message.assignedVolumeCount != null && message.hasOwnProperty("assignedVolumeCount")) { + properties._assignedVolumeCount = 1; + if (!$util.isInteger(message.assignedVolumeCount)) + return "assignedVolumeCount: integer expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.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; + } + return null; + }; + + /** + * Creates a BackupPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy + */ + BackupPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.BackupPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.BackupPolicy(); + if (object.name != null) + message.name = String(object.name); + if (object.dailyBackupLimit != null) + message.dailyBackupLimit = object.dailyBackupLimit | 0; + if (object.weeklyBackupLimit != null) + message.weeklyBackupLimit = object.weeklyBackupLimit | 0; + if (object.monthlyBackupLimit != null) + message.monthlyBackupLimit = object.monthlyBackupLimit | 0; + if (object.description != null) + message.description = String(object.description); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.assignedVolumeCount != null) + message.assignedVolumeCount = object.assignedVolumeCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.BackupPolicy.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.BackupPolicy.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + 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 "READY": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + case "UPDATING": + case 5: + message.state = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a BackupPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {google.cloud.netapp.v1.BackupPolicy} message BackupPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dailyBackupLimit != null && message.hasOwnProperty("dailyBackupLimit")) { + object.dailyBackupLimit = message.dailyBackupLimit; + if (options.oneofs) + object._dailyBackupLimit = "dailyBackupLimit"; + } + if (message.weeklyBackupLimit != null && message.hasOwnProperty("weeklyBackupLimit")) { + object.weeklyBackupLimit = message.weeklyBackupLimit; + if (options.oneofs) + object._weeklyBackupLimit = "weeklyBackupLimit"; + } + if (message.monthlyBackupLimit != null && message.hasOwnProperty("monthlyBackupLimit")) { + object.monthlyBackupLimit = message.monthlyBackupLimit; + if (options.oneofs) + object._monthlyBackupLimit = "monthlyBackupLimit"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + if (message.assignedVolumeCount != null && message.hasOwnProperty("assignedVolumeCount")) { + object.assignedVolumeCount = message.assignedVolumeCount; + if (options.oneofs) + object._assignedVolumeCount = "assignedVolumeCount"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.BackupPolicy.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.BackupPolicy.State[message.state] : message.state; + return object; + }; + + /** + * Converts this BackupPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.BackupPolicy + * @instance + * @returns {Object.} JSON object + */ + BackupPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.BackupPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.BackupPolicy"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.BackupPolicy.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + * @property {number} UPDATING=5 UPDATING value + */ + BackupPolicy.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "UPDATING"] = 5; + return values; + })(); + + return BackupPolicy; + })(); + + v1.CreateBackupPolicyRequest = (function() { + + /** + * Properties of a CreateBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateBackupPolicyRequest + * @property {string|null} [parent] CreateBackupPolicyRequest parent + * @property {google.cloud.netapp.v1.IBackupPolicy|null} [backupPolicy] CreateBackupPolicyRequest backupPolicy + * @property {string|null} [backupPolicyId] CreateBackupPolicyRequest backupPolicyId + */ + + /** + * Constructs a new CreateBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateBackupPolicyRequest. + * @implements ICreateBackupPolicyRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest=} [properties] Properties to set + */ + function CreateBackupPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPolicyRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @instance + */ + CreateBackupPolicyRequest.prototype.parent = ""; + + /** + * CreateBackupPolicyRequest backupPolicy. + * @member {google.cloud.netapp.v1.IBackupPolicy|null|undefined} backupPolicy + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @instance + */ + CreateBackupPolicyRequest.prototype.backupPolicy = null; + + /** + * CreateBackupPolicyRequest backupPolicyId. + * @member {string} backupPolicyId + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @instance + */ + CreateBackupPolicyRequest.prototype.backupPolicyId = ""; + + /** + * Creates a new CreateBackupPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest instance + */ + CreateBackupPolicyRequest.create = function create(properties) { + return new CreateBackupPolicyRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} message CreateBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupPolicy != null && Object.hasOwnProperty.call(message, "backupPolicy")) + $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.backupPolicyId != null && Object.hasOwnProperty.call(message, "backupPolicyId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPolicyId); + return writer; + }; + + /** + * Encodes the specified CreateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} message CreateBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backupPolicyId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPolicyRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) { + var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicy); + if (error) + return "backupPolicy." + error; + } + if (message.backupPolicyId != null && message.hasOwnProperty("backupPolicyId")) + if (!$util.isString(message.backupPolicyId)) + return "backupPolicyId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest + */ + CreateBackupPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateBackupPolicyRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateBackupPolicyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPolicy != null) { + if (typeof object.backupPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateBackupPolicyRequest.backupPolicy: object expected"); + message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicy); + } + if (object.backupPolicyId != null) + message.backupPolicyId = String(object.backupPolicyId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.CreateBackupPolicyRequest} message CreateBackupPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPolicy = null; + object.backupPolicyId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) + object.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicy, options); + if (message.backupPolicyId != null && message.hasOwnProperty("backupPolicyId")) + object.backupPolicyId = message.backupPolicyId; + return object; + }; + + /** + * Converts this CreateBackupPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupPolicyRequest"; + }; + + return CreateBackupPolicyRequest; + })(); + + v1.GetBackupPolicyRequest = (function() { + + /** + * Properties of a GetBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetBackupPolicyRequest + * @property {string|null} [name] GetBackupPolicyRequest name + */ + + /** + * Constructs a new GetBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetBackupPolicyRequest. + * @implements IGetBackupPolicyRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest=} [properties] Properties to set + */ + function GetBackupPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPolicyRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @instance + */ + GetBackupPolicyRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest instance + */ + GetBackupPolicyRequest.create = function create(properties) { + return new GetBackupPolicyRequest(properties); + }; + + /** + * Encodes the specified GetBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} message GetBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} message GetBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPolicyRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest + */ + GetBackupPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetBackupPolicyRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetBackupPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.GetBackupPolicyRequest} message GetBackupPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBackupPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupPolicyRequest"; + }; + + return GetBackupPolicyRequest; + })(); + + v1.ListBackupPoliciesRequest = (function() { + + /** + * Properties of a ListBackupPoliciesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupPoliciesRequest + * @property {string|null} [parent] ListBackupPoliciesRequest parent + * @property {number|null} [pageSize] ListBackupPoliciesRequest pageSize + * @property {string|null} [pageToken] ListBackupPoliciesRequest pageToken + * @property {string|null} [filter] ListBackupPoliciesRequest filter + * @property {string|null} [orderBy] ListBackupPoliciesRequest orderBy + */ + + /** + * Constructs a new ListBackupPoliciesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupPoliciesRequest. + * @implements IListBackupPoliciesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest=} [properties] Properties to set + */ + function ListBackupPoliciesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + */ + ListBackupPoliciesRequest.prototype.parent = ""; + + /** + * ListBackupPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + */ + ListBackupPoliciesRequest.prototype.pageSize = 0; + + /** + * ListBackupPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + */ + ListBackupPoliciesRequest.prototype.pageToken = ""; + + /** + * ListBackupPoliciesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + */ + ListBackupPoliciesRequest.prototype.filter = ""; + + /** + * ListBackupPoliciesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + */ + ListBackupPoliciesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest instance + */ + ListBackupPoliciesRequest.create = function create(properties) { + return new ListBackupPoliciesRequest(properties); + }; + + /** + * Encodes the specified ListBackupPoliciesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} message ListBackupPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPoliciesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListBackupPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} message ListBackupPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPoliciesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupPoliciesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPoliciesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPoliciesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListBackupPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest + */ + ListBackupPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupPoliciesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListBackupPoliciesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListBackupPoliciesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {google.cloud.netapp.v1.ListBackupPoliciesRequest} message ListBackupPoliciesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPoliciesRequest.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; + }; + + /** + * Converts this ListBackupPoliciesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPoliciesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPoliciesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupPoliciesRequest"; + }; + + return ListBackupPoliciesRequest; + })(); + + v1.ListBackupPoliciesResponse = (function() { + + /** + * Properties of a ListBackupPoliciesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupPoliciesResponse + * @property {Array.|null} [backupPolicies] ListBackupPoliciesResponse backupPolicies + * @property {string|null} [nextPageToken] ListBackupPoliciesResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPoliciesResponse unreachable + */ + + /** + * Constructs a new ListBackupPoliciesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupPoliciesResponse. + * @implements IListBackupPoliciesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse=} [properties] Properties to set + */ + function ListBackupPoliciesResponse(properties) { + this.backupPolicies = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPoliciesResponse backupPolicies. + * @member {Array.} backupPolicies + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @instance + */ + ListBackupPoliciesResponse.prototype.backupPolicies = $util.emptyArray; + + /** + * ListBackupPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @instance + */ + ListBackupPoliciesResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPoliciesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @instance + */ + ListBackupPoliciesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPoliciesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse instance + */ + ListBackupPoliciesResponse.create = function create(properties) { + return new ListBackupPoliciesResponse(properties); + }; + + /** + * Encodes the specified ListBackupPoliciesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse} message ListBackupPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPoliciesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPolicies != null && message.backupPolicies.length) + for (var i = 0; i < message.backupPolicies.length; ++i) + $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListBackupPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse} message ListBackupPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPoliciesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupPoliciesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backupPolicies && message.backupPolicies.length)) + message.backupPolicies = []; + message.backupPolicies.push($root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPoliciesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPoliciesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPolicies != null && message.hasOwnProperty("backupPolicies")) { + if (!Array.isArray(message.backupPolicies)) + return "backupPolicies: array expected"; + for (var i = 0; i < message.backupPolicies.length; ++i) { + var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicies[i]); + if (error) + return "backupPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListBackupPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse + */ + ListBackupPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupPoliciesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListBackupPoliciesResponse(); + if (object.backupPolicies) { + if (!Array.isArray(object.backupPolicies)) + throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.backupPolicies: array expected"); + message.backupPolicies = []; + for (var i = 0; i < object.backupPolicies.length; ++i) { + if (typeof object.backupPolicies[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.backupPolicies: object expected"); + message.backupPolicies[i] = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListBackupPoliciesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {google.cloud.netapp.v1.ListBackupPoliciesResponse} message ListBackupPoliciesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPoliciesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPolicies = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPolicies && message.backupPolicies.length) { + object.backupPolicies = []; + for (var j = 0; j < message.backupPolicies.length; ++j) + object.backupPolicies[j] = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListBackupPoliciesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPoliciesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPoliciesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupPoliciesResponse"; + }; + + return ListBackupPoliciesResponse; + })(); + + v1.UpdateBackupPolicyRequest = (function() { + + /** + * Properties of an UpdateBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateBackupPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupPolicyRequest updateMask + * @property {google.cloud.netapp.v1.IBackupPolicy|null} [backupPolicy] UpdateBackupPolicyRequest backupPolicy + */ + + /** + * Constructs a new UpdateBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateBackupPolicyRequest. + * @implements IUpdateBackupPolicyRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest=} [properties] Properties to set + */ + function UpdateBackupPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @instance + */ + UpdateBackupPolicyRequest.prototype.updateMask = null; + + /** + * UpdateBackupPolicyRequest backupPolicy. + * @member {google.cloud.netapp.v1.IBackupPolicy|null|undefined} backupPolicy + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @instance + */ + UpdateBackupPolicyRequest.prototype.backupPolicy = null; + + /** + * Creates a new UpdateBackupPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest instance + */ + UpdateBackupPolicyRequest.create = function create(properties) { + return new UpdateBackupPolicyRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} message UpdateBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupPolicy != null && Object.hasOwnProperty.call(message, "backupPolicy")) + $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} message UpdateBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupPolicyRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) { + var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicy); + if (error) + return "backupPolicy." + error; + } + return null; + }; + + /** + * Creates an UpdateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest + */ + UpdateBackupPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupPolicy != null) { + if (typeof object.backupPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupPolicyRequest.backupPolicy: object expected"); + message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicy); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBackupPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.UpdateBackupPolicyRequest} message UpdateBackupPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupPolicy = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) + object.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicy, options); + return object; + }; + + /** + * Converts this UpdateBackupPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupPolicyRequest"; + }; + + return UpdateBackupPolicyRequest; + })(); + + v1.DeleteBackupPolicyRequest = (function() { + + /** + * Properties of a DeleteBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteBackupPolicyRequest + * @property {string|null} [name] DeleteBackupPolicyRequest name + */ + + /** + * Constructs a new DeleteBackupPolicyRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteBackupPolicyRequest. + * @implements IDeleteBackupPolicyRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest=} [properties] Properties to set + */ + function DeleteBackupPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPolicyRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @instance + */ + DeleteBackupPolicyRequest.prototype.name = ""; + + /** + * Creates a new DeleteBackupPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest instance + */ + DeleteBackupPolicyRequest.create = function create(properties) { + return new DeleteBackupPolicyRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} message DeleteBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} message DeleteBackupPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPolicyRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest + */ + DeleteBackupPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {google.cloud.netapp.v1.DeleteBackupPolicyRequest} message DeleteBackupPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteBackupPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupPolicyRequest"; + }; + + return DeleteBackupPolicyRequest; + })(); + + v1.BackupVault = (function() { + + /** + * Properties of a BackupVault. + * @memberof google.cloud.netapp.v1 + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {google.cloud.netapp.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.cloud.netapp.v1.BackupVault.BackupVaultType|null} [backupVaultType] BackupVault backupVaultType + * @property {string|null} [sourceRegion] BackupVault sourceRegion + * @property {string|null} [backupRegion] BackupVault backupRegion + * @property {string|null} [sourceBackupVault] BackupVault sourceBackupVault + * @property {string|null} [destinationBackupVault] BackupVault destinationBackupVault + * @property {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null} [backupRetentionPolicy] BackupVault backupRetentionPolicy + * @property {string|null} [kmsConfig] BackupVault kmsConfig + * @property {google.cloud.netapp.v1.BackupVault.EncryptionState|null} [encryptionState] BackupVault encryptionState + * @property {string|null} [backupsCryptoKeyVersion] BackupVault backupsCryptoKeyVersion + */ + + /** + * Constructs a new BackupVault. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a BackupVault. + * @implements IBackupVault + * @constructor + * @param {google.cloud.netapp.v1.IBackupVault=} [properties] Properties to set + */ + function BackupVault(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupVault name. + * @member {string} name + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.name = ""; + + /** + * BackupVault state. + * @member {google.cloud.netapp.v1.BackupVault.State} state + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.state = 0; + + /** + * BackupVault createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.createTime = null; + + /** + * BackupVault description. + * @member {string} description + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.description = ""; + + /** + * BackupVault labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.labels = $util.emptyObject; + + /** + * BackupVault backupVaultType. + * @member {google.cloud.netapp.v1.BackupVault.BackupVaultType} backupVaultType + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupVaultType = 0; + + /** + * BackupVault sourceRegion. + * @member {string} sourceRegion + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.sourceRegion = ""; + + /** + * BackupVault backupRegion. + * @member {string} backupRegion + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupRegion = ""; + + /** + * BackupVault sourceBackupVault. + * @member {string} sourceBackupVault + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.sourceBackupVault = ""; + + /** + * BackupVault destinationBackupVault. + * @member {string} destinationBackupVault + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.destinationBackupVault = ""; + + /** + * BackupVault backupRetentionPolicy. + * @member {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null|undefined} backupRetentionPolicy + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupRetentionPolicy = null; + + /** + * BackupVault kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.kmsConfig = ""; + + /** + * BackupVault encryptionState. + * @member {google.cloud.netapp.v1.BackupVault.EncryptionState} encryptionState + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.encryptionState = 0; + + /** + * BackupVault backupsCryptoKeyVersion. + * @member {string} backupsCryptoKeyVersion + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupsCryptoKeyVersion = ""; + + /** + * Creates a new BackupVault instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {google.cloud.netapp.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.BackupVault} BackupVault instance + */ + BackupVault.create = function create(properties) { + return new BackupVault(properties); + }; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {google.cloud.netapp.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.backupVaultType != null && Object.hasOwnProperty.call(message, "backupVaultType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.backupVaultType); + if (message.sourceRegion != null && Object.hasOwnProperty.call(message, "sourceRegion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceRegion); + if (message.backupRegion != null && Object.hasOwnProperty.call(message, "backupRegion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.backupRegion); + if (message.sourceBackupVault != null && Object.hasOwnProperty.call(message, "sourceBackupVault")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceBackupVault); + if (message.destinationBackupVault != null && Object.hasOwnProperty.call(message, "destinationBackupVault")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationBackupVault); + if (message.backupRetentionPolicy != null && Object.hasOwnProperty.call(message, "backupRetentionPolicy")) + $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.encode(message.backupRetentionPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.kmsConfig); + if (message.encryptionState != null && Object.hasOwnProperty.call(message, "encryptionState")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.encryptionState); + if (message.backupsCryptoKeyVersion != null && Object.hasOwnProperty.call(message, "backupsCryptoKeyVersion")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupsCryptoKeyVersion); + return writer; + }; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {google.cloud.netapp.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupVault(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.backupVaultType = reader.int32(); + break; + } + case 7: { + message.sourceRegion = reader.string(); + break; + } + case 8: { + message.backupRegion = reader.string(); + break; + } + case 9: { + message.sourceBackupVault = reader.string(); + break; + } + case 10: { + message.destinationBackupVault = reader.string(); + break; + } + case 11: { + message.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.decode(reader, reader.uint32()); + break; + } + case 12: { + message.kmsConfig = reader.string(); + break; + } + case 13: { + message.encryptionState = reader.int32(); + break; + } + case 14: { + message.backupsCryptoKeyVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. + * @function verify + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupVault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.backupVaultType != null && message.hasOwnProperty("backupVaultType")) + switch (message.backupVaultType) { + default: + return "backupVaultType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) + if (!$util.isString(message.sourceRegion)) + return "sourceRegion: string expected"; + if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) + if (!$util.isString(message.backupRegion)) + return "backupRegion: string expected"; + if (message.sourceBackupVault != null && message.hasOwnProperty("sourceBackupVault")) + if (!$util.isString(message.sourceBackupVault)) + return "sourceBackupVault: string expected"; + if (message.destinationBackupVault != null && message.hasOwnProperty("destinationBackupVault")) + if (!$util.isString(message.destinationBackupVault)) + return "destinationBackupVault: string expected"; + if (message.backupRetentionPolicy != null && message.hasOwnProperty("backupRetentionPolicy")) { + var error = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify(message.backupRetentionPolicy); + if (error) + return "backupRetentionPolicy." + error; + } + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + if (!$util.isString(message.kmsConfig)) + return "kmsConfig: string expected"; + if (message.encryptionState != null && message.hasOwnProperty("encryptionState")) + switch (message.encryptionState) { + default: + return "encryptionState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.backupsCryptoKeyVersion != null && message.hasOwnProperty("backupsCryptoKeyVersion")) + if (!$util.isString(message.backupsCryptoKeyVersion)) + return "backupsCryptoKeyVersion: string expected"; + return null; + }; + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.BackupVault} BackupVault + */ + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.BackupVault) + return object; + var message = new $root.google.cloud.netapp.v1.BackupVault(); + 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 "READY": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + case "UPDATING": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.BackupVault.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.BackupVault.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.backupVaultType) { + default: + if (typeof object.backupVaultType === "number") { + message.backupVaultType = object.backupVaultType; + break; + } + break; + case "BACKUP_VAULT_TYPE_UNSPECIFIED": + case 0: + message.backupVaultType = 0; + break; + case "IN_REGION": + case 1: + message.backupVaultType = 1; + break; + case "CROSS_REGION": + case 2: + message.backupVaultType = 2; + break; + } + if (object.sourceRegion != null) + message.sourceRegion = String(object.sourceRegion); + if (object.backupRegion != null) + message.backupRegion = String(object.backupRegion); + if (object.sourceBackupVault != null) + message.sourceBackupVault = String(object.sourceBackupVault); + if (object.destinationBackupVault != null) + message.destinationBackupVault = String(object.destinationBackupVault); + if (object.backupRetentionPolicy != null) { + if (typeof object.backupRetentionPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.BackupVault.backupRetentionPolicy: object expected"); + message.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.fromObject(object.backupRetentionPolicy); + } + if (object.kmsConfig != null) + message.kmsConfig = String(object.kmsConfig); + switch (object.encryptionState) { + default: + if (typeof object.encryptionState === "number") { + message.encryptionState = object.encryptionState; + break; + } + break; + case "ENCRYPTION_STATE_UNSPECIFIED": + case 0: + message.encryptionState = 0; + break; + case "ENCRYPTION_STATE_PENDING": + case 1: + message.encryptionState = 1; + break; + case "ENCRYPTION_STATE_COMPLETED": + case 2: + message.encryptionState = 2; + break; + case "ENCRYPTION_STATE_IN_PROGRESS": + case 3: + message.encryptionState = 3; + break; + case "ENCRYPTION_STATE_FAILED": + case 4: + message.encryptionState = 4; + break; + } + if (object.backupsCryptoKeyVersion != null) + message.backupsCryptoKeyVersion = String(object.backupsCryptoKeyVersion); + return message; + }; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {google.cloud.netapp.v1.BackupVault} message BackupVault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupVault.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.createTime = null; + object.description = ""; + object.backupVaultType = options.enums === String ? "BACKUP_VAULT_TYPE_UNSPECIFIED" : 0; + object.sourceRegion = ""; + object.backupRegion = ""; + object.sourceBackupVault = ""; + object.destinationBackupVault = ""; + object.backupRetentionPolicy = null; + object.kmsConfig = ""; + object.encryptionState = options.enums === String ? "ENCRYPTION_STATE_UNSPECIFIED" : 0; + object.backupsCryptoKeyVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.BackupVault.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.backupVaultType != null && message.hasOwnProperty("backupVaultType")) + object.backupVaultType = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.BackupVaultType[message.backupVaultType] === undefined ? message.backupVaultType : $root.google.cloud.netapp.v1.BackupVault.BackupVaultType[message.backupVaultType] : message.backupVaultType; + if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) + object.sourceRegion = message.sourceRegion; + if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) + object.backupRegion = message.backupRegion; + if (message.sourceBackupVault != null && message.hasOwnProperty("sourceBackupVault")) + object.sourceBackupVault = message.sourceBackupVault; + if (message.destinationBackupVault != null && message.hasOwnProperty("destinationBackupVault")) + object.destinationBackupVault = message.destinationBackupVault; + if (message.backupRetentionPolicy != null && message.hasOwnProperty("backupRetentionPolicy")) + object.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.toObject(message.backupRetentionPolicy, options); + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = message.kmsConfig; + if (message.encryptionState != null && message.hasOwnProperty("encryptionState")) + object.encryptionState = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.EncryptionState[message.encryptionState] === undefined ? message.encryptionState : $root.google.cloud.netapp.v1.BackupVault.EncryptionState[message.encryptionState] : message.encryptionState; + if (message.backupsCryptoKeyVersion != null && message.hasOwnProperty("backupsCryptoKeyVersion")) + object.backupsCryptoKeyVersion = message.backupsCryptoKeyVersion; + return object; + }; + + /** + * Converts this BackupVault to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.BackupVault + * @instance + * @returns {Object.} JSON object + */ + BackupVault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupVault + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.BackupVault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.BackupVault"; + }; + + BackupVault.BackupRetentionPolicy = (function() { + + /** + * Properties of a BackupRetentionPolicy. + * @memberof google.cloud.netapp.v1.BackupVault + * @interface IBackupRetentionPolicy + * @property {number|null} [backupMinimumEnforcedRetentionDays] BackupRetentionPolicy backupMinimumEnforcedRetentionDays + * @property {boolean|null} [dailyBackupImmutable] BackupRetentionPolicy dailyBackupImmutable + * @property {boolean|null} [weeklyBackupImmutable] BackupRetentionPolicy weeklyBackupImmutable + * @property {boolean|null} [monthlyBackupImmutable] BackupRetentionPolicy monthlyBackupImmutable + * @property {boolean|null} [manualBackupImmutable] BackupRetentionPolicy manualBackupImmutable + */ + + /** + * Constructs a new BackupRetentionPolicy. + * @memberof google.cloud.netapp.v1.BackupVault + * @classdesc Represents a BackupRetentionPolicy. + * @implements IBackupRetentionPolicy + * @constructor + * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy=} [properties] Properties to set + */ + function BackupRetentionPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupRetentionPolicy backupMinimumEnforcedRetentionDays. + * @member {number} backupMinimumEnforcedRetentionDays + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + */ + BackupRetentionPolicy.prototype.backupMinimumEnforcedRetentionDays = 0; + + /** + * BackupRetentionPolicy dailyBackupImmutable. + * @member {boolean} dailyBackupImmutable + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + */ + BackupRetentionPolicy.prototype.dailyBackupImmutable = false; + + /** + * BackupRetentionPolicy weeklyBackupImmutable. + * @member {boolean} weeklyBackupImmutable + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + */ + BackupRetentionPolicy.prototype.weeklyBackupImmutable = false; + + /** + * BackupRetentionPolicy monthlyBackupImmutable. + * @member {boolean} monthlyBackupImmutable + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + */ + BackupRetentionPolicy.prototype.monthlyBackupImmutable = false; + + /** + * BackupRetentionPolicy manualBackupImmutable. + * @member {boolean} manualBackupImmutable + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + */ + BackupRetentionPolicy.prototype.manualBackupImmutable = false; + + /** + * Creates a new BackupRetentionPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy instance + */ + BackupRetentionPolicy.create = function create(properties) { + return new BackupRetentionPolicy(properties); + }; + + /** + * Encodes the specified BackupRetentionPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy} message BackupRetentionPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRetentionPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupMinimumEnforcedRetentionDays != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDays")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.backupMinimumEnforcedRetentionDays); + if (message.dailyBackupImmutable != null && Object.hasOwnProperty.call(message, "dailyBackupImmutable")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dailyBackupImmutable); + if (message.weeklyBackupImmutable != null && Object.hasOwnProperty.call(message, "weeklyBackupImmutable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.weeklyBackupImmutable); + if (message.monthlyBackupImmutable != null && Object.hasOwnProperty.call(message, "monthlyBackupImmutable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.monthlyBackupImmutable); + if (message.manualBackupImmutable != null && Object.hasOwnProperty.call(message, "manualBackupImmutable")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.manualBackupImmutable); + return writer; + }; + + /** + * Encodes the specified BackupRetentionPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy} message BackupRetentionPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRetentionPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupRetentionPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRetentionPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.backupMinimumEnforcedRetentionDays = reader.int32(); + break; + } + case 2: { + message.dailyBackupImmutable = reader.bool(); + break; + } + case 3: { + message.weeklyBackupImmutable = reader.bool(); + break; + } + case 4: { + message.monthlyBackupImmutable = reader.bool(); + break; + } + case 5: { + message.manualBackupImmutable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupRetentionPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRetentionPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupRetentionPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupRetentionPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupMinimumEnforcedRetentionDays != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDays")) + if (!$util.isInteger(message.backupMinimumEnforcedRetentionDays)) + return "backupMinimumEnforcedRetentionDays: integer expected"; + if (message.dailyBackupImmutable != null && message.hasOwnProperty("dailyBackupImmutable")) + if (typeof message.dailyBackupImmutable !== "boolean") + return "dailyBackupImmutable: boolean expected"; + if (message.weeklyBackupImmutable != null && message.hasOwnProperty("weeklyBackupImmutable")) + if (typeof message.weeklyBackupImmutable !== "boolean") + return "weeklyBackupImmutable: boolean expected"; + if (message.monthlyBackupImmutable != null && message.hasOwnProperty("monthlyBackupImmutable")) + if (typeof message.monthlyBackupImmutable !== "boolean") + return "monthlyBackupImmutable: boolean expected"; + if (message.manualBackupImmutable != null && message.hasOwnProperty("manualBackupImmutable")) + if (typeof message.manualBackupImmutable !== "boolean") + return "manualBackupImmutable: boolean expected"; + return null; + }; + + /** + * Creates a BackupRetentionPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy + */ + BackupRetentionPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy(); + if (object.backupMinimumEnforcedRetentionDays != null) + message.backupMinimumEnforcedRetentionDays = object.backupMinimumEnforcedRetentionDays | 0; + if (object.dailyBackupImmutable != null) + message.dailyBackupImmutable = Boolean(object.dailyBackupImmutable); + if (object.weeklyBackupImmutable != null) + message.weeklyBackupImmutable = Boolean(object.weeklyBackupImmutable); + if (object.monthlyBackupImmutable != null) + message.monthlyBackupImmutable = Boolean(object.monthlyBackupImmutable); + if (object.manualBackupImmutable != null) + message.manualBackupImmutable = Boolean(object.manualBackupImmutable); + return message; + }; + + /** + * Creates a plain object from a BackupRetentionPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} message BackupRetentionPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupRetentionPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupMinimumEnforcedRetentionDays = 0; + object.dailyBackupImmutable = false; + object.weeklyBackupImmutable = false; + object.monthlyBackupImmutable = false; + object.manualBackupImmutable = false; + } + if (message.backupMinimumEnforcedRetentionDays != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDays")) + object.backupMinimumEnforcedRetentionDays = message.backupMinimumEnforcedRetentionDays; + if (message.dailyBackupImmutable != null && message.hasOwnProperty("dailyBackupImmutable")) + object.dailyBackupImmutable = message.dailyBackupImmutable; + if (message.weeklyBackupImmutable != null && message.hasOwnProperty("weeklyBackupImmutable")) + object.weeklyBackupImmutable = message.weeklyBackupImmutable; + if (message.monthlyBackupImmutable != null && message.hasOwnProperty("monthlyBackupImmutable")) + object.monthlyBackupImmutable = message.monthlyBackupImmutable; + if (message.manualBackupImmutable != null && message.hasOwnProperty("manualBackupImmutable")) + object.manualBackupImmutable = message.manualBackupImmutable; + return object; + }; + + /** + * Converts this BackupRetentionPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @instance + * @returns {Object.} JSON object + */ + BackupRetentionPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupRetentionPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupRetentionPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy"; + }; + + return BackupRetentionPolicy; + })(); + + /** + * State enum. + * @name google.cloud.netapp.v1.BackupVault.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + * @property {number} UPDATING=5 UPDATING value + */ + BackupVault.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "UPDATING"] = 5; + return values; + })(); + + /** + * BackupVaultType enum. + * @name google.cloud.netapp.v1.BackupVault.BackupVaultType + * @enum {number} + * @property {number} BACKUP_VAULT_TYPE_UNSPECIFIED=0 BACKUP_VAULT_TYPE_UNSPECIFIED value + * @property {number} IN_REGION=1 IN_REGION value + * @property {number} CROSS_REGION=2 CROSS_REGION value + */ + BackupVault.BackupVaultType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_REGION"] = 1; + values[valuesById[2] = "CROSS_REGION"] = 2; + return values; + })(); + + /** + * EncryptionState enum. + * @name google.cloud.netapp.v1.BackupVault.EncryptionState + * @enum {number} + * @property {number} ENCRYPTION_STATE_UNSPECIFIED=0 ENCRYPTION_STATE_UNSPECIFIED value + * @property {number} ENCRYPTION_STATE_PENDING=1 ENCRYPTION_STATE_PENDING value + * @property {number} ENCRYPTION_STATE_COMPLETED=2 ENCRYPTION_STATE_COMPLETED value + * @property {number} ENCRYPTION_STATE_IN_PROGRESS=3 ENCRYPTION_STATE_IN_PROGRESS value + * @property {number} ENCRYPTION_STATE_FAILED=4 ENCRYPTION_STATE_FAILED value + */ + BackupVault.EncryptionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPTION_STATE_PENDING"] = 1; + values[valuesById[2] = "ENCRYPTION_STATE_COMPLETED"] = 2; + values[valuesById[3] = "ENCRYPTION_STATE_IN_PROGRESS"] = 3; + values[valuesById[4] = "ENCRYPTION_STATE_FAILED"] = 4; + return values; + })(); + + return BackupVault; + })(); + + v1.GetBackupVaultRequest = (function() { + + /** + * Properties of a GetBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + */ + + /** + * Constructs a new GetBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest=} [properties] Properties to set + */ + function GetBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.name = ""; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + */ + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); + }; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupVaultRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupVaultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupVaultRequest"; + }; + + return GetBackupVaultRequest; + })(); + + v1.ListBackupVaultsRequest = (function() { + + /** + * Properties of a ListBackupVaultsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {string|null} [filter] ListBackupVaultsRequest filter + */ + + /** + * Constructs a new ListBackupVaultsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest=} [properties] Properties to set + */ + function ListBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.parent = ""; + + /** + * ListBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageSize = 0; + + /** + * ListBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageToken = ""; + + /** + * ListBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.orderBy = ""; + + /** + * ListBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance + */ + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupVaultsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + */ + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupVaultsRequest) + return object; + var message = new $root.google.cloud.netapp.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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.netapp.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupVaultsRequest"; + }; + + return ListBackupVaultsRequest; + })(); + + v1.ListBackupVaultsResponse = (function() { + + /** + * Properties of a ListBackupVaultsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + */ + + /** + * Constructs a new ListBackupVaultsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListBackupVaultsResponse=} [properties] Properties to set + */ + function ListBackupVaultsResponse(properties) { + this.backupVaults = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * ListBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + */ + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.netapp.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + */ + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListBackupVaultsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.netapp.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.netapp.v1.BackupVault.toObject(message.backupVaults[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupVaultsResponse"; + }; + + return ListBackupVaultsResponse; + })(); + + v1.CreateBackupVaultRequest = (function() { + + /** + * Properties of a CreateBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.netapp.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + */ + + /** + * Constructs a new CreateBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest=} [properties] Properties to set + */ + function CreateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.netapp.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVault = null; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance + */ + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupVaultId = reader.string(); + break; + } + case 3: { + message.backupVault = $root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupVaultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + error; + } + return null; + }; + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + */ + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateBackupVaultRequest) + return object; + var message = new $root.google.cloud.netapp.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.netapp.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVault); + } + return message; + }; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + } + 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.netapp.v1.BackupVault.toObject(message.backupVault, options); + return object; + }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupVaultRequest"; + }; + + return CreateBackupVaultRequest; + })(); + + v1.DeleteBackupVaultRequest = (function() { + + /** + * Properties of a DeleteBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + */ + + /** + * Constructs a new DeleteBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + */ + function DeleteBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.name = ""; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + */ + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupVaultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + */ + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupVaultRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupVaultRequest"; + }; + + return DeleteBackupVaultRequest; + })(); + + v1.UpdateBackupVaultRequest = (function() { + + /** + * Properties of an UpdateBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.netapp.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + */ + + /** + * Constructs a new UpdateBackupVaultRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + */ + function UpdateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.updateMask = null; + + /** + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.netapp.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.backupVault = null; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + */ + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.backupVault = $root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + error; + } + return null; + }; + + /** + * Creates an UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + */ + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupVaultRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVault); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.netapp.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupVault = null; + } + 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.netapp.v1.BackupVault.toObject(message.backupVault, options); + return object; + }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupVaultRequest"; + }; + + return UpdateBackupVaultRequest; + })(); + + v1.NetApp = (function() { + + /** + * Constructs a new NetApp service. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a NetApp + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function NetApp(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NetApp.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetApp; + + /** + * Creates new NetApp service using the specified rpc implementation. + * @function create + * @memberof google.cloud.netapp.v1.NetApp + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {NetApp} RPC service. Useful where requests and/or responses are streamed. + */ + NetApp.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListStoragePoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} [response] ListStoragePoolsResponse + */ + + /** + * Calls ListStoragePools. + * @function listStoragePools + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback} callback Node-style callback called with the error, if any, and ListStoragePoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listStoragePools = function listStoragePools(request, callback) { + return this.rpcCall(listStoragePools, $root.google.cloud.netapp.v1.ListStoragePoolsRequest, $root.google.cloud.netapp.v1.ListStoragePoolsResponse, request, callback); + }, "name", { value: "ListStoragePools" }); + + /** + * Calls ListStoragePools. + * @function listStoragePools + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateStoragePool. + * @function createStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createStoragePool = function createStoragePool(request, callback) { + return this.rpcCall(createStoragePool, $root.google.cloud.netapp.v1.CreateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateStoragePool" }); + + /** + * Calls CreateStoragePool. + * @function createStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.StoragePool} [response] StoragePool + */ + + /** + * Calls GetStoragePool. + * @function getStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetStoragePoolCallback} callback Node-style callback called with the error, if any, and StoragePool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getStoragePool = function getStoragePool(request, callback) { + return this.rpcCall(getStoragePool, $root.google.cloud.netapp.v1.GetStoragePoolRequest, $root.google.cloud.netapp.v1.StoragePool, request, callback); + }, "name", { value: "GetStoragePool" }); + + /** + * Calls GetStoragePool. + * @function getStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateStoragePool. + * @function updateStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateStoragePool = function updateStoragePool(request, callback) { + return this.rpcCall(updateStoragePool, $root.google.cloud.netapp.v1.UpdateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateStoragePool" }); + + /** + * Calls UpdateStoragePool. + * @function updateStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteStoragePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteStoragePool. + * @function deleteStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteStoragePool = function deleteStoragePool(request, callback) { + return this.rpcCall(deleteStoragePool, $root.google.cloud.netapp.v1.DeleteStoragePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteStoragePool" }); + + /** + * Calls DeleteStoragePool. + * @function deleteStoragePool + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|validateDirectoryService}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ValidateDirectoryServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ValidateDirectoryService. + * @function validateDirectoryService + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} request ValidateDirectoryServiceRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ValidateDirectoryServiceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.validateDirectoryService = function validateDirectoryService(request, callback) { + return this.rpcCall(validateDirectoryService, $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ValidateDirectoryService" }); + + /** + * Calls ValidateDirectoryService. + * @function validateDirectoryService + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} request ValidateDirectoryServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|switchActiveReplicaZone}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef SwitchActiveReplicaZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SwitchActiveReplicaZone. + * @function switchActiveReplicaZone + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} request SwitchActiveReplicaZoneRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.switchActiveReplicaZone = function switchActiveReplicaZone(request, callback) { + return this.rpcCall(switchActiveReplicaZone, $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SwitchActiveReplicaZone" }); + + /** + * Calls SwitchActiveReplicaZone. + * @function switchActiveReplicaZone + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} request SwitchActiveReplicaZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListVolumesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListVolumesResponse} [response] ListVolumesResponse + */ + + /** + * Calls ListVolumes. + * @function listVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListVolumesCallback} callback Node-style callback called with the error, if any, and ListVolumesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listVolumes = function listVolumes(request, callback) { + return this.rpcCall(listVolumes, $root.google.cloud.netapp.v1.ListVolumesRequest, $root.google.cloud.netapp.v1.ListVolumesResponse, request, callback); + }, "name", { value: "ListVolumes" }); + + /** + * Calls ListVolumes. + * @function listVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Volume} [response] Volume + */ + + /** + * Calls GetVolume. + * @function getVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetVolumeCallback} callback Node-style callback called with the error, if any, and Volume + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getVolume = function getVolume(request, callback) { + return this.rpcCall(getVolume, $root.google.cloud.netapp.v1.GetVolumeRequest, $root.google.cloud.netapp.v1.Volume, request, callback); + }, "name", { value: "GetVolume" }); + + /** + * Calls GetVolume. + * @function getVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVolume. + * @function createVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createVolume = function createVolume(request, callback) { + return this.rpcCall(createVolume, $root.google.cloud.netapp.v1.CreateVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVolume" }); + + /** + * Calls CreateVolume. + * @function createVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateVolume. + * @function updateVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateVolume = function updateVolume(request, callback) { + return this.rpcCall(updateVolume, $root.google.cloud.netapp.v1.UpdateVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateVolume" }); + + /** + * Calls UpdateVolume. + * @function updateVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVolume. + * @function deleteVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteVolume = function deleteVolume(request, callback) { + return this.rpcCall(deleteVolume, $root.google.cloud.netapp.v1.DeleteVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVolume" }); + + /** + * Calls DeleteVolume. + * @function deleteVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef RevertVolumeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RevertVolume. + * @function revertVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.RevertVolumeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.revertVolume = function revertVolume(request, callback) { + return this.rpcCall(revertVolume, $root.google.cloud.netapp.v1.RevertVolumeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RevertVolume" }); + + /** + * Calls RevertVolume. + * @function revertVolume + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef EstablishVolumePeeringCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EstablishVolumePeering. + * @function establishVolumePeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.establishVolumePeering = function establishVolumePeering(request, callback) { + return this.rpcCall(establishVolumePeering, $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EstablishVolumePeering" }); + + /** + * Calls EstablishVolumePeering. + * @function establishVolumePeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListSnapshotsResponse} [response] ListSnapshotsResponse + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ListSnapshotsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listSnapshots = function listSnapshots(request, callback) { + return this.rpcCall(listSnapshots, $root.google.cloud.netapp.v1.ListSnapshotsRequest, $root.google.cloud.netapp.v1.ListSnapshotsResponse, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Snapshot} [response] Snapshot + */ + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getSnapshot = function getSnapshot(request, callback) { + return this.rpcCall(getSnapshot, $root.google.cloud.netapp.v1.GetSnapshotRequest, $root.google.cloud.netapp.v1.Snapshot, request, callback); + }, "name", { value: "GetSnapshot" }); + + /** + * Calls GetSnapshot. + * @function getSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateSnapshot. + * @function createSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createSnapshot = function createSnapshot(request, callback) { + return this.rpcCall(createSnapshot, $root.google.cloud.netapp.v1.CreateSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateSnapshot" }); + + /** + * Calls CreateSnapshot. + * @function createSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { + return this.rpcCall(deleteSnapshot, $root.google.cloud.netapp.v1.DeleteSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSnapshot" }); + + /** + * Calls DeleteSnapshot. + * @function deleteSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateSnapshot. + * @function updateSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateSnapshot = function updateSnapshot(request, callback) { + return this.rpcCall(updateSnapshot, $root.google.cloud.netapp.v1.UpdateSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateSnapshot" }); + + /** + * Calls UpdateSnapshot. + * @function updateSnapshot + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListActiveDirectoriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} [response] ListActiveDirectoriesResponse + */ + + /** + * Calls ListActiveDirectories. + * @function listActiveDirectories + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback} callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listActiveDirectories = function listActiveDirectories(request, callback) { + return this.rpcCall(listActiveDirectories, $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest, $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse, request, callback); + }, "name", { value: "ListActiveDirectories" }); + + /** + * Calls ListActiveDirectories. + * @function listActiveDirectories + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ActiveDirectory} [response] ActiveDirectory + */ + + /** + * Calls GetActiveDirectory. + * @function getActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback} callback Node-style callback called with the error, if any, and ActiveDirectory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getActiveDirectory = function getActiveDirectory(request, callback) { + return this.rpcCall(getActiveDirectory, $root.google.cloud.netapp.v1.GetActiveDirectoryRequest, $root.google.cloud.netapp.v1.ActiveDirectory, request, callback); + }, "name", { value: "GetActiveDirectory" }); + + /** + * Calls GetActiveDirectory. + * @function getActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateActiveDirectory. + * @function createActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createActiveDirectory = function createActiveDirectory(request, callback) { + return this.rpcCall(createActiveDirectory, $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateActiveDirectory" }); + + /** + * Calls CreateActiveDirectory. + * @function createActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateActiveDirectory. + * @function updateActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateActiveDirectory = function updateActiveDirectory(request, callback) { + return this.rpcCall(updateActiveDirectory, $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateActiveDirectory" }); + + /** + * Calls UpdateActiveDirectory. + * @function updateActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteActiveDirectoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteActiveDirectory. + * @function deleteActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteActiveDirectory = function deleteActiveDirectory(request, callback) { + return this.rpcCall(deleteActiveDirectory, $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteActiveDirectory" }); + + /** + * Calls DeleteActiveDirectory. + * @function deleteActiveDirectory + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListKmsConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} [response] ListKmsConfigsResponse + */ + + /** + * Calls ListKmsConfigs. + * @function listKmsConfigs + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback} callback Node-style callback called with the error, if any, and ListKmsConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listKmsConfigs = function listKmsConfigs(request, callback) { + return this.rpcCall(listKmsConfigs, $root.google.cloud.netapp.v1.ListKmsConfigsRequest, $root.google.cloud.netapp.v1.ListKmsConfigsResponse, request, callback); + }, "name", { value: "ListKmsConfigs" }); + + /** + * Calls ListKmsConfigs. + * @function listKmsConfigs + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateKmsConfig. + * @function createKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createKmsConfig = function createKmsConfig(request, callback) { + return this.rpcCall(createKmsConfig, $root.google.cloud.netapp.v1.CreateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateKmsConfig" }); + + /** + * Calls CreateKmsConfig. + * @function createKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.KmsConfig} [response] KmsConfig + */ + + /** + * Calls GetKmsConfig. + * @function getKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetKmsConfigCallback} callback Node-style callback called with the error, if any, and KmsConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getKmsConfig = function getKmsConfig(request, callback) { + return this.rpcCall(getKmsConfig, $root.google.cloud.netapp.v1.GetKmsConfigRequest, $root.google.cloud.netapp.v1.KmsConfig, request, callback); + }, "name", { value: "GetKmsConfig" }); + + /** + * Calls GetKmsConfig. + * @function getKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateKmsConfig. + * @function updateKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateKmsConfig = function updateKmsConfig(request, callback) { + return this.rpcCall(updateKmsConfig, $root.google.cloud.netapp.v1.UpdateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateKmsConfig" }); + + /** + * Calls UpdateKmsConfig. + * @function updateKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef EncryptVolumesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EncryptVolumes. + * @function encryptVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.EncryptVolumesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.encryptVolumes = function encryptVolumes(request, callback) { + return this.rpcCall(encryptVolumes, $root.google.cloud.netapp.v1.EncryptVolumesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EncryptVolumes" }); + + /** + * Calls EncryptVolumes. + * @function encryptVolumes + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef VerifyKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} [response] VerifyKmsConfigResponse + */ + + /** + * Calls VerifyKmsConfig. + * @function verifyKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback} callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.verifyKmsConfig = function verifyKmsConfig(request, callback) { + return this.rpcCall(verifyKmsConfig, $root.google.cloud.netapp.v1.VerifyKmsConfigRequest, $root.google.cloud.netapp.v1.VerifyKmsConfigResponse, request, callback); + }, "name", { value: "VerifyKmsConfig" }); + + /** + * Calls VerifyKmsConfig. + * @function verifyKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteKmsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteKmsConfig. + * @function deleteKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteKmsConfig = function deleteKmsConfig(request, callback) { + return this.rpcCall(deleteKmsConfig, $root.google.cloud.netapp.v1.DeleteKmsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteKmsConfig" }); + + /** + * Calls DeleteKmsConfig. + * @function deleteKmsConfig + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListReplicationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListReplicationsResponse} [response] ListReplicationsResponse + */ + + /** + * Calls ListReplications. + * @function listReplications + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListReplicationsCallback} callback Node-style callback called with the error, if any, and ListReplicationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listReplications = function listReplications(request, callback) { + return this.rpcCall(listReplications, $root.google.cloud.netapp.v1.ListReplicationsRequest, $root.google.cloud.netapp.v1.ListReplicationsResponse, request, callback); + }, "name", { value: "ListReplications" }); + + /** + * Calls ListReplications. + * @function listReplications + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Replication} [response] Replication + */ + + /** + * Calls GetReplication. + * @function getReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetReplicationCallback} callback Node-style callback called with the error, if any, and Replication + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getReplication = function getReplication(request, callback) { + return this.rpcCall(getReplication, $root.google.cloud.netapp.v1.GetReplicationRequest, $root.google.cloud.netapp.v1.Replication, request, callback); + }, "name", { value: "GetReplication" }); + + /** + * Calls GetReplication. + * @function getReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReplication. + * @function createReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createReplication = function createReplication(request, callback) { + return this.rpcCall(createReplication, $root.google.cloud.netapp.v1.CreateReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReplication" }); + + /** + * Calls CreateReplication. + * @function createReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteReplication. + * @function deleteReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteReplication = function deleteReplication(request, callback) { + return this.rpcCall(deleteReplication, $root.google.cloud.netapp.v1.DeleteReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteReplication" }); + + /** + * Calls DeleteReplication. + * @function deleteReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateReplication. + * @function updateReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateReplication = function updateReplication(request, callback) { + return this.rpcCall(updateReplication, $root.google.cloud.netapp.v1.UpdateReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateReplication" }); + + /** + * Calls UpdateReplication. + * @function updateReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef StopReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls StopReplication. + * @function stopReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.StopReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.stopReplication = function stopReplication(request, callback) { + return this.rpcCall(stopReplication, $root.google.cloud.netapp.v1.StopReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "StopReplication" }); + + /** + * Calls StopReplication. + * @function stopReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ResumeReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ResumeReplication. + * @function resumeReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ResumeReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.resumeReplication = function resumeReplication(request, callback) { + return this.rpcCall(resumeReplication, $root.google.cloud.netapp.v1.ResumeReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ResumeReplication" }); + + /** + * Calls ResumeReplication. + * @function resumeReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ReverseReplicationDirectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ReverseReplicationDirection. + * @function reverseReplicationDirection + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.reverseReplicationDirection = function reverseReplicationDirection(request, callback) { + return this.rpcCall(reverseReplicationDirection, $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ReverseReplicationDirection" }); + + /** + * Calls ReverseReplicationDirection. + * @function reverseReplicationDirection + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishPeering}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef EstablishPeeringCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EstablishPeering. + * @function establishPeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} request EstablishPeeringRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.EstablishPeeringCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.establishPeering = function establishPeering(request, callback) { + return this.rpcCall(establishPeering, $root.google.cloud.netapp.v1.EstablishPeeringRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EstablishPeering" }); + + /** + * Calls EstablishPeering. + * @function establishPeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} request EstablishPeeringRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|syncReplication}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef SyncReplicationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SyncReplication. + * @function syncReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} request SyncReplicationRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.SyncReplicationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.syncReplication = function syncReplication(request, callback) { + return this.rpcCall(syncReplication, $root.google.cloud.netapp.v1.SyncReplicationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SyncReplication" }); + + /** + * Calls SyncReplication. + * @function syncReplication + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} request SyncReplicationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackupVault}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createBackupVault = function createBackupVault(request, callback) { + return this.rpcCall(createBackupVault, $root.google.cloud.netapp.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupVault" }); + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupVault}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.BackupVault} [response] BackupVault + */ + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getBackupVault = function getBackupVault(request, callback) { + return this.rpcCall(getBackupVault, $root.google.cloud.netapp.v1.GetBackupVaultRequest, $root.google.cloud.netapp.v1.BackupVault, request, callback); + }, "name", { value: "GetBackupVault" }); + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupVaults}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse + */ + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listBackupVaults = function listBackupVaults(request, callback) { + return this.rpcCall(listBackupVaults, $root.google.cloud.netapp.v1.ListBackupVaultsRequest, $root.google.cloud.netapp.v1.ListBackupVaultsResponse, request, callback); + }, "name", { value: "ListBackupVaults" }); + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupVault}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateBackupVault = function updateBackupVault(request, callback) { + return this.rpcCall(updateBackupVault, $root.google.cloud.netapp.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupVault" }); + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupVault}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { + return this.rpcCall(deleteBackupVault, $root.google.cloud.netapp.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupVault" }); + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createBackup = function createBackup(request, callback) { + return this.rpcCall(createBackup, $root.google.cloud.netapp.v1.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackup" }); + + /** + * Calls CreateBackup. + * @function createBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupRequest} request CreateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.netapp.v1.GetBackupRequest, $root.google.cloud.netapp.v1.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackups}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.netapp.v1.ListBackupsRequest, $root.google.cloud.netapp.v1.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.netapp.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateBackup = function updateBackup(request, callback) { + return this.rpcCall(updateBackup, $root.google.cloud.netapp.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackupPolicy}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateBackupPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPolicy. + * @function createBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} request CreateBackupPolicyRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createBackupPolicy = function createBackupPolicy(request, callback) { + return this.rpcCall(createBackupPolicy, $root.google.cloud.netapp.v1.CreateBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPolicy" }); + + /** + * Calls CreateBackupPolicy. + * @function createBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} request CreateBackupPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupPolicy}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetBackupPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.BackupPolicy} [response] BackupPolicy + */ + + /** + * Calls GetBackupPolicy. + * @function getBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} request GetBackupPolicyRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetBackupPolicyCallback} callback Node-style callback called with the error, if any, and BackupPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getBackupPolicy = function getBackupPolicy(request, callback) { + return this.rpcCall(getBackupPolicy, $root.google.cloud.netapp.v1.GetBackupPolicyRequest, $root.google.cloud.netapp.v1.BackupPolicy, request, callback); + }, "name", { value: "GetBackupPolicy" }); + + /** + * Calls GetBackupPolicy. + * @function getBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} request GetBackupPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupPolicies}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListBackupPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListBackupPoliciesResponse} [response] ListBackupPoliciesResponse + */ + + /** + * Calls ListBackupPolicies. + * @function listBackupPolicies + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} request ListBackupPoliciesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListBackupPoliciesCallback} callback Node-style callback called with the error, if any, and ListBackupPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listBackupPolicies = function listBackupPolicies(request, callback) { + return this.rpcCall(listBackupPolicies, $root.google.cloud.netapp.v1.ListBackupPoliciesRequest, $root.google.cloud.netapp.v1.ListBackupPoliciesResponse, request, callback); + }, "name", { value: "ListBackupPolicies" }); + + /** + * Calls ListBackupPolicies. + * @function listBackupPolicies + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} request ListBackupPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupPolicy}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateBackupPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackupPolicy. + * @function updateBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} request UpdateBackupPolicyRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateBackupPolicy = function updateBackupPolicy(request, callback) { + return this.rpcCall(updateBackupPolicy, $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupPolicy" }); + + /** + * Calls UpdateBackupPolicy. + * @function updateBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} request UpdateBackupPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupPolicy}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteBackupPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPolicy. + * @function deleteBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} request DeleteBackupPolicyRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteBackupPolicy = function deleteBackupPolicy(request, callback) { + return this.rpcCall(deleteBackupPolicy, $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPolicy" }); + + /** + * Calls DeleteBackupPolicy. + * @function deleteBackupPolicy + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} request DeleteBackupPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listQuotaRules}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListQuotaRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} [response] ListQuotaRulesResponse + */ + + /** + * Calls ListQuotaRules. + * @function listQuotaRules + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} request ListQuotaRulesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListQuotaRulesCallback} callback Node-style callback called with the error, if any, and ListQuotaRulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listQuotaRules = function listQuotaRules(request, callback) { + return this.rpcCall(listQuotaRules, $root.google.cloud.netapp.v1.ListQuotaRulesRequest, $root.google.cloud.netapp.v1.ListQuotaRulesResponse, request, callback); + }, "name", { value: "ListQuotaRules" }); + + /** + * Calls ListQuotaRules. + * @function listQuotaRules + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} request ListQuotaRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getQuotaRule}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetQuotaRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.QuotaRule} [response] QuotaRule + */ + + /** + * Calls GetQuotaRule. + * @function getQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} request GetQuotaRuleRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetQuotaRuleCallback} callback Node-style callback called with the error, if any, and QuotaRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getQuotaRule = function getQuotaRule(request, callback) { + return this.rpcCall(getQuotaRule, $root.google.cloud.netapp.v1.GetQuotaRuleRequest, $root.google.cloud.netapp.v1.QuotaRule, request, callback); + }, "name", { value: "GetQuotaRule" }); + + /** + * Calls GetQuotaRule. + * @function getQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} request GetQuotaRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createQuotaRule}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateQuotaRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateQuotaRule. + * @function createQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} request CreateQuotaRuleRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createQuotaRule = function createQuotaRule(request, callback) { + return this.rpcCall(createQuotaRule, $root.google.cloud.netapp.v1.CreateQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateQuotaRule" }); + + /** + * Calls CreateQuotaRule. + * @function createQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} request CreateQuotaRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateQuotaRule}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateQuotaRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateQuotaRule. + * @function updateQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} request UpdateQuotaRuleRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateQuotaRule = function updateQuotaRule(request, callback) { + return this.rpcCall(updateQuotaRule, $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateQuotaRule" }); + + /** + * Calls UpdateQuotaRule. + * @function updateQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} request UpdateQuotaRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteQuotaRule}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteQuotaRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteQuotaRule. + * @function deleteQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} request DeleteQuotaRuleRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteQuotaRule = function deleteQuotaRule(request, callback) { + return this.rpcCall(deleteQuotaRule, $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteQuotaRule" }); + + /** + * Calls DeleteQuotaRule. + * @function deleteQuotaRule + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} request DeleteQuotaRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|restoreBackupFiles}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef RestoreBackupFilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreBackupFiles. + * @function restoreBackupFiles + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} request RestoreBackupFilesRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.RestoreBackupFilesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.restoreBackupFiles = function restoreBackupFiles(request, callback) { + return this.rpcCall(restoreBackupFiles, $root.google.cloud.netapp.v1.RestoreBackupFilesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreBackupFiles" }); + + /** + * Calls RestoreBackupFiles. + * @function restoreBackupFiles + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} request RestoreBackupFilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|listHostGroups}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ListHostGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ListHostGroupsResponse} [response] ListHostGroupsResponse + */ + + /** + * Calls ListHostGroups. + * @function listHostGroups + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListHostGroupsRequest} request ListHostGroupsRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ListHostGroupsCallback} callback Node-style callback called with the error, if any, and ListHostGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.listHostGroups = function listHostGroups(request, callback) { + return this.rpcCall(listHostGroups, $root.google.cloud.netapp.v1.ListHostGroupsRequest, $root.google.cloud.netapp.v1.ListHostGroupsResponse, request, callback); + }, "name", { value: "ListHostGroups" }); + + /** + * Calls ListHostGroups. + * @function listHostGroups + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IListHostGroupsRequest} request ListHostGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|getHostGroup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef GetHostGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.HostGroup} [response] HostGroup + */ + + /** + * Calls GetHostGroup. + * @function getHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetHostGroupRequest} request GetHostGroupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.GetHostGroupCallback} callback Node-style callback called with the error, if any, and HostGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.getHostGroup = function getHostGroup(request, callback) { + return this.rpcCall(getHostGroup, $root.google.cloud.netapp.v1.GetHostGroupRequest, $root.google.cloud.netapp.v1.HostGroup, request, callback); + }, "name", { value: "GetHostGroup" }); + + /** + * Calls GetHostGroup. + * @function getHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IGetHostGroupRequest} request GetHostGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|createHostGroup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef CreateHostGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateHostGroup. + * @function createHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} request CreateHostGroupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.CreateHostGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.createHostGroup = function createHostGroup(request, callback) { + return this.rpcCall(createHostGroup, $root.google.cloud.netapp.v1.CreateHostGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateHostGroup" }); + + /** + * Calls CreateHostGroup. + * @function createHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} request CreateHostGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateHostGroup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef UpdateHostGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateHostGroup. + * @function updateHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} request UpdateHostGroupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.UpdateHostGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.updateHostGroup = function updateHostGroup(request, callback) { + return this.rpcCall(updateHostGroup, $root.google.cloud.netapp.v1.UpdateHostGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateHostGroup" }); + + /** + * Calls UpdateHostGroup. + * @function updateHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} request UpdateHostGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteHostGroup}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef DeleteHostGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteHostGroup. + * @function deleteHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} request DeleteHostGroupRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.DeleteHostGroupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.deleteHostGroup = function deleteHostGroup(request, callback) { + return this.rpcCall(deleteHostGroup, $root.google.cloud.netapp.v1.DeleteHostGroupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteHostGroup" }); + + /** + * Calls DeleteHostGroup. + * @function deleteHostGroup + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} request DeleteHostGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapPostCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} [response] ExecuteOntapPostResponse + */ + + /** + * Calls ExecuteOntapPost. + * @function executeOntapPost + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapPost = function executeOntapPost(request, callback) { + return this.rpcCall(executeOntapPost, $root.google.cloud.netapp.v1.ExecuteOntapPostRequest, $root.google.cloud.netapp.v1.ExecuteOntapPostResponse, request, callback); + }, "name", { value: "ExecuteOntapPost" }); + + /** + * Calls ExecuteOntapPost. + * @function executeOntapPost + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapGetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} [response] ExecuteOntapGetResponse + */ + + /** + * Calls ExecuteOntapGet. + * @function executeOntapGet + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback} callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapGet = function executeOntapGet(request, callback) { + return this.rpcCall(executeOntapGet, $root.google.cloud.netapp.v1.ExecuteOntapGetRequest, $root.google.cloud.netapp.v1.ExecuteOntapGetResponse, request, callback); + }, "name", { value: "ExecuteOntapGet" }); + + /** + * Calls ExecuteOntapGet. + * @function executeOntapGet + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapDeleteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} [response] ExecuteOntapDeleteResponse + */ + + /** + * Calls ExecuteOntapDelete. + * @function executeOntapDelete + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback} callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapDelete = function executeOntapDelete(request, callback) { + return this.rpcCall(executeOntapDelete, $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest, $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse, request, callback); + }, "name", { value: "ExecuteOntapDelete" }); + + /** + * Calls ExecuteOntapDelete. + * @function executeOntapDelete + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapPatchCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} [response] ExecuteOntapPatchResponse + */ + + /** + * Calls ExecuteOntapPatch. + * @function executeOntapPatch + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapPatch = function executeOntapPatch(request, callback) { + return this.rpcCall(executeOntapPatch, $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest, $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse, request, callback); + }, "name", { value: "ExecuteOntapPatch" }); + + /** + * Calls ExecuteOntapPatch. + * @function executeOntapPatch + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NetApp; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.netapp.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + 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"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.netapp.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.netapp.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + 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); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {google.cloud.netapp.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.ListHostGroupsRequest = (function() { + + /** + * Properties of a ListHostGroupsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListHostGroupsRequest + * @property {string|null} [parent] ListHostGroupsRequest parent + * @property {number|null} [pageSize] ListHostGroupsRequest pageSize + * @property {string|null} [pageToken] ListHostGroupsRequest pageToken + * @property {string|null} [filter] ListHostGroupsRequest filter + * @property {string|null} [orderBy] ListHostGroupsRequest orderBy + */ + + /** + * Constructs a new ListHostGroupsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListHostGroupsRequest. + * @implements IListHostGroupsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListHostGroupsRequest=} [properties] Properties to set + */ + function ListHostGroupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListHostGroupsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + */ + ListHostGroupsRequest.prototype.parent = ""; + + /** + * ListHostGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + */ + ListHostGroupsRequest.prototype.pageSize = 0; + + /** + * ListHostGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + */ + ListHostGroupsRequest.prototype.pageToken = ""; + + /** + * ListHostGroupsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + */ + ListHostGroupsRequest.prototype.filter = ""; + + /** + * ListHostGroupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + */ + ListHostGroupsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListHostGroupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest instance + */ + ListHostGroupsRequest.create = function create(properties) { + return new ListHostGroupsRequest(properties); + }; + + /** + * Encodes the specified ListHostGroupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsRequest} message ListHostGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHostGroupsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListHostGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsRequest} message ListHostGroupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHostGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListHostGroupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHostGroupsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListHostGroupsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListHostGroupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHostGroupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListHostGroupsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListHostGroupsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListHostGroupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest + */ + ListHostGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListHostGroupsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListHostGroupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListHostGroupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {google.cloud.netapp.v1.ListHostGroupsRequest} message ListHostGroupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListHostGroupsRequest.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; + }; + + /** + * Converts this ListHostGroupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListHostGroupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListHostGroupsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListHostGroupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListHostGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListHostGroupsRequest"; + }; + + return ListHostGroupsRequest; + })(); + + v1.ListHostGroupsResponse = (function() { + + /** + * Properties of a ListHostGroupsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListHostGroupsResponse + * @property {Array.|null} [hostGroups] ListHostGroupsResponse hostGroups + * @property {string|null} [nextPageToken] ListHostGroupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListHostGroupsResponse unreachable + */ + + /** + * Constructs a new ListHostGroupsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListHostGroupsResponse. + * @implements IListHostGroupsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListHostGroupsResponse=} [properties] Properties to set + */ + function ListHostGroupsResponse(properties) { + this.hostGroups = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListHostGroupsResponse hostGroups. + * @member {Array.} hostGroups + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @instance + */ + ListHostGroupsResponse.prototype.hostGroups = $util.emptyArray; + + /** + * ListHostGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @instance + */ + ListHostGroupsResponse.prototype.nextPageToken = ""; + + /** + * ListHostGroupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @instance + */ + ListHostGroupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListHostGroupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse instance + */ + ListHostGroupsResponse.create = function create(properties) { + return new ListHostGroupsResponse(properties); + }; + + /** + * Encodes the specified ListHostGroupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsResponse} message ListHostGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHostGroupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hostGroups != null && message.hostGroups.length) + for (var i = 0; i < message.hostGroups.length; ++i) + $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListHostGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {google.cloud.netapp.v1.IListHostGroupsResponse} message ListHostGroupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListHostGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListHostGroupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHostGroupsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListHostGroupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.hostGroups && message.hostGroups.length)) + message.hostGroups = []; + message.hostGroups.push($root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListHostGroupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListHostGroupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListHostGroupsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListHostGroupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostGroups != null && message.hasOwnProperty("hostGroups")) { + if (!Array.isArray(message.hostGroups)) + return "hostGroups: array expected"; + for (var i = 0; i < message.hostGroups.length; ++i) { + var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroups[i]); + if (error) + return "hostGroups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListHostGroupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse + */ + ListHostGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListHostGroupsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListHostGroupsResponse(); + if (object.hostGroups) { + if (!Array.isArray(object.hostGroups)) + throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.hostGroups: array expected"); + message.hostGroups = []; + for (var i = 0; i < object.hostGroups.length; ++i) { + if (typeof object.hostGroups[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.hostGroups: object expected"); + message.hostGroups[i] = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListHostGroupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {google.cloud.netapp.v1.ListHostGroupsResponse} message ListHostGroupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListHostGroupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.hostGroups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.hostGroups && message.hostGroups.length) { + object.hostGroups = []; + for (var j = 0; j < message.hostGroups.length; ++j) + object.hostGroups[j] = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListHostGroupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListHostGroupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListHostGroupsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListHostGroupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListHostGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListHostGroupsResponse"; + }; + + return ListHostGroupsResponse; + })(); + + v1.GetHostGroupRequest = (function() { + + /** + * Properties of a GetHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetHostGroupRequest + * @property {string|null} [name] GetHostGroupRequest name + */ + + /** + * Constructs a new GetHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetHostGroupRequest. + * @implements IGetHostGroupRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetHostGroupRequest=} [properties] Properties to set + */ + function GetHostGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetHostGroupRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @instance + */ + GetHostGroupRequest.prototype.name = ""; + + /** + * Creates a new GetHostGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IGetHostGroupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest instance + */ + GetHostGroupRequest.create = function create(properties) { + return new GetHostGroupRequest(properties); + }; + + /** + * Encodes the specified GetHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IGetHostGroupRequest} message GetHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetHostGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IGetHostGroupRequest} message GetHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetHostGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetHostGroupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetHostGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetHostGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetHostGroupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetHostGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest + */ + GetHostGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetHostGroupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetHostGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetHostGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.GetHostGroupRequest} message GetHostGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetHostGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetHostGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @instance + * @returns {Object.} JSON object + */ + GetHostGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetHostGroupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetHostGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetHostGroupRequest"; + }; + + return GetHostGroupRequest; + })(); + + v1.CreateHostGroupRequest = (function() { + + /** + * Properties of a CreateHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateHostGroupRequest + * @property {string|null} [parent] CreateHostGroupRequest parent + * @property {google.cloud.netapp.v1.IHostGroup|null} [hostGroup] CreateHostGroupRequest hostGroup + * @property {string|null} [hostGroupId] CreateHostGroupRequest hostGroupId + */ + + /** + * Constructs a new CreateHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateHostGroupRequest. + * @implements ICreateHostGroupRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest=} [properties] Properties to set + */ + function CreateHostGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateHostGroupRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @instance + */ + CreateHostGroupRequest.prototype.parent = ""; + + /** + * CreateHostGroupRequest hostGroup. + * @member {google.cloud.netapp.v1.IHostGroup|null|undefined} hostGroup + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @instance + */ + CreateHostGroupRequest.prototype.hostGroup = null; + + /** + * CreateHostGroupRequest hostGroupId. + * @member {string} hostGroupId + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @instance + */ + CreateHostGroupRequest.prototype.hostGroupId = ""; + + /** + * Creates a new CreateHostGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest instance + */ + CreateHostGroupRequest.create = function create(properties) { + return new CreateHostGroupRequest(properties); + }; + + /** + * Encodes the specified CreateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} message CreateHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateHostGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.hostGroup != null && Object.hasOwnProperty.call(message, "hostGroup")) + $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.hostGroupId != null && Object.hasOwnProperty.call(message, "hostGroupId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hostGroupId); + return writer; + }; + + /** + * Encodes the specified CreateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} message CreateHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateHostGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateHostGroupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateHostGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.hostGroupId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateHostGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateHostGroupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateHostGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) { + var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroup); + if (error) + return "hostGroup." + error; + } + if (message.hostGroupId != null && message.hasOwnProperty("hostGroupId")) + if (!$util.isString(message.hostGroupId)) + return "hostGroupId: string expected"; + return null; + }; + + /** + * Creates a CreateHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest + */ + CreateHostGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateHostGroupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateHostGroupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.hostGroup != null) { + if (typeof object.hostGroup !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateHostGroupRequest.hostGroup: object expected"); + message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroup); + } + if (object.hostGroupId != null) + message.hostGroupId = String(object.hostGroupId); + return message; + }; + + /** + * Creates a plain object from a CreateHostGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.CreateHostGroupRequest} message CreateHostGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateHostGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.hostGroup = null; + object.hostGroupId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) + object.hostGroup = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroup, options); + if (message.hostGroupId != null && message.hasOwnProperty("hostGroupId")) + object.hostGroupId = message.hostGroupId; + return object; + }; + + /** + * Converts this CreateHostGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @instance + * @returns {Object.} JSON object + */ + CreateHostGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateHostGroupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateHostGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateHostGroupRequest"; + }; + + return CreateHostGroupRequest; + })(); + + v1.UpdateHostGroupRequest = (function() { + + /** + * Properties of an UpdateHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateHostGroupRequest + * @property {google.cloud.netapp.v1.IHostGroup|null} [hostGroup] UpdateHostGroupRequest hostGroup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateHostGroupRequest updateMask + */ + + /** + * Constructs a new UpdateHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateHostGroupRequest. + * @implements IUpdateHostGroupRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest=} [properties] Properties to set + */ + function UpdateHostGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateHostGroupRequest hostGroup. + * @member {google.cloud.netapp.v1.IHostGroup|null|undefined} hostGroup + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @instance + */ + UpdateHostGroupRequest.prototype.hostGroup = null; + + /** + * UpdateHostGroupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @instance + */ + UpdateHostGroupRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateHostGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest instance + */ + UpdateHostGroupRequest.create = function create(properties) { + return new UpdateHostGroupRequest(properties); + }; + + /** + * Encodes the specified UpdateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} message UpdateHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateHostGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hostGroup != null && Object.hasOwnProperty.call(message, "hostGroup")) + $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} message UpdateHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateHostGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateHostGroupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateHostGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateHostGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateHostGroupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateHostGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) { + var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroup); + if (error) + return "hostGroup." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest + */ + UpdateHostGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateHostGroupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateHostGroupRequest(); + if (object.hostGroup != null) { + if (typeof object.hostGroup !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateHostGroupRequest.hostGroup: object expected"); + message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroup); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateHostGroupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateHostGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.UpdateHostGroupRequest} message UpdateHostGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateHostGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hostGroup = null; + object.updateMask = null; + } + if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) + object.hostGroup = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroup, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateHostGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateHostGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateHostGroupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateHostGroupRequest"; + }; + + return UpdateHostGroupRequest; + })(); + + v1.DeleteHostGroupRequest = (function() { + + /** + * Properties of a DeleteHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteHostGroupRequest + * @property {string|null} [name] DeleteHostGroupRequest name + */ + + /** + * Constructs a new DeleteHostGroupRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteHostGroupRequest. + * @implements IDeleteHostGroupRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest=} [properties] Properties to set + */ + function DeleteHostGroupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteHostGroupRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @instance + */ + DeleteHostGroupRequest.prototype.name = ""; + + /** + * Creates a new DeleteHostGroupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest instance + */ + DeleteHostGroupRequest.create = function create(properties) { + return new DeleteHostGroupRequest(properties); + }; + + /** + * Encodes the specified DeleteHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} message DeleteHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteHostGroupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} message DeleteHostGroupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteHostGroupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteHostGroupRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteHostGroupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteHostGroupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteHostGroupRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteHostGroupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteHostGroupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest + */ + DeleteHostGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteHostGroupRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteHostGroupRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteHostGroupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {google.cloud.netapp.v1.DeleteHostGroupRequest} message DeleteHostGroupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteHostGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteHostGroupRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteHostGroupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteHostGroupRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteHostGroupRequest"; + }; + + return DeleteHostGroupRequest; + })(); + + v1.HostGroup = (function() { + + /** + * Properties of a HostGroup. + * @memberof google.cloud.netapp.v1 + * @interface IHostGroup + * @property {string|null} [name] HostGroup name + * @property {google.cloud.netapp.v1.HostGroup.Type|null} [type] HostGroup type + * @property {google.cloud.netapp.v1.HostGroup.State|null} [state] HostGroup state + * @property {google.protobuf.ITimestamp|null} [createTime] HostGroup createTime + * @property {Array.|null} [hosts] HostGroup hosts + * @property {google.cloud.netapp.v1.OsType|null} [osType] HostGroup osType + * @property {string|null} [description] HostGroup description + * @property {Object.|null} [labels] HostGroup labels + */ + + /** + * Constructs a new HostGroup. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a HostGroup. + * @implements IHostGroup + * @constructor + * @param {google.cloud.netapp.v1.IHostGroup=} [properties] Properties to set + */ + function HostGroup(properties) { + this.hosts = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HostGroup name. + * @member {string} name + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.name = ""; + + /** + * HostGroup type. + * @member {google.cloud.netapp.v1.HostGroup.Type} type + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.type = 0; + + /** + * HostGroup state. + * @member {google.cloud.netapp.v1.HostGroup.State} state + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.state = 0; + + /** + * HostGroup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.createTime = null; + + /** + * HostGroup hosts. + * @member {Array.} hosts + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.hosts = $util.emptyArray; + + /** + * HostGroup osType. + * @member {google.cloud.netapp.v1.OsType} osType + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.osType = 0; + + /** + * HostGroup description. + * @member {string} description + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.description = ""; + + /** + * HostGroup labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + */ + HostGroup.prototype.labels = $util.emptyObject; + + /** + * Creates a new HostGroup instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {google.cloud.netapp.v1.IHostGroup=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HostGroup} HostGroup instance + */ + HostGroup.create = function create(properties) { + return new HostGroup(properties); + }; + + /** + * Encodes the specified HostGroup message. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {google.cloud.netapp.v1.IHostGroup} message HostGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HostGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.hosts != null && message.hosts.length) + for (var i = 0; i < message.hosts.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hosts[i]); + if (message.osType != null && Object.hasOwnProperty.call(message, "osType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.osType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified HostGroup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {google.cloud.netapp.v1.IHostGroup} message HostGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HostGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HostGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.HostGroup} HostGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HostGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HostGroup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.hosts && message.hosts.length)) + message.hosts = []; + message.hosts.push(reader.string()); + break; + } + case 6: { + message.osType = reader.int32(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HostGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.HostGroup} HostGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HostGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HostGroup message. + * @function verify + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HostGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + 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: + case 4: + case 5: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.hosts != null && message.hasOwnProperty("hosts")) { + if (!Array.isArray(message.hosts)) + return "hosts: array expected"; + for (var i = 0; i < message.hosts.length; ++i) + if (!$util.isString(message.hosts[i])) + return "hosts: string[] expected"; + } + if (message.osType != null && message.hasOwnProperty("osType")) + switch (message.osType) { + default: + return "osType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a HostGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.HostGroup} HostGroup + */ + HostGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HostGroup) + return object; + var message = new $root.google.cloud.netapp.v1.HostGroup(); + if (object.name != null) + message.name = String(object.name); + 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 "ISCSI_INITIATOR": + case 1: + message.type = 1; + 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 "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.HostGroup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.hosts) { + if (!Array.isArray(object.hosts)) + throw TypeError(".google.cloud.netapp.v1.HostGroup.hosts: array expected"); + message.hosts = []; + for (var i = 0; i < object.hosts.length; ++i) + message.hosts[i] = String(object.hosts[i]); + } + switch (object.osType) { + default: + if (typeof object.osType === "number") { + message.osType = object.osType; + break; + } + break; + case "OS_TYPE_UNSPECIFIED": + case 0: + message.osType = 0; + break; + case "LINUX": + case 1: + message.osType = 1; + break; + case "WINDOWS": + case 2: + message.osType = 2; + break; + case "ESXI": + case 3: + message.osType = 3; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.HostGroup.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a HostGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {google.cloud.netapp.v1.HostGroup} message HostGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HostGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hosts = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.osType = options.enums === String ? "OS_TYPE_UNSPECIFIED" : 0; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.netapp.v1.HostGroup.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.HostGroup.Type[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.HostGroup.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.HostGroup.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.hosts && message.hosts.length) { + object.hosts = []; + for (var j = 0; j < message.hosts.length; ++j) + object.hosts[j] = message.hosts[j]; + } + if (message.osType != null && message.hasOwnProperty("osType")) + object.osType = options.enums === String ? $root.google.cloud.netapp.v1.OsType[message.osType] === undefined ? message.osType : $root.google.cloud.netapp.v1.OsType[message.osType] : message.osType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this HostGroup to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.HostGroup + * @instance + * @returns {Object.} JSON object + */ + HostGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HostGroup + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.HostGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HostGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.HostGroup"; + }; + + /** + * Type enum. + * @name google.cloud.netapp.v1.HostGroup.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ISCSI_INITIATOR=1 ISCSI_INITIATOR value + */ + HostGroup.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ISCSI_INITIATOR"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.netapp.v1.HostGroup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} DISABLED=5 DISABLED value + */ + HostGroup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "DISABLED"] = 5; + return values; + })(); + + return HostGroup; + })(); + + /** + * ServiceLevel enum. + * @name google.cloud.netapp.v1.ServiceLevel + * @enum {number} + * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} EXTREME=2 EXTREME value + * @property {number} STANDARD=3 STANDARD value + * @property {number} FLEX=4 FLEX value + */ + v1.ServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "EXTREME"] = 2; + values[valuesById[3] = "STANDARD"] = 3; + values[valuesById[4] = "FLEX"] = 4; + return values; + })(); + + /** + * FlexPerformance enum. + * @name google.cloud.netapp.v1.FlexPerformance + * @enum {number} + * @property {number} FLEX_PERFORMANCE_UNSPECIFIED=0 FLEX_PERFORMANCE_UNSPECIFIED value + * @property {number} FLEX_PERFORMANCE_DEFAULT=1 FLEX_PERFORMANCE_DEFAULT value + * @property {number} FLEX_PERFORMANCE_CUSTOM=2 FLEX_PERFORMANCE_CUSTOM value + */ + v1.FlexPerformance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FLEX_PERFORMANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FLEX_PERFORMANCE_DEFAULT"] = 1; + values[valuesById[2] = "FLEX_PERFORMANCE_CUSTOM"] = 2; + return values; + })(); + + /** + * EncryptionType enum. + * @name google.cloud.netapp.v1.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} SERVICE_MANAGED=1 SERVICE_MANAGED value + * @property {number} CLOUD_KMS=2 CLOUD_KMS value + */ + v1.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVICE_MANAGED"] = 1; + values[valuesById[2] = "CLOUD_KMS"] = 2; + return values; + })(); + + /** + * DirectoryServiceType enum. + * @name google.cloud.netapp.v1.DirectoryServiceType + * @enum {number} + * @property {number} DIRECTORY_SERVICE_TYPE_UNSPECIFIED=0 DIRECTORY_SERVICE_TYPE_UNSPECIFIED value + * @property {number} ACTIVE_DIRECTORY=1 ACTIVE_DIRECTORY value + */ + v1.DirectoryServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIRECTORY_SERVICE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE_DIRECTORY"] = 1; + return values; + })(); + + /** + * StoragePoolType enum. + * @name google.cloud.netapp.v1.StoragePoolType + * @enum {number} + * @property {number} STORAGE_POOL_TYPE_UNSPECIFIED=0 STORAGE_POOL_TYPE_UNSPECIFIED value + * @property {number} FILE=1 FILE value + * @property {number} UNIFIED=2 UNIFIED value + */ + v1.StoragePoolType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_POOL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FILE"] = 1; + values[valuesById[2] = "UNIFIED"] = 2; + return values; + })(); + + /** + * HybridReplicationSchedule enum. + * @name google.cloud.netapp.v1.HybridReplicationSchedule + * @enum {number} + * @property {number} HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED=0 HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED value + * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value + * @property {number} HOURLY=2 HOURLY value + * @property {number} DAILY=3 DAILY value + */ + v1.HybridReplicationSchedule = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVERY_10_MINUTES"] = 1; + values[valuesById[2] = "HOURLY"] = 2; + values[valuesById[3] = "DAILY"] = 3; + return values; + })(); + + /** + * QosType enum. + * @name google.cloud.netapp.v1.QosType + * @enum {number} + * @property {number} QOS_TYPE_UNSPECIFIED=0 QOS_TYPE_UNSPECIFIED value + * @property {number} AUTO=1 AUTO value + * @property {number} MANUAL=2 MANUAL value + */ + v1.QosType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QOS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO"] = 1; + values[valuesById[2] = "MANUAL"] = 2; + return values; + })(); + + /** + * OsType enum. + * @name google.cloud.netapp.v1.OsType + * @enum {number} + * @property {number} OS_TYPE_UNSPECIFIED=0 OS_TYPE_UNSPECIFIED value + * @property {number} LINUX=1 LINUX value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} ESXI=3 ESXI value + */ + v1.OsType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINUX"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "ESXI"] = 3; + return values; + })(); + + v1.LocationMetadata = (function() { + + /** + * Properties of a LocationMetadata. + * @memberof google.cloud.netapp.v1 + * @interface ILocationMetadata + * @property {Array.|null} [supportedServiceLevels] LocationMetadata supportedServiceLevels + * @property {Array.|null} [supportedFlexPerformance] LocationMetadata supportedFlexPerformance + * @property {boolean|null} [hasVcp] LocationMetadata hasVcp + * @property {boolean|null} [hasOntapProxy] LocationMetadata hasOntapProxy + */ + + /** + * Constructs a new LocationMetadata. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata + * @constructor + * @param {google.cloud.netapp.v1.ILocationMetadata=} [properties] Properties to set + */ + function LocationMetadata(properties) { + this.supportedServiceLevels = []; + this.supportedFlexPerformance = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationMetadata supportedServiceLevels. + * @member {Array.} supportedServiceLevels + * @memberof google.cloud.netapp.v1.LocationMetadata + * @instance + */ + LocationMetadata.prototype.supportedServiceLevels = $util.emptyArray; + + /** + * LocationMetadata supportedFlexPerformance. + * @member {Array.} supportedFlexPerformance + * @memberof google.cloud.netapp.v1.LocationMetadata + * @instance + */ + LocationMetadata.prototype.supportedFlexPerformance = $util.emptyArray; + + /** + * LocationMetadata hasVcp. + * @member {boolean} hasVcp + * @memberof google.cloud.netapp.v1.LocationMetadata + * @instance + */ + LocationMetadata.prototype.hasVcp = false; + + /** + * LocationMetadata hasOntapProxy. + * @member {boolean} hasOntapProxy + * @memberof google.cloud.netapp.v1.LocationMetadata + * @instance + */ + LocationMetadata.prototype.hasOntapProxy = false; + + /** + * Creates a new LocationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {google.cloud.netapp.v1.ILocationMetadata=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata instance + */ + LocationMetadata.create = function create(properties) { + return new LocationMetadata(properties); + }; + + /** + * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {google.cloud.netapp.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.supportedServiceLevels != null && message.supportedServiceLevels.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.supportedServiceLevels.length; ++i) + writer.int32(message.supportedServiceLevels[i]); + writer.ldelim(); + } + if (message.supportedFlexPerformance != null && message.supportedFlexPerformance.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.supportedFlexPerformance.length; ++i) + writer.int32(message.supportedFlexPerformance[i]); + writer.ldelim(); + } + if (message.hasVcp != null && Object.hasOwnProperty.call(message, "hasVcp")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hasVcp); + if (message.hasOntapProxy != null && Object.hasOwnProperty.call(message, "hasOntapProxy")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasOntapProxy); + return writer; + }; + + /** + * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {google.cloud.netapp.v1.ILocationMetadata} message LocationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.LocationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.supportedServiceLevels && message.supportedServiceLevels.length)) + message.supportedServiceLevels = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedServiceLevels.push(reader.int32()); + } else + message.supportedServiceLevels.push(reader.int32()); + break; + } + case 2: { + if (!(message.supportedFlexPerformance && message.supportedFlexPerformance.length)) + message.supportedFlexPerformance = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedFlexPerformance.push(reader.int32()); + } else + message.supportedFlexPerformance.push(reader.int32()); + break; + } + case 3: { + message.hasVcp = reader.bool(); + break; + } + case 4: { + message.hasOntapProxy = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationMetadata message. + * @function verify + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.supportedServiceLevels != null && message.hasOwnProperty("supportedServiceLevels")) { + if (!Array.isArray(message.supportedServiceLevels)) + return "supportedServiceLevels: array expected"; + for (var i = 0; i < message.supportedServiceLevels.length; ++i) + switch (message.supportedServiceLevels[i]) { + default: + return "supportedServiceLevels: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.supportedFlexPerformance != null && message.hasOwnProperty("supportedFlexPerformance")) { + if (!Array.isArray(message.supportedFlexPerformance)) + return "supportedFlexPerformance: array expected"; + for (var i = 0; i < message.supportedFlexPerformance.length; ++i) + switch (message.supportedFlexPerformance[i]) { + default: + return "supportedFlexPerformance: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.hasVcp != null && message.hasOwnProperty("hasVcp")) + if (typeof message.hasVcp !== "boolean") + return "hasVcp: boolean expected"; + if (message.hasOntapProxy != null && message.hasOwnProperty("hasOntapProxy")) + if (typeof message.hasOntapProxy !== "boolean") + return "hasOntapProxy: boolean expected"; + return null; + }; + + /** + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata + */ + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.LocationMetadata) + return object; + var message = new $root.google.cloud.netapp.v1.LocationMetadata(); + if (object.supportedServiceLevels) { + if (!Array.isArray(object.supportedServiceLevels)) + throw TypeError(".google.cloud.netapp.v1.LocationMetadata.supportedServiceLevels: array expected"); + message.supportedServiceLevels = []; + for (var i = 0; i < object.supportedServiceLevels.length; ++i) + switch (object.supportedServiceLevels[i]) { + default: + if (typeof object.supportedServiceLevels[i] === "number") { + message.supportedServiceLevels[i] = object.supportedServiceLevels[i]; + break; + } + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.supportedServiceLevels[i] = 0; + break; + case "PREMIUM": + case 1: + message.supportedServiceLevels[i] = 1; + break; + case "EXTREME": + case 2: + message.supportedServiceLevels[i] = 2; + break; + case "STANDARD": + case 3: + message.supportedServiceLevels[i] = 3; + break; + case "FLEX": + case 4: + message.supportedServiceLevels[i] = 4; + break; + } + } + if (object.supportedFlexPerformance) { + if (!Array.isArray(object.supportedFlexPerformance)) + throw TypeError(".google.cloud.netapp.v1.LocationMetadata.supportedFlexPerformance: array expected"); + message.supportedFlexPerformance = []; + for (var i = 0; i < object.supportedFlexPerformance.length; ++i) + switch (object.supportedFlexPerformance[i]) { + default: + if (typeof object.supportedFlexPerformance[i] === "number") { + message.supportedFlexPerformance[i] = object.supportedFlexPerformance[i]; + break; + } + case "FLEX_PERFORMANCE_UNSPECIFIED": + case 0: + message.supportedFlexPerformance[i] = 0; + break; + case "FLEX_PERFORMANCE_DEFAULT": + case 1: + message.supportedFlexPerformance[i] = 1; + break; + case "FLEX_PERFORMANCE_CUSTOM": + case 2: + message.supportedFlexPerformance[i] = 2; + break; + } + } + if (object.hasVcp != null) + message.hasVcp = Boolean(object.hasVcp); + if (object.hasOntapProxy != null) + message.hasOntapProxy = Boolean(object.hasOntapProxy); + return message; + }; + + /** + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {google.cloud.netapp.v1.LocationMetadata} message LocationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.supportedServiceLevels = []; + object.supportedFlexPerformance = []; + } + if (options.defaults) { + object.hasVcp = false; + object.hasOntapProxy = false; + } + if (message.supportedServiceLevels && message.supportedServiceLevels.length) { + object.supportedServiceLevels = []; + for (var j = 0; j < message.supportedServiceLevels.length; ++j) + object.supportedServiceLevels[j] = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.supportedServiceLevels[j]] === undefined ? message.supportedServiceLevels[j] : $root.google.cloud.netapp.v1.ServiceLevel[message.supportedServiceLevels[j]] : message.supportedServiceLevels[j]; + } + if (message.supportedFlexPerformance && message.supportedFlexPerformance.length) { + object.supportedFlexPerformance = []; + for (var j = 0; j < message.supportedFlexPerformance.length; ++j) + object.supportedFlexPerformance[j] = options.enums === String ? $root.google.cloud.netapp.v1.FlexPerformance[message.supportedFlexPerformance[j]] === undefined ? message.supportedFlexPerformance[j] : $root.google.cloud.netapp.v1.FlexPerformance[message.supportedFlexPerformance[j]] : message.supportedFlexPerformance[j]; + } + if (message.hasVcp != null && message.hasOwnProperty("hasVcp")) + object.hasVcp = message.hasVcp; + if (message.hasOntapProxy != null && message.hasOwnProperty("hasOntapProxy")) + object.hasOntapProxy = message.hasOntapProxy; + return object; + }; + + /** + * Converts this LocationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.LocationMetadata + * @instance + * @returns {Object.} JSON object + */ + LocationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationMetadata + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.LocationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.LocationMetadata"; + }; + + return LocationMetadata; + })(); + + v1.UserCommands = (function() { + + /** + * Properties of a UserCommands. + * @memberof google.cloud.netapp.v1 + * @interface IUserCommands + * @property {Array.|null} [commands] UserCommands commands + */ + + /** + * Constructs a new UserCommands. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a UserCommands. + * @implements IUserCommands + * @constructor + * @param {google.cloud.netapp.v1.IUserCommands=} [properties] Properties to set + */ + function UserCommands(properties) { + this.commands = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserCommands commands. + * @member {Array.} commands + * @memberof google.cloud.netapp.v1.UserCommands + * @instance + */ + UserCommands.prototype.commands = $util.emptyArray; + + /** + * Creates a new UserCommands instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {google.cloud.netapp.v1.IUserCommands=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UserCommands} UserCommands instance + */ + UserCommands.create = function create(properties) { + return new UserCommands(properties); + }; + + /** + * Encodes the specified UserCommands message. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {google.cloud.netapp.v1.IUserCommands} message UserCommands message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCommands.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commands != null && message.commands.length) + for (var i = 0; i < message.commands.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.commands[i]); + return writer; + }; + + /** + * Encodes the specified UserCommands message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {google.cloud.netapp.v1.IUserCommands} message UserCommands message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCommands.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserCommands message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UserCommands} UserCommands + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCommands.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UserCommands(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.commands && message.commands.length)) + message.commands = []; + message.commands.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserCommands message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UserCommands} UserCommands + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCommands.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserCommands message. + * @function verify + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserCommands.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commands != null && message.hasOwnProperty("commands")) { + if (!Array.isArray(message.commands)) + return "commands: array expected"; + for (var i = 0; i < message.commands.length; ++i) + if (!$util.isString(message.commands[i])) + return "commands: string[] expected"; + } + return null; + }; + + /** + * Creates a UserCommands message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UserCommands} UserCommands + */ + UserCommands.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UserCommands) + return object; + var message = new $root.google.cloud.netapp.v1.UserCommands(); + if (object.commands) { + if (!Array.isArray(object.commands)) + throw TypeError(".google.cloud.netapp.v1.UserCommands.commands: array expected"); + message.commands = []; + for (var i = 0; i < object.commands.length; ++i) + message.commands[i] = String(object.commands[i]); + } + return message; + }; + + /** + * Creates a plain object from a UserCommands message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {google.cloud.netapp.v1.UserCommands} message UserCommands + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserCommands.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.commands = []; + if (message.commands && message.commands.length) { + object.commands = []; + for (var j = 0; j < message.commands.length; ++j) + object.commands[j] = message.commands[j]; + } + return object; + }; + + /** + * Converts this UserCommands to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UserCommands + * @instance + * @returns {Object.} JSON object + */ + UserCommands.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserCommands + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UserCommands + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserCommands.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UserCommands"; + }; + + return UserCommands; + })(); + + v1.GetKmsConfigRequest = (function() { + + /** + * Properties of a GetKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetKmsConfigRequest + * @property {string|null} [name] GetKmsConfigRequest name + */ + + /** + * Constructs a new GetKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetKmsConfigRequest. + * @implements IGetKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set + */ + function GetKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @instance + */ + GetKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new GetKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest instance + */ + GetKmsConfigRequest.create = function create(properties) { + return new GetKmsConfigRequest(properties); + }; + + /** + * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetKmsConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest + */ + GetKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.GetKmsConfigRequest} message GetKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetKmsConfigRequest"; + }; + + return GetKmsConfigRequest; + })(); + + v1.ListKmsConfigsRequest = (function() { + + /** + * Properties of a ListKmsConfigsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListKmsConfigsRequest + * @property {string|null} [parent] ListKmsConfigsRequest parent + * @property {number|null} [pageSize] ListKmsConfigsRequest pageSize + * @property {string|null} [pageToken] ListKmsConfigsRequest pageToken + * @property {string|null} [orderBy] ListKmsConfigsRequest orderBy + * @property {string|null} [filter] ListKmsConfigsRequest filter + */ + + /** + * Constructs a new ListKmsConfigsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListKmsConfigsRequest. + * @implements IListKmsConfigsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set + */ + function ListKmsConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListKmsConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.parent = ""; + + /** + * ListKmsConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.pageSize = 0; + + /** + * ListKmsConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.pageToken = ""; + + /** + * ListKmsConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.orderBy = ""; + + /** + * ListKmsConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + */ + ListKmsConfigsRequest.prototype.filter = ""; + + /** + * Creates a new ListKmsConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest instance + */ + ListKmsConfigsRequest.create = function create(properties) { + return new ListKmsConfigsRequest(properties); + }; + + /** + * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListKmsConfigsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListKmsConfigsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest + */ + ListKmsConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {google.cloud.netapp.v1.ListKmsConfigsRequest} message ListKmsConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListKmsConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListKmsConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListKmsConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListKmsConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListKmsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsRequest"; + }; + + return ListKmsConfigsRequest; + })(); + + v1.ListKmsConfigsResponse = (function() { + + /** + * Properties of a ListKmsConfigsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListKmsConfigsResponse + * @property {Array.|null} [kmsConfigs] ListKmsConfigsResponse kmsConfigs + * @property {string|null} [nextPageToken] ListKmsConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListKmsConfigsResponse unreachable + */ + + /** + * Constructs a new ListKmsConfigsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListKmsConfigsResponse. + * @implements IListKmsConfigsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set + */ + function ListKmsConfigsResponse(properties) { + this.kmsConfigs = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListKmsConfigsResponse kmsConfigs. + * @member {Array.} kmsConfigs + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.kmsConfigs = $util.emptyArray; + + /** + * ListKmsConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListKmsConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + */ + ListKmsConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListKmsConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse instance + */ + ListKmsConfigsResponse.create = function create(properties) { + return new ListKmsConfigsResponse(properties); + }; + + /** + * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsConfigs != null && message.kmsConfigs.length) + for (var i = 0; i < message.kmsConfigs.length; ++i) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListKmsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.kmsConfigs && message.kmsConfigs.length)) + message.kmsConfigs = []; + message.kmsConfigs.push($root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListKmsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListKmsConfigsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListKmsConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsConfigs != null && message.hasOwnProperty("kmsConfigs")) { + if (!Array.isArray(message.kmsConfigs)) + return "kmsConfigs: array expected"; + for (var i = 0; i < message.kmsConfigs.length; ++i) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfigs[i]); + if (error) + return "kmsConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse + */ + ListKmsConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); + if (object.kmsConfigs) { + if (!Array.isArray(object.kmsConfigs)) + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: array expected"); + message.kmsConfigs = []; + for (var i = 0; i < object.kmsConfigs.length; ++i) { + if (typeof object.kmsConfigs[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: object expected"); + message.kmsConfigs[i] = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} message ListKmsConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListKmsConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.kmsConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.kmsConfigs && message.kmsConfigs.length) { + object.kmsConfigs = []; + for (var j = 0; j < message.kmsConfigs.length; ++j) + object.kmsConfigs[j] = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListKmsConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListKmsConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListKmsConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListKmsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsResponse"; + }; + + return ListKmsConfigsResponse; + })(); + + v1.CreateKmsConfigRequest = (function() { + + /** + * Properties of a CreateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateKmsConfigRequest + * @property {string|null} [parent] CreateKmsConfigRequest parent + * @property {string|null} [kmsConfigId] CreateKmsConfigRequest kmsConfigId + * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] CreateKmsConfigRequest kmsConfig + */ + + /** + * Constructs a new CreateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateKmsConfigRequest. + * @implements ICreateKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set + */ + function CreateKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateKmsConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.parent = ""; + + /** + * CreateKmsConfigRequest kmsConfigId. + * @member {string} kmsConfigId + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.kmsConfigId = ""; + + /** + * CreateKmsConfigRequest kmsConfig. + * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + */ + CreateKmsConfigRequest.prototype.kmsConfig = null; + + /** + * Creates a new CreateKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest instance + */ + CreateKmsConfigRequest.create = function create(properties) { + return new CreateKmsConfigRequest(properties); + }; + + /** + * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.kmsConfigId != null && Object.hasOwnProperty.call(message, "kmsConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsConfigId); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateKmsConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.kmsConfigId = reader.string(); + break; + } + case 3: { + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) + if (!$util.isString(message.kmsConfigId)) + return "kmsConfigId: string expected"; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); + if (error) + return "kmsConfig." + error; + } + return null; + }; + + /** + * Creates a CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest + */ + CreateKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.kmsConfigId != null) + message.kmsConfigId = String(object.kmsConfigId); + if (object.kmsConfig != null) { + if (typeof object.kmsConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateKmsConfigRequest.kmsConfig: object expected"); + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.CreateKmsConfigRequest} message CreateKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.kmsConfigId = ""; + object.kmsConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) + object.kmsConfigId = message.kmsConfigId; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); + return object; + }; + + /** + * Converts this CreateKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateKmsConfigRequest"; + }; + + return CreateKmsConfigRequest; + })(); + + v1.UpdateKmsConfigRequest = (function() { + + /** + * Properties of an UpdateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateKmsConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateKmsConfigRequest updateMask + * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] UpdateKmsConfigRequest kmsConfig + */ + + /** + * Constructs a new UpdateKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateKmsConfigRequest. + * @implements IUpdateKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set + */ + function UpdateKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateKmsConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + */ + UpdateKmsConfigRequest.prototype.updateMask = null; + + /** + * UpdateKmsConfigRequest kmsConfig. + * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + */ + UpdateKmsConfigRequest.prototype.kmsConfig = null; + + /** + * Creates a new UpdateKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest instance + */ + UpdateKmsConfigRequest.create = function create(properties) { + return new UpdateKmsConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateKmsConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { + var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); + if (error) + return "kmsConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest + */ + UpdateKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.kmsConfig != null) { + if (typeof object.kmsConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.kmsConfig: object expected"); + message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.UpdateKmsConfigRequest} message UpdateKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.kmsConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); + return object; + }; + + /** + * Converts this UpdateKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateKmsConfigRequest"; + }; + + return UpdateKmsConfigRequest; + })(); + + v1.DeleteKmsConfigRequest = (function() { + + /** + * Properties of a DeleteKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteKmsConfigRequest + * @property {string|null} [name] DeleteKmsConfigRequest name + */ + + /** + * Constructs a new DeleteKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteKmsConfigRequest. + * @implements IDeleteKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set + */ + function DeleteKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @instance + */ + DeleteKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest instance + */ + DeleteKmsConfigRequest.create = function create(properties) { + return new DeleteKmsConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteKmsConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest + */ + DeleteKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.DeleteKmsConfigRequest} message DeleteKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteKmsConfigRequest"; + }; + + return DeleteKmsConfigRequest; + })(); + + v1.EncryptVolumesRequest = (function() { + + /** + * Properties of an EncryptVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IEncryptVolumesRequest + * @property {string|null} [name] EncryptVolumesRequest name + */ + + /** + * Constructs a new EncryptVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an EncryptVolumesRequest. + * @implements IEncryptVolumesRequest + * @constructor + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set + */ + function EncryptVolumesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptVolumesRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @instance + */ + EncryptVolumesRequest.prototype.name = ""; + + /** + * Creates a new EncryptVolumesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest instance + */ + EncryptVolumesRequest.create = function create(properties) { + return new EncryptVolumesRequest(properties); + }; + + /** + * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptVolumesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptVolumesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptVolumesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptVolumesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptVolumesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest + */ + EncryptVolumesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EncryptVolumesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {google.cloud.netapp.v1.EncryptVolumesRequest} message EncryptVolumesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptVolumesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this EncryptVolumesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @instance + * @returns {Object.} JSON object + */ + EncryptVolumesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptVolumesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.EncryptVolumesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.EncryptVolumesRequest"; + }; + + return EncryptVolumesRequest; + })(); + + v1.VerifyKmsConfigRequest = (function() { + + /** + * Properties of a VerifyKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @interface IVerifyKmsConfigRequest + * @property {string|null} [name] VerifyKmsConfigRequest name + */ + + /** + * Constructs a new VerifyKmsConfigRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a VerifyKmsConfigRequest. + * @implements IVerifyKmsConfigRequest + * @constructor + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set + */ + function VerifyKmsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifyKmsConfigRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @instance + */ + VerifyKmsConfigRequest.prototype.name = ""; + + /** + * Creates a new VerifyKmsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest instance + */ + VerifyKmsConfigRequest.create = function create(properties) { + return new VerifyKmsConfigRequest(properties); + }; + + /** + * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyKmsConfigRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyKmsConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest + */ + VerifyKmsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigRequest) + return object; + var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {google.cloud.netapp.v1.VerifyKmsConfigRequest} message VerifyKmsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyKmsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this VerifyKmsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyKmsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyKmsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigRequest"; + }; + + return VerifyKmsConfigRequest; + })(); + + v1.VerifyKmsConfigResponse = (function() { + + /** + * Properties of a VerifyKmsConfigResponse. + * @memberof google.cloud.netapp.v1 + * @interface IVerifyKmsConfigResponse + * @property {boolean|null} [healthy] VerifyKmsConfigResponse healthy + * @property {string|null} [healthError] VerifyKmsConfigResponse healthError + * @property {string|null} [instructions] VerifyKmsConfigResponse instructions + */ + + /** + * Constructs a new VerifyKmsConfigResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a VerifyKmsConfigResponse. + * @implements IVerifyKmsConfigResponse + * @constructor + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set + */ + function VerifyKmsConfigResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifyKmsConfigResponse healthy. + * @member {boolean} healthy + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.healthy = false; + + /** + * VerifyKmsConfigResponse healthError. + * @member {string} healthError + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.healthError = ""; + + /** + * VerifyKmsConfigResponse instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + */ + VerifyKmsConfigResponse.prototype.instructions = ""; + + /** + * Creates a new VerifyKmsConfigResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse instance + */ + VerifyKmsConfigResponse.create = function create(properties) { + return new VerifyKmsConfigResponse(properties); + }; + + /** + * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.healthy); + if (message.healthError != null && Object.hasOwnProperty.call(message, "healthError")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthError); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instructions); + return writer; + }; + + /** + * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyKmsConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.healthy = reader.bool(); + break; + } + case 2: { + message.healthError = reader.string(); + break; + } + case 3: { + message.instructions = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyKmsConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyKmsConfigResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyKmsConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.healthy != null && message.hasOwnProperty("healthy")) + if (typeof message.healthy !== "boolean") + return "healthy: boolean expected"; + if (message.healthError != null && message.hasOwnProperty("healthError")) + if (!$util.isString(message.healthError)) + return "healthError: string expected"; + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + return null; + }; + + /** + * Creates a VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse + */ + VerifyKmsConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigResponse) + return object; + var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); + if (object.healthy != null) + message.healthy = Boolean(object.healthy); + if (object.healthError != null) + message.healthError = String(object.healthError); + if (object.instructions != null) + message.instructions = String(object.instructions); + return message; + }; + + /** + * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} message VerifyKmsConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyKmsConfigResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.healthy = false; + object.healthError = ""; + object.instructions = ""; + } + if (message.healthy != null && message.hasOwnProperty("healthy")) + object.healthy = message.healthy; + if (message.healthError != null && message.hasOwnProperty("healthError")) + object.healthError = message.healthError; + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + return object; + }; + + /** + * Converts this VerifyKmsConfigResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyKmsConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyKmsConfigResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyKmsConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigResponse"; + }; + + return VerifyKmsConfigResponse; + })(); + + v1.KmsConfig = (function() { + + /** + * Properties of a KmsConfig. + * @memberof google.cloud.netapp.v1 + * @interface IKmsConfig + * @property {string|null} [name] KmsConfig name + * @property {string|null} [cryptoKeyName] KmsConfig cryptoKeyName + * @property {google.cloud.netapp.v1.KmsConfig.State|null} [state] KmsConfig state + * @property {string|null} [stateDetails] KmsConfig stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] KmsConfig createTime + * @property {string|null} [description] KmsConfig description + * @property {Object.|null} [labels] KmsConfig labels + * @property {string|null} [instructions] KmsConfig instructions + * @property {string|null} [serviceAccount] KmsConfig serviceAccount + */ + + /** + * Constructs a new KmsConfig. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a KmsConfig. + * @implements IKmsConfig + * @constructor + * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set + */ + function KmsConfig(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KmsConfig name. + * @member {string} name + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.name = ""; + + /** + * KmsConfig cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.cryptoKeyName = ""; + + /** + * KmsConfig state. + * @member {google.cloud.netapp.v1.KmsConfig.State} state + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.state = 0; + + /** + * KmsConfig stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.stateDetails = ""; + + /** + * KmsConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.createTime = null; + + /** + * KmsConfig description. + * @member {string} description + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.description = ""; + + /** + * KmsConfig labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.labels = $util.emptyObject; + + /** + * KmsConfig instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.instructions = ""; + + /** + * KmsConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + */ + KmsConfig.prototype.serviceAccount = ""; + + /** + * Creates a new KmsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig instance + */ + KmsConfig.create = function create(properties) { + return new KmsConfig(properties); + }; + + /** + * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.instructions); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + return writer; + }; + + /** + * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KmsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.KmsConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cryptoKeyName = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.stateDetails = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.instructions = reader.string(); + break; + } + case 9: { + message.serviceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KmsConfig message. + * @function verify + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KmsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + return null; + }; + + /** + * Creates a KmsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig + */ + KmsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.KmsConfig) + return object; + var message = new $root.google.cloud.netapp.v1.KmsConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + 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 "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "IN_USE": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + case "KEY_CHECK_PENDING": + case 7: + message.state = 7; + break; + case "KEY_NOT_REACHABLE": + case 8: + message.state = 8; + break; + case "DISABLING": + case 9: + message.state = 9; + break; + case "DISABLED": + case 10: + message.state = 10; + break; + case "MIGRATING": + case 11: + message.state = 11; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.KmsConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.KmsConfig.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + return message; + }; + + /** + * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {google.cloud.netapp.v1.KmsConfig} message KmsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KmsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.cryptoKeyName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; + object.instructions = ""; + object.serviceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.KmsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.KmsConfig.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + return object; + }; + + /** + * Converts this KmsConfig to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.KmsConfig + * @instance + * @returns {Object.} JSON object + */ + KmsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KmsConfig + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.KmsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KmsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.KmsConfig"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.KmsConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} IN_USE=5 IN_USE value + * @property {number} ERROR=6 ERROR value + * @property {number} KEY_CHECK_PENDING=7 KEY_CHECK_PENDING value + * @property {number} KEY_NOT_REACHABLE=8 KEY_NOT_REACHABLE value + * @property {number} DISABLING=9 DISABLING value + * @property {number} DISABLED=10 DISABLED value + * @property {number} MIGRATING=11 MIGRATING value + */ + KmsConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "IN_USE"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[7] = "KEY_CHECK_PENDING"] = 7; + values[valuesById[8] = "KEY_NOT_REACHABLE"] = 8; + values[valuesById[9] = "DISABLING"] = 9; + values[valuesById[10] = "DISABLED"] = 10; + values[valuesById[11] = "MIGRATING"] = 11; + return values; + })(); + + return KmsConfig; + })(); + + v1.ExecuteOntapPostRequest = (function() { + + /** + * Properties of an ExecuteOntapPostRequest. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapPostRequest + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostRequest body + * @property {string|null} [ontapPath] ExecuteOntapPostRequest ontapPath + */ + + /** + * Constructs a new ExecuteOntapPostRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapPostRequest. + * @implements IExecuteOntapPostRequest + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set + */ + function ExecuteOntapPostRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapPostRequest body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @instance + */ + ExecuteOntapPostRequest.prototype.body = null; + + /** + * ExecuteOntapPostRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @instance + */ + ExecuteOntapPostRequest.prototype.ontapPath = ""; + + /** + * Creates a new ExecuteOntapPostRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest instance + */ + ExecuteOntapPostRequest.create = function create(properties) { + return new ExecuteOntapPostRequest(properties); + }; + + /** + * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPostRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPostRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPostRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ontapPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPostRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapPostRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapPostRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; + return null; + }; + + /** + * Creates an ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest + */ + ExecuteOntapPostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostRequest.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapPostRequest} message ExecuteOntapPostRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapPostRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = null; + object.ontapPath = ""; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; + return object; + }; + + /** + * Converts this ExecuteOntapPostRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapPostRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapPostRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapPostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostRequest"; + }; + + return ExecuteOntapPostRequest; + })(); + + v1.ExecuteOntapPostResponse = (function() { + + /** + * Properties of an ExecuteOntapPostResponse. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapPostResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostResponse body + */ + + /** + * Constructs a new ExecuteOntapPostResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapPostResponse. + * @implements IExecuteOntapPostResponse + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set + */ + function ExecuteOntapPostResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapPostResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @instance + */ + ExecuteOntapPostResponse.prototype.body = null; + + /** + * Creates a new ExecuteOntapPostResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse instance + */ + ExecuteOntapPostResponse.create = function create(properties) { + return new ExecuteOntapPostResponse(properties); + }; + + /** + * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPostResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPostResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPostResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPostResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapPostResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapPostResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + return null; + }; + + /** + * Creates an ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse + */ + ExecuteOntapPostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} message ExecuteOntapPostResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapPostResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + return object; + }; + + /** + * Converts this ExecuteOntapPostResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapPostResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapPostResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapPostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostResponse"; + }; + + return ExecuteOntapPostResponse; + })(); + + v1.ExecuteOntapGetRequest = (function() { + + /** + * Properties of an ExecuteOntapGetRequest. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapGetRequest + * @property {string|null} [ontapPath] ExecuteOntapGetRequest ontapPath + */ + + /** + * Constructs a new ExecuteOntapGetRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapGetRequest. + * @implements IExecuteOntapGetRequest + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set + */ + function ExecuteOntapGetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapGetRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @instance + */ + ExecuteOntapGetRequest.prototype.ontapPath = ""; + + /** + * Creates a new ExecuteOntapGetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest instance + */ + ExecuteOntapGetRequest.create = function create(properties) { + return new ExecuteOntapGetRequest(properties); + }; + + /** + * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapGetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ontapPath); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapGetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapGetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ontapPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapGetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapGetRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapGetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; + return null; + }; + + /** + * Creates an ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest + */ + ExecuteOntapGetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapGetRequest} message ExecuteOntapGetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapGetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.ontapPath = ""; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; + return object; + }; + + /** + * Converts this ExecuteOntapGetRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapGetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapGetRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapGetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetRequest"; + }; + + return ExecuteOntapGetRequest; + })(); + + v1.ExecuteOntapGetResponse = (function() { + + /** + * Properties of an ExecuteOntapGetResponse. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapGetResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapGetResponse body + */ + + /** + * Constructs a new ExecuteOntapGetResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapGetResponse. + * @implements IExecuteOntapGetResponse + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set + */ + function ExecuteOntapGetResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapGetResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @instance + */ + ExecuteOntapGetResponse.prototype.body = null; + + /** + * Creates a new ExecuteOntapGetResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse instance + */ + ExecuteOntapGetResponse.create = function create(properties) { + return new ExecuteOntapGetResponse(properties); + }; + + /** + * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapGetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapGetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapGetResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapGetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapGetResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapGetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + return null; + }; + + /** + * Creates an ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse + */ + ExecuteOntapGetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapGetResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} message ExecuteOntapGetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapGetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + return object; + }; + + /** + * Converts this ExecuteOntapGetResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapGetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapGetResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapGetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetResponse"; + }; + + return ExecuteOntapGetResponse; + })(); + + v1.ExecuteOntapDeleteRequest = (function() { + + /** + * Properties of an ExecuteOntapDeleteRequest. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapDeleteRequest + * @property {string|null} [ontapPath] ExecuteOntapDeleteRequest ontapPath + */ + + /** + * Constructs a new ExecuteOntapDeleteRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapDeleteRequest. + * @implements IExecuteOntapDeleteRequest + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set + */ + function ExecuteOntapDeleteRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapDeleteRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @instance + */ + ExecuteOntapDeleteRequest.prototype.ontapPath = ""; + + /** + * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest instance + */ + ExecuteOntapDeleteRequest.create = function create(properties) { + return new ExecuteOntapDeleteRequest(properties); + }; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapDeleteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ontapPath); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapDeleteRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.ontapPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapDeleteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapDeleteRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapDeleteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; + return null; + }; + + /** + * Creates an ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest + */ + ExecuteOntapDeleteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapDeleteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.ontapPath = ""; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; + return object; + }; + + /** + * Converts this ExecuteOntapDeleteRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapDeleteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapDeleteRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapDeleteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteRequest"; + }; + + return ExecuteOntapDeleteRequest; + })(); + + v1.ExecuteOntapDeleteResponse = (function() { + + /** + * Properties of an ExecuteOntapDeleteResponse. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapDeleteResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapDeleteResponse body + */ + + /** + * Constructs a new ExecuteOntapDeleteResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapDeleteResponse. + * @implements IExecuteOntapDeleteResponse + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set + */ + function ExecuteOntapDeleteResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapDeleteResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @instance + */ + ExecuteOntapDeleteResponse.prototype.body = null; + + /** + * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse instance + */ + ExecuteOntapDeleteResponse.create = function create(properties) { + return new ExecuteOntapDeleteResponse(properties); + }; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapDeleteResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapDeleteResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapDeleteResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapDeleteResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapDeleteResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapDeleteResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + return null; + }; + + /** + * Creates an ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse + */ + ExecuteOntapDeleteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapDeleteResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapDeleteResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + return object; + }; + + /** + * Converts this ExecuteOntapDeleteResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapDeleteResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapDeleteResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapDeleteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteResponse"; + }; + + return ExecuteOntapDeleteResponse; + })(); + + v1.ExecuteOntapPatchRequest = (function() { + + /** + * Properties of an ExecuteOntapPatchRequest. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapPatchRequest + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchRequest body + * @property {string|null} [ontapPath] ExecuteOntapPatchRequest ontapPath + */ + + /** + * Constructs a new ExecuteOntapPatchRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapPatchRequest. + * @implements IExecuteOntapPatchRequest + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set + */ + function ExecuteOntapPatchRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapPatchRequest body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @instance + */ + ExecuteOntapPatchRequest.prototype.body = null; + + /** + * ExecuteOntapPatchRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @instance + */ + ExecuteOntapPatchRequest.prototype.ontapPath = ""; + + /** + * Creates a new ExecuteOntapPatchRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest instance + */ + ExecuteOntapPatchRequest.create = function create(properties) { + return new ExecuteOntapPatchRequest(properties); + }; + + /** + * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPatchRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPatchRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPatchRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ontapPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPatchRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapPatchRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapPatchRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; + return null; + }; + + /** + * Creates an ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest + */ + ExecuteOntapPatchRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchRequest.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapPatchRequest} message ExecuteOntapPatchRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapPatchRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = null; + object.ontapPath = ""; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; + return object; + }; + + /** + * Converts this ExecuteOntapPatchRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapPatchRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapPatchRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapPatchRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchRequest"; + }; + + return ExecuteOntapPatchRequest; + })(); + + v1.ExecuteOntapPatchResponse = (function() { + + /** + * Properties of an ExecuteOntapPatchResponse. + * @memberof google.cloud.netapp.v1 + * @interface IExecuteOntapPatchResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchResponse body + */ + + /** + * Constructs a new ExecuteOntapPatchResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExecuteOntapPatchResponse. + * @implements IExecuteOntapPatchResponse + * @constructor + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set + */ + function ExecuteOntapPatchResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteOntapPatchResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @instance + */ + ExecuteOntapPatchResponse.prototype.body = null; + + /** + * Creates a new ExecuteOntapPatchResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse instance + */ + ExecuteOntapPatchResponse.create = function create(properties) { + return new ExecuteOntapPatchResponse(properties); + }; + + /** + * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPatchResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteOntapPatchResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPatchResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteOntapPatchResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteOntapPatchResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteOntapPatchResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + return null; + }; + + /** + * Creates an ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse + */ + ExecuteOntapPatchResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} message ExecuteOntapPatchResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteOntapPatchResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + return object; + }; + + /** + * Converts this ExecuteOntapPatchResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteOntapPatchResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteOntapPatchResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteOntapPatchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchResponse"; + }; + + return ExecuteOntapPatchResponse; + })(); + + v1.ListQuotaRulesRequest = (function() { + + /** + * Properties of a ListQuotaRulesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListQuotaRulesRequest + * @property {string|null} [parent] ListQuotaRulesRequest parent + * @property {number|null} [pageSize] ListQuotaRulesRequest pageSize + * @property {string|null} [pageToken] ListQuotaRulesRequest pageToken + * @property {string|null} [filter] ListQuotaRulesRequest filter + * @property {string|null} [orderBy] ListQuotaRulesRequest orderBy + */ + + /** + * Constructs a new ListQuotaRulesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListQuotaRulesRequest. + * @implements IListQuotaRulesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set + */ + function ListQuotaRulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQuotaRulesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + */ + ListQuotaRulesRequest.prototype.parent = ""; + + /** + * ListQuotaRulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + */ + ListQuotaRulesRequest.prototype.pageSize = 0; + + /** + * ListQuotaRulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + */ + ListQuotaRulesRequest.prototype.pageToken = ""; + + /** + * ListQuotaRulesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + */ + ListQuotaRulesRequest.prototype.filter = ""; + + /** + * ListQuotaRulesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + */ + ListQuotaRulesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListQuotaRulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest instance + */ + ListQuotaRulesRequest.create = function create(properties) { + return new ListQuotaRulesRequest(properties); + }; + + /** + * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQuotaRulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQuotaRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQuotaRulesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQuotaRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQuotaRulesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQuotaRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + */ + ListQuotaRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.ListQuotaRulesRequest} message ListQuotaRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQuotaRulesRequest.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; + }; + + /** + * Converts this ListQuotaRulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListQuotaRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQuotaRulesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQuotaRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesRequest"; + }; + + return ListQuotaRulesRequest; + })(); + + v1.ListQuotaRulesResponse = (function() { + + /** + * Properties of a ListQuotaRulesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListQuotaRulesResponse + * @property {Array.|null} [quotaRules] ListQuotaRulesResponse quotaRules + * @property {string|null} [nextPageToken] ListQuotaRulesResponse nextPageToken + * @property {Array.|null} [unreachable] ListQuotaRulesResponse unreachable + */ + + /** + * Constructs a new ListQuotaRulesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListQuotaRulesResponse. + * @implements IListQuotaRulesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set + */ + function ListQuotaRulesResponse(properties) { + this.quotaRules = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQuotaRulesResponse quotaRules. + * @member {Array.} quotaRules + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + */ + ListQuotaRulesResponse.prototype.quotaRules = $util.emptyArray; + + /** + * ListQuotaRulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + */ + ListQuotaRulesResponse.prototype.nextPageToken = ""; + + /** + * ListQuotaRulesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + */ + ListQuotaRulesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListQuotaRulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse instance + */ + ListQuotaRulesResponse.create = function create(properties) { + return new ListQuotaRulesResponse(properties); + }; + + /** + * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQuotaRulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quotaRules != null && message.quotaRules.length) + for (var i = 0; i < message.quotaRules.length; ++i) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQuotaRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQuotaRulesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quotaRules && message.quotaRules.length)) + message.quotaRules = []; + message.quotaRules.push($root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQuotaRulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQuotaRulesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQuotaRulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quotaRules != null && message.hasOwnProperty("quotaRules")) { + if (!Array.isArray(message.quotaRules)) + return "quotaRules: array expected"; + for (var i = 0; i < message.quotaRules.length; ++i) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRules[i]); + if (error) + return "quotaRules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + */ + ListQuotaRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); + if (object.quotaRules) { + if (!Array.isArray(object.quotaRules)) + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: array expected"); + message.quotaRules = []; + for (var i = 0; i < object.quotaRules.length; ++i) { + if (typeof object.quotaRules[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: object expected"); + message.quotaRules[i] = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} message ListQuotaRulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQuotaRulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quotaRules = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.quotaRules && message.quotaRules.length) { + object.quotaRules = []; + for (var j = 0; j < message.quotaRules.length; ++j) + object.quotaRules[j] = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListQuotaRulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListQuotaRulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQuotaRulesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQuotaRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesResponse"; + }; + + return ListQuotaRulesResponse; + })(); + + v1.GetQuotaRuleRequest = (function() { + + /** + * Properties of a GetQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetQuotaRuleRequest + * @property {string|null} [name] GetQuotaRuleRequest name + */ + + /** + * Constructs a new GetQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetQuotaRuleRequest. + * @implements IGetQuotaRuleRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set + */ + function GetQuotaRuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetQuotaRuleRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @instance + */ + GetQuotaRuleRequest.prototype.name = ""; + + /** + * Creates a new GetQuotaRuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest instance + */ + GetQuotaRuleRequest.create = function create(properties) { + return new GetQuotaRuleRequest(properties); + }; + + /** + * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQuotaRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQuotaRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetQuotaRuleRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetQuotaRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + */ + GetQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetQuotaRuleRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.GetQuotaRuleRequest} message GetQuotaRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetQuotaRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetQuotaRuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetQuotaRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetQuotaRuleRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetQuotaRuleRequest"; + }; + + return GetQuotaRuleRequest; + })(); + + v1.CreateQuotaRuleRequest = (function() { + + /** + * Properties of a CreateQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateQuotaRuleRequest + * @property {string|null} [parent] CreateQuotaRuleRequest parent + * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] CreateQuotaRuleRequest quotaRule + * @property {string|null} [quotaRuleId] CreateQuotaRuleRequest quotaRuleId + */ + + /** + * Constructs a new CreateQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateQuotaRuleRequest. + * @implements ICreateQuotaRuleRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set + */ + function CreateQuotaRuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateQuotaRuleRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @instance + */ + CreateQuotaRuleRequest.prototype.parent = ""; + + /** + * CreateQuotaRuleRequest quotaRule. + * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @instance + */ + CreateQuotaRuleRequest.prototype.quotaRule = null; + + /** + * CreateQuotaRuleRequest quotaRuleId. + * @member {string} quotaRuleId + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @instance + */ + CreateQuotaRuleRequest.prototype.quotaRuleId = ""; + + /** + * Creates a new CreateQuotaRuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest instance + */ + CreateQuotaRuleRequest.create = function create(properties) { + return new CreateQuotaRuleRequest(properties); + }; + + /** + * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQuotaRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.quotaRuleId != null && Object.hasOwnProperty.call(message, "quotaRuleId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.quotaRuleId); + return writer; + }; + + /** + * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQuotaRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.quotaRuleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateQuotaRuleRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateQuotaRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); + if (error) + return "quotaRule." + error; + } + if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) + if (!$util.isString(message.quotaRuleId)) + return "quotaRuleId: string expected"; + return null; + }; + + /** + * Creates a CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + */ + CreateQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateQuotaRuleRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.quotaRule != null) { + if (typeof object.quotaRule !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateQuotaRuleRequest.quotaRule: object expected"); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); + } + if (object.quotaRuleId != null) + message.quotaRuleId = String(object.quotaRuleId); + return message; + }; + + /** + * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.CreateQuotaRuleRequest} message CreateQuotaRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateQuotaRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.quotaRule = null; + object.quotaRuleId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) + object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); + if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) + object.quotaRuleId = message.quotaRuleId; + return object; + }; + + /** + * Converts this CreateQuotaRuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateQuotaRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateQuotaRuleRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateQuotaRuleRequest"; + }; + + return CreateQuotaRuleRequest; + })(); + + v1.UpdateQuotaRuleRequest = (function() { + + /** + * Properties of an UpdateQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateQuotaRuleRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQuotaRuleRequest updateMask + * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] UpdateQuotaRuleRequest quotaRule + */ + + /** + * Constructs a new UpdateQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateQuotaRuleRequest. + * @implements IUpdateQuotaRuleRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set + */ + function UpdateQuotaRuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateQuotaRuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @instance + */ + UpdateQuotaRuleRequest.prototype.updateMask = null; + + /** + * UpdateQuotaRuleRequest quotaRule. + * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @instance + */ + UpdateQuotaRuleRequest.prototype.quotaRule = null; + + /** + * Creates a new UpdateQuotaRuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest instance + */ + UpdateQuotaRuleRequest.create = function create(properties) { + return new UpdateQuotaRuleRequest(properties); + }; + + /** + * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQuotaRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQuotaRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateQuotaRuleRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateQuotaRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); + if (error) + return "quotaRule." + error; + } + return null; + }; + + /** + * Creates an UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + */ + UpdateQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.quotaRule != null) { + if (typeof object.quotaRule !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.quotaRule: object expected"); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); + } + return message; + }; + + /** + * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.UpdateQuotaRuleRequest} message UpdateQuotaRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateQuotaRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.quotaRule = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) + object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); + return object; + }; + + /** + * Converts this UpdateQuotaRuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateQuotaRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateQuotaRuleRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateQuotaRuleRequest"; + }; + + return UpdateQuotaRuleRequest; + })(); + + v1.DeleteQuotaRuleRequest = (function() { + + /** + * Properties of a DeleteQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteQuotaRuleRequest + * @property {string|null} [name] DeleteQuotaRuleRequest name + */ + + /** + * Constructs a new DeleteQuotaRuleRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteQuotaRuleRequest. + * @implements IDeleteQuotaRuleRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set + */ + function DeleteQuotaRuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteQuotaRuleRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @instance + */ + DeleteQuotaRuleRequest.prototype.name = ""; + + /** + * Creates a new DeleteQuotaRuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest instance + */ + DeleteQuotaRuleRequest.create = function create(properties) { + return new DeleteQuotaRuleRequest(properties); + }; + + /** + * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQuotaRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQuotaRuleRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteQuotaRuleRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteQuotaRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + */ + DeleteQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {google.cloud.netapp.v1.DeleteQuotaRuleRequest} message DeleteQuotaRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteQuotaRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteQuotaRuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteQuotaRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteQuotaRuleRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteQuotaRuleRequest"; + }; + + return DeleteQuotaRuleRequest; + })(); + + v1.QuotaRule = (function() { + + /** + * Properties of a QuotaRule. + * @memberof google.cloud.netapp.v1 + * @interface IQuotaRule + * @property {string|null} [name] QuotaRule name + * @property {string|null} [target] QuotaRule target + * @property {google.cloud.netapp.v1.QuotaRule.Type|null} [type] QuotaRule type + * @property {number|null} [diskLimitMib] QuotaRule diskLimitMib + * @property {google.cloud.netapp.v1.QuotaRule.State|null} [state] QuotaRule state + * @property {string|null} [stateDetails] QuotaRule stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] QuotaRule createTime + * @property {string|null} [description] QuotaRule description + * @property {Object.|null} [labels] QuotaRule labels + */ + + /** + * Constructs a new QuotaRule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a QuotaRule. + * @implements IQuotaRule + * @constructor + * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set + */ + function QuotaRule(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuotaRule name. + * @member {string} name + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.name = ""; + + /** + * QuotaRule target. + * @member {string} target + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.target = ""; + + /** + * QuotaRule type. + * @member {google.cloud.netapp.v1.QuotaRule.Type} type + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.type = 0; + + /** + * QuotaRule diskLimitMib. + * @member {number} diskLimitMib + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.diskLimitMib = 0; + + /** + * QuotaRule state. + * @member {google.cloud.netapp.v1.QuotaRule.State} state + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.state = 0; + + /** + * QuotaRule stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.stateDetails = ""; + + /** + * QuotaRule createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.createTime = null; + + /** + * QuotaRule description. + * @member {string} description + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.description = ""; + + /** + * QuotaRule labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.labels = $util.emptyObject; + + /** + * Creates a new QuotaRule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule instance + */ + QuotaRule.create = function create(properties) { + return new QuotaRule(properties); + }; + + /** + * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.diskLimitMib != null && Object.hasOwnProperty.call(message, "diskLimitMib")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.diskLimitMib); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.QuotaRule(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.target = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + message.diskLimitMib = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.stateDetails = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.description = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaRule message. + * @function verify + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: 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.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) + if (!$util.isInteger(message.diskLimitMib)) + return "diskLimitMib: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a QuotaRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + */ + QuotaRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.QuotaRule) + return object; + var message = new $root.google.cloud.netapp.v1.QuotaRule(); + if (object.name != null) + message.name = String(object.name); + if (object.target != null) + message.target = String(object.target); + 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 "INDIVIDUAL_USER_QUOTA": + case 1: + message.type = 1; + break; + case "INDIVIDUAL_GROUP_QUOTA": + case 2: + message.type = 2; + break; + case "DEFAULT_USER_QUOTA": + case 3: + message.type = 3; + break; + case "DEFAULT_GROUP_QUOTA": + case 4: + message.type = 4; + break; + } + if (object.diskLimitMib != null) + message.diskLimitMib = object.diskLimitMib | 0; + 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 "UPDATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "READY": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.QuotaRule.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.QuotaRule.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {google.cloud.netapp.v1.QuotaRule} message QuotaRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.target = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.diskLimitMib = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] : message.type; + if (message.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) + object.diskLimitMib = message.diskLimitMib; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.QuotaRule.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this QuotaRule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + * @returns {Object.} JSON object + */ + QuotaRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaRule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.QuotaRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.QuotaRule"; + }; + + /** + * Type enum. + * @name google.cloud.netapp.v1.QuotaRule.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INDIVIDUAL_USER_QUOTA=1 INDIVIDUAL_USER_QUOTA value + * @property {number} INDIVIDUAL_GROUP_QUOTA=2 INDIVIDUAL_GROUP_QUOTA value + * @property {number} DEFAULT_USER_QUOTA=3 DEFAULT_USER_QUOTA value + * @property {number} DEFAULT_GROUP_QUOTA=4 DEFAULT_GROUP_QUOTA value + */ + QuotaRule.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INDIVIDUAL_USER_QUOTA"] = 1; + values[valuesById[2] = "INDIVIDUAL_GROUP_QUOTA"] = 2; + values[valuesById[3] = "DEFAULT_USER_QUOTA"] = 3; + values[valuesById[4] = "DEFAULT_GROUP_QUOTA"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.netapp.v1.QuotaRule.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} UPDATING=2 UPDATING value + * @property {number} DELETING=3 DELETING value + * @property {number} READY=4 READY value + * @property {number} ERROR=5 ERROR value + */ + QuotaRule.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "UPDATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "READY"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return QuotaRule; + })(); + + v1.TransferStats = (function() { + + /** + * Properties of a TransferStats. + * @memberof google.cloud.netapp.v1 + * @interface ITransferStats + * @property {number|Long|null} [transferBytes] TransferStats transferBytes + * @property {google.protobuf.IDuration|null} [totalTransferDuration] TransferStats totalTransferDuration + * @property {number|Long|null} [lastTransferBytes] TransferStats lastTransferBytes + * @property {google.protobuf.IDuration|null} [lastTransferDuration] TransferStats lastTransferDuration + * @property {google.protobuf.IDuration|null} [lagDuration] TransferStats lagDuration + * @property {google.protobuf.ITimestamp|null} [updateTime] TransferStats updateTime + * @property {google.protobuf.ITimestamp|null} [lastTransferEndTime] TransferStats lastTransferEndTime + * @property {string|null} [lastTransferError] TransferStats lastTransferError + */ + + /** + * Constructs a new TransferStats. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a TransferStats. + * @implements ITransferStats + * @constructor + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + */ + function TransferStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransferStats transferBytes. + * @member {number|Long|null|undefined} transferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.transferBytes = null; + + /** + * TransferStats totalTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} totalTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.totalTransferDuration = null; + + /** + * TransferStats lastTransferBytes. + * @member {number|Long|null|undefined} lastTransferBytes + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferBytes = null; + + /** + * TransferStats lastTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} lastTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferDuration = null; + + /** + * TransferStats lagDuration. + * @member {google.protobuf.IDuration|null|undefined} lagDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lagDuration = null; + + /** + * TransferStats updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.updateTime = null; + + /** + * TransferStats lastTransferEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastTransferEndTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferEndTime = null; + + /** + * TransferStats lastTransferError. + * @member {string|null|undefined} lastTransferError + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferError = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_transferBytes", { + get: $util.oneOfGetter($oneOfFields = ["transferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_totalTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["totalTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferBytes", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lagDuration", { + get: $util.oneOfGetter($oneOfFields = ["lagDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferEndTime", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferError", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferError"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransferStats instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats instance + */ + TransferStats.create = function create(properties) { + return new TransferStats(properties); + }; + + /** + * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transferBytes != null && Object.hasOwnProperty.call(message, "transferBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transferBytes); + if (message.totalTransferDuration != null && Object.hasOwnProperty.call(message, "totalTransferDuration")) + $root.google.protobuf.Duration.encode(message.totalTransferDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastTransferBytes != null && Object.hasOwnProperty.call(message, "lastTransferBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastTransferBytes); + if (message.lastTransferDuration != null && Object.hasOwnProperty.call(message, "lastTransferDuration")) + $root.google.protobuf.Duration.encode(message.lastTransferDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lagDuration != null && Object.hasOwnProperty.call(message, "lagDuration")) + $root.google.protobuf.Duration.encode(message.lagDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastTransferEndTime != null && Object.hasOwnProperty.call(message, "lastTransferEndTime")) + $root.google.protobuf.Timestamp.encode(message.lastTransferEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastTransferError != null && Object.hasOwnProperty.call(message, "lastTransferError")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastTransferError); + return writer; + }; + + /** + * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferStats.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TransferStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.transferBytes = reader.int64(); + break; + } + case 2: { + message.totalTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastTransferBytes = reader.int64(); + break; + } + case 4: { + message.lastTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lagDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastTransferEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastTransferError = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferStats message. + * @function verify + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + properties._transferBytes = 1; + if (!$util.isInteger(message.transferBytes) && !(message.transferBytes && $util.isInteger(message.transferBytes.low) && $util.isInteger(message.transferBytes.high))) + return "transferBytes: integer|Long expected"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + properties._totalTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.totalTransferDuration); + if (error) + return "totalTransferDuration." + error; + } + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + properties._lastTransferBytes = 1; + if (!$util.isInteger(message.lastTransferBytes) && !(message.lastTransferBytes && $util.isInteger(message.lastTransferBytes.low) && $util.isInteger(message.lastTransferBytes.high))) + return "lastTransferBytes: integer|Long expected"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + properties._lastTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lastTransferDuration); + if (error) + return "lastTransferDuration." + error; + } + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + properties._lagDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lagDuration); + if (error) + return "lagDuration." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + properties._lastTransferEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastTransferEndTime); + if (error) + return "lastTransferEndTime." + error; + } + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + properties._lastTransferError = 1; + if (!$util.isString(message.lastTransferError)) + return "lastTransferError: string expected"; + } + return null; + }; + + /** + * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + */ + TransferStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.TransferStats) + return object; + var message = new $root.google.cloud.netapp.v1.TransferStats(); + if (object.transferBytes != null) + if ($util.Long) + (message.transferBytes = $util.Long.fromValue(object.transferBytes)).unsigned = false; + else if (typeof object.transferBytes === "string") + message.transferBytes = parseInt(object.transferBytes, 10); + else if (typeof object.transferBytes === "number") + message.transferBytes = object.transferBytes; + else if (typeof object.transferBytes === "object") + message.transferBytes = new $util.LongBits(object.transferBytes.low >>> 0, object.transferBytes.high >>> 0).toNumber(); + if (object.totalTransferDuration != null) { + if (typeof object.totalTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.totalTransferDuration: object expected"); + message.totalTransferDuration = $root.google.protobuf.Duration.fromObject(object.totalTransferDuration); + } + if (object.lastTransferBytes != null) + if ($util.Long) + (message.lastTransferBytes = $util.Long.fromValue(object.lastTransferBytes)).unsigned = false; + else if (typeof object.lastTransferBytes === "string") + message.lastTransferBytes = parseInt(object.lastTransferBytes, 10); + else if (typeof object.lastTransferBytes === "number") + message.lastTransferBytes = object.lastTransferBytes; + else if (typeof object.lastTransferBytes === "object") + message.lastTransferBytes = new $util.LongBits(object.lastTransferBytes.low >>> 0, object.lastTransferBytes.high >>> 0).toNumber(); + if (object.lastTransferDuration != null) { + if (typeof object.lastTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferDuration: object expected"); + message.lastTransferDuration = $root.google.protobuf.Duration.fromObject(object.lastTransferDuration); + } + if (object.lagDuration != null) { + if (typeof object.lagDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lagDuration: object expected"); + message.lagDuration = $root.google.protobuf.Duration.fromObject(object.lagDuration); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastTransferEndTime != null) { + if (typeof object.lastTransferEndTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferEndTime: object expected"); + message.lastTransferEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastTransferEndTime); + } + if (object.lastTransferError != null) + message.lastTransferError = String(object.lastTransferError); + return message; + }; + + /** + * Creates a plain object from a TransferStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {google.cloud.netapp.v1.TransferStats} message TransferStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + if (typeof message.transferBytes === "number") + object.transferBytes = options.longs === String ? String(message.transferBytes) : message.transferBytes; + else + object.transferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transferBytes) : options.longs === Number ? new $util.LongBits(message.transferBytes.low >>> 0, message.transferBytes.high >>> 0).toNumber() : message.transferBytes; + if (options.oneofs) + object._transferBytes = "transferBytes"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + object.totalTransferDuration = $root.google.protobuf.Duration.toObject(message.totalTransferDuration, options); + if (options.oneofs) + object._totalTransferDuration = "totalTransferDuration"; + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + if (typeof message.lastTransferBytes === "number") + object.lastTransferBytes = options.longs === String ? String(message.lastTransferBytes) : message.lastTransferBytes; + else + object.lastTransferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.lastTransferBytes) : options.longs === Number ? new $util.LongBits(message.lastTransferBytes.low >>> 0, message.lastTransferBytes.high >>> 0).toNumber() : message.lastTransferBytes; + if (options.oneofs) + object._lastTransferBytes = "lastTransferBytes"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + object.lastTransferDuration = $root.google.protobuf.Duration.toObject(message.lastTransferDuration, options); + if (options.oneofs) + object._lastTransferDuration = "lastTransferDuration"; + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + object.lagDuration = $root.google.protobuf.Duration.toObject(message.lagDuration, options); + if (options.oneofs) + object._lagDuration = "lagDuration"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + object.lastTransferEndTime = $root.google.protobuf.Timestamp.toObject(message.lastTransferEndTime, options); + if (options.oneofs) + object._lastTransferEndTime = "lastTransferEndTime"; + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + object.lastTransferError = message.lastTransferError; + if (options.oneofs) + object._lastTransferError = "lastTransferError"; + } + return object; + }; + + /** + * Converts this TransferStats to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + * @returns {Object.} JSON object + */ + TransferStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransferStats + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.TransferStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransferStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.TransferStats"; + }; + + return TransferStats; + })(); + + v1.Replication = (function() { + + /** + * Properties of a Replication. + * @memberof google.cloud.netapp.v1 + * @interface IReplication + * @property {string|null} [name] Replication name + * @property {google.cloud.netapp.v1.Replication.State|null} [state] Replication state + * @property {string|null} [stateDetails] Replication stateDetails + * @property {google.cloud.netapp.v1.Replication.ReplicationRole|null} [role] Replication role + * @property {google.cloud.netapp.v1.Replication.ReplicationSchedule|null} [replicationSchedule] Replication replicationSchedule + * @property {google.cloud.netapp.v1.Replication.MirrorState|null} [mirrorState] Replication mirrorState + * @property {boolean|null} [healthy] Replication healthy + * @property {google.protobuf.ITimestamp|null} [createTime] Replication createTime + * @property {string|null} [destinationVolume] Replication destinationVolume + * @property {google.cloud.netapp.v1.ITransferStats|null} [transferStats] Replication transferStats + * @property {Object.|null} [labels] Replication labels + * @property {string|null} [description] Replication description + * @property {google.cloud.netapp.v1.IDestinationVolumeParameters|null} [destinationVolumeParameters] Replication destinationVolumeParameters + * @property {string|null} [sourceVolume] Replication sourceVolume + * @property {google.cloud.netapp.v1.IHybridPeeringDetails|null} [hybridPeeringDetails] Replication hybridPeeringDetails + * @property {string|null} [clusterLocation] Replication clusterLocation + * @property {google.cloud.netapp.v1.Replication.HybridReplicationType|null} [hybridReplicationType] Replication hybridReplicationType + * @property {google.cloud.netapp.v1.IUserCommands|null} [hybridReplicationUserCommands] Replication hybridReplicationUserCommands + */ + + /** + * Constructs a new Replication. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Replication. + * @implements IReplication + * @constructor + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + */ + function Replication(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Replication name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.name = ""; + + /** + * Replication state. + * @member {google.cloud.netapp.v1.Replication.State} state + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.state = 0; + + /** + * Replication stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.stateDetails = ""; + + /** + * Replication role. + * @member {google.cloud.netapp.v1.Replication.ReplicationRole} role + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.role = 0; + + /** + * Replication replicationSchedule. + * @member {google.cloud.netapp.v1.Replication.ReplicationSchedule} replicationSchedule + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.replicationSchedule = 0; + + /** + * Replication mirrorState. + * @member {google.cloud.netapp.v1.Replication.MirrorState} mirrorState + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.mirrorState = 0; + + /** + * Replication healthy. + * @member {boolean|null|undefined} healthy + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.healthy = null; + + /** + * Replication createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.createTime = null; + + /** + * Replication destinationVolume. + * @member {string} destinationVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.destinationVolume = ""; + + /** + * Replication transferStats. + * @member {google.cloud.netapp.v1.ITransferStats|null|undefined} transferStats + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.transferStats = null; + + /** + * Replication labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.labels = $util.emptyObject; + + /** + * Replication description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.description = null; + + /** + * Replication destinationVolumeParameters. + * @member {google.cloud.netapp.v1.IDestinationVolumeParameters|null|undefined} destinationVolumeParameters + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.destinationVolumeParameters = null; + + /** + * Replication sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.sourceVolume = ""; + + /** + * Replication hybridPeeringDetails. + * @member {google.cloud.netapp.v1.IHybridPeeringDetails|null|undefined} hybridPeeringDetails + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.hybridPeeringDetails = null; + + /** + * Replication clusterLocation. + * @member {string} clusterLocation + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.clusterLocation = ""; + + /** + * Replication hybridReplicationType. + * @member {google.cloud.netapp.v1.Replication.HybridReplicationType} hybridReplicationType + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.hybridReplicationType = 0; + + /** + * Replication hybridReplicationUserCommands. + * @member {google.cloud.netapp.v1.IUserCommands|null|undefined} hybridReplicationUserCommands + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.hybridReplicationUserCommands = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Replication.prototype, "_healthy", { + get: $util.oneOfGetter($oneOfFields = ["healthy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Replication.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Replication instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Replication} Replication instance + */ + Replication.create = function create(properties) { + return new Replication(properties); + }; + + /** + * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Replication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.role); + if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.replicationSchedule); + if (message.mirrorState != null && Object.hasOwnProperty.call(message, "mirrorState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mirrorState); + if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.healthy); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.destinationVolume != null && Object.hasOwnProperty.call(message, "destinationVolume")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationVolume); + if (message.transferStats != null && Object.hasOwnProperty.call(message, "transferStats")) + $root.google.cloud.netapp.v1.TransferStats.encode(message.transferStats, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); + if (message.destinationVolumeParameters != null && Object.hasOwnProperty.call(message, "destinationVolumeParameters")) + $root.google.cloud.netapp.v1.DestinationVolumeParameters.encode(message.destinationVolumeParameters, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.sourceVolume); + if (message.hybridPeeringDetails != null && Object.hasOwnProperty.call(message, "hybridPeeringDetails")) + $root.google.cloud.netapp.v1.HybridPeeringDetails.encode(message.hybridPeeringDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.clusterLocation); + if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.hybridReplicationType); + if (message.hybridReplicationUserCommands != null && Object.hasOwnProperty.call(message, "hybridReplicationUserCommands")) + $root.google.cloud.netapp.v1.UserCommands.encode(message.hybridReplicationUserCommands, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Replication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Replication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Replication} Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Replication.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Replication(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.role = reader.int32(); + break; + } + case 5: { + message.replicationSchedule = reader.int32(); + break; + } + case 6: { + message.mirrorState = reader.int32(); + break; + } + case 8: { + message.healthy = reader.bool(); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.destinationVolume = reader.string(); + break; + } + case 11: { + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.decode(reader, reader.uint32()); + break; + } + case 12: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.description = reader.string(); + break; + } + case 14: { + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.decode(reader, reader.uint32()); + break; + } + case 15: { + message.sourceVolume = reader.string(); + break; + } + case 16: { + message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clusterLocation = reader.string(); + break; + } + case 19: { + message.hybridReplicationType = reader.int32(); + break; + } + case 20: { + message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Replication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Replication} Replication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Replication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Replication message. + * @function verify + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Replication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { + default: + return "role: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + switch (message.replicationSchedule) { + default: + return "replicationSchedule: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + switch (message.mirrorState) { + default: + return "mirrorState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.healthy != null && message.hasOwnProperty("healthy")) { + properties._healthy = 1; + if (typeof message.healthy !== "boolean") + return "healthy: boolean expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + if (!$util.isString(message.destinationVolume)) + return "destinationVolume: string expected"; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) { + var error = $root.google.cloud.netapp.v1.TransferStats.verify(message.transferStats); + if (error) + return "transferStats." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) { + var error = $root.google.cloud.netapp.v1.DestinationVolumeParameters.verify(message.destinationVolumeParameters); + if (error) + return "destinationVolumeParameters." + error; + } + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) { + var error = $root.google.cloud.netapp.v1.HybridPeeringDetails.verify(message.hybridPeeringDetails); + if (error) + return "hybridPeeringDetails." + error; + } + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + if (!$util.isString(message.clusterLocation)) + return "clusterLocation: string expected"; + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + switch (message.hybridReplicationType) { + default: + return "hybridReplicationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) { + var error = $root.google.cloud.netapp.v1.UserCommands.verify(message.hybridReplicationUserCommands); + if (error) + return "hybridReplicationUserCommands." + error; + } + return null; + }; + + /** + * Creates a Replication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Replication} Replication + */ + Replication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Replication) + return object; + var message = new $root.google.cloud.netapp.v1.Replication(); + 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 "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + case "PENDING_CLUSTER_PEERING": + case 8: + message.state = 8; + break; + case "PENDING_SVM_PEERING": + case 9: + message.state = 9; + break; + case "PENDING_REMOTE_RESYNC": + case 10: + message.state = 10; + break; + case "EXTERNALLY_MANAGED_REPLICATION": + case 11: + message.state = 11; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; + case "REPLICATION_ROLE_UNSPECIFIED": + case 0: + message.role = 0; + break; + case "SOURCE": + case 1: + message.role = 1; + break; + case "DESTINATION": + case 2: + message.role = 2; + break; + } + switch (object.replicationSchedule) { + default: + if (typeof object.replicationSchedule === "number") { + message.replicationSchedule = object.replicationSchedule; + break; + } + break; + case "REPLICATION_SCHEDULE_UNSPECIFIED": + case 0: + message.replicationSchedule = 0; + break; + case "EVERY_10_MINUTES": + case 1: + message.replicationSchedule = 1; + break; + case "HOURLY": + case 2: + message.replicationSchedule = 2; + break; + case "DAILY": + case 3: + message.replicationSchedule = 3; + break; + } + switch (object.mirrorState) { + default: + if (typeof object.mirrorState === "number") { + message.mirrorState = object.mirrorState; + break; + } + break; + case "MIRROR_STATE_UNSPECIFIED": + case 0: + message.mirrorState = 0; + break; + case "PREPARING": + case 1: + message.mirrorState = 1; + break; + case "MIRRORED": + case 2: + message.mirrorState = 2; + break; + case "STOPPED": + case 3: + message.mirrorState = 3; + break; + case "TRANSFERRING": + case 4: + message.mirrorState = 4; + break; + case "BASELINE_TRANSFERRING": + case 5: + message.mirrorState = 5; + break; + case "ABORTED": + case 6: + message.mirrorState = 6; + break; + case "EXTERNALLY_MANAGED": + case 7: + message.mirrorState = 7; + break; + case "PENDING_PEERING": + case 8: + message.mirrorState = 8; + break; + } + if (object.healthy != null) + message.healthy = Boolean(object.healthy); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.destinationVolume != null) + message.destinationVolume = String(object.destinationVolume); + if (object.transferStats != null) { + if (typeof object.transferStats !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.transferStats: object expected"); + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.fromObject(object.transferStats); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.destinationVolumeParameters != null) { + if (typeof object.destinationVolumeParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.destinationVolumeParameters: object expected"); + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.fromObject(object.destinationVolumeParameters); + } + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + if (object.hybridPeeringDetails != null) { + if (typeof object.hybridPeeringDetails !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.hybridPeeringDetails: object expected"); + message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.fromObject(object.hybridPeeringDetails); + } + if (object.clusterLocation != null) + message.clusterLocation = String(object.clusterLocation); + switch (object.hybridReplicationType) { + default: + if (typeof object.hybridReplicationType === "number") { + message.hybridReplicationType = object.hybridReplicationType; + break; + } + break; + case "HYBRID_REPLICATION_TYPE_UNSPECIFIED": + case 0: + message.hybridReplicationType = 0; + break; + case "MIGRATION": + case 1: + message.hybridReplicationType = 1; + break; + case "CONTINUOUS_REPLICATION": + case 2: + message.hybridReplicationType = 2; + break; + case "ONPREM_REPLICATION": + case 3: + message.hybridReplicationType = 3; + break; + case "REVERSE_ONPREM_REPLICATION": + case 4: + message.hybridReplicationType = 4; + break; + } + if (object.hybridReplicationUserCommands != null) { + if (typeof object.hybridReplicationUserCommands !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.hybridReplicationUserCommands: object expected"); + message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.fromObject(object.hybridReplicationUserCommands); + } + return message; + }; + + /** + * Creates a plain object from a Replication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {google.cloud.netapp.v1.Replication} message Replication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Replication.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.stateDetails = ""; + object.role = options.enums === String ? "REPLICATION_ROLE_UNSPECIFIED" : 0; + object.replicationSchedule = options.enums === String ? "REPLICATION_SCHEDULE_UNSPECIFIED" : 0; + object.mirrorState = options.enums === String ? "MIRROR_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.destinationVolume = ""; + object.transferStats = null; + object.destinationVolumeParameters = null; + object.sourceVolume = ""; + object.hybridPeeringDetails = null; + object.clusterLocation = ""; + object.hybridReplicationType = options.enums === String ? "HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; + object.hybridReplicationUserCommands = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Replication.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Replication.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] === undefined ? message.role : $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] : message.role; + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + object.mirrorState = options.enums === String ? $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] === undefined ? message.mirrorState : $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] : message.mirrorState; + if (message.healthy != null && message.hasOwnProperty("healthy")) { + object.healthy = message.healthy; + if (options.oneofs) + object._healthy = "healthy"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + object.destinationVolume = message.destinationVolume; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) + object.transferStats = $root.google.cloud.netapp.v1.TransferStats.toObject(message.transferStats, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) + object.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.toObject(message.destinationVolumeParameters, options); + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) + object.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.toObject(message.hybridPeeringDetails, options); + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + object.clusterLocation = message.clusterLocation; + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; + if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) + object.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.toObject(message.hybridReplicationUserCommands, options); + return object; + }; + + /** + * Converts this Replication to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Replication + * @instance + * @returns {Object.} JSON object + */ + Replication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Replication + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Replication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Replication"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Replication.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=5 DELETING value + * @property {number} ERROR=6 ERROR value + * @property {number} PENDING_CLUSTER_PEERING=8 PENDING_CLUSTER_PEERING value + * @property {number} PENDING_SVM_PEERING=9 PENDING_SVM_PEERING value + * @property {number} PENDING_REMOTE_RESYNC=10 PENDING_REMOTE_RESYNC value + * @property {number} EXTERNALLY_MANAGED_REPLICATION=11 EXTERNALLY_MANAGED_REPLICATION value + */ + Replication.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[8] = "PENDING_CLUSTER_PEERING"] = 8; + values[valuesById[9] = "PENDING_SVM_PEERING"] = 9; + values[valuesById[10] = "PENDING_REMOTE_RESYNC"] = 10; + values[valuesById[11] = "EXTERNALLY_MANAGED_REPLICATION"] = 11; + return values; + })(); + + /** + * ReplicationRole enum. + * @name google.cloud.netapp.v1.Replication.ReplicationRole + * @enum {number} + * @property {number} REPLICATION_ROLE_UNSPECIFIED=0 REPLICATION_ROLE_UNSPECIFIED value + * @property {number} SOURCE=1 SOURCE value + * @property {number} DESTINATION=2 DESTINATION value + */ + Replication.ReplicationRole = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE"] = 1; + values[valuesById[2] = "DESTINATION"] = 2; + return values; + })(); + + /** + * ReplicationSchedule enum. + * @name google.cloud.netapp.v1.Replication.ReplicationSchedule + * @enum {number} + * @property {number} REPLICATION_SCHEDULE_UNSPECIFIED=0 REPLICATION_SCHEDULE_UNSPECIFIED value + * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value + * @property {number} HOURLY=2 HOURLY value + * @property {number} DAILY=3 DAILY value + */ + Replication.ReplicationSchedule = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVERY_10_MINUTES"] = 1; + values[valuesById[2] = "HOURLY"] = 2; + values[valuesById[3] = "DAILY"] = 3; + return values; + })(); + + /** + * MirrorState enum. + * @name google.cloud.netapp.v1.Replication.MirrorState + * @enum {number} + * @property {number} MIRROR_STATE_UNSPECIFIED=0 MIRROR_STATE_UNSPECIFIED value + * @property {number} PREPARING=1 PREPARING value + * @property {number} MIRRORED=2 MIRRORED value + * @property {number} STOPPED=3 STOPPED value + * @property {number} TRANSFERRING=4 TRANSFERRING value + * @property {number} BASELINE_TRANSFERRING=5 BASELINE_TRANSFERRING value + * @property {number} ABORTED=6 ABORTED value + * @property {number} EXTERNALLY_MANAGED=7 EXTERNALLY_MANAGED value + * @property {number} PENDING_PEERING=8 PENDING_PEERING value + */ + Replication.MirrorState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIRROR_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREPARING"] = 1; + values[valuesById[2] = "MIRRORED"] = 2; + values[valuesById[3] = "STOPPED"] = 3; + values[valuesById[4] = "TRANSFERRING"] = 4; + values[valuesById[5] = "BASELINE_TRANSFERRING"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + values[valuesById[7] = "EXTERNALLY_MANAGED"] = 7; + values[valuesById[8] = "PENDING_PEERING"] = 8; + return values; + })(); + + /** + * HybridReplicationType enum. + * @name google.cloud.netapp.v1.Replication.HybridReplicationType + * @enum {number} + * @property {number} HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 HYBRID_REPLICATION_TYPE_UNSPECIFIED value + * @property {number} MIGRATION=1 MIGRATION value + * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value + * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value + * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value + */ + Replication.HybridReplicationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MIGRATION"] = 1; + values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; + values[valuesById[3] = "ONPREM_REPLICATION"] = 3; + values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; + return values; + })(); + + return Replication; + })(); + + v1.HybridPeeringDetails = (function() { + + /** + * Properties of a HybridPeeringDetails. + * @memberof google.cloud.netapp.v1 + * @interface IHybridPeeringDetails + * @property {string|null} [subnetIp] HybridPeeringDetails subnetIp + * @property {string|null} [command] HybridPeeringDetails command + * @property {google.protobuf.ITimestamp|null} [commandExpiryTime] HybridPeeringDetails commandExpiryTime + * @property {string|null} [passphrase] HybridPeeringDetails passphrase + * @property {string|null} [peerVolumeName] HybridPeeringDetails peerVolumeName + * @property {string|null} [peerClusterName] HybridPeeringDetails peerClusterName + * @property {string|null} [peerSvmName] HybridPeeringDetails peerSvmName + */ + + /** + * Constructs a new HybridPeeringDetails. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a HybridPeeringDetails. + * @implements IHybridPeeringDetails + * @constructor + * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set + */ + function HybridPeeringDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridPeeringDetails subnetIp. + * @member {string} subnetIp + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.subnetIp = ""; + + /** + * HybridPeeringDetails command. + * @member {string} command + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.command = ""; + + /** + * HybridPeeringDetails commandExpiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} commandExpiryTime + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.commandExpiryTime = null; + + /** + * HybridPeeringDetails passphrase. + * @member {string} passphrase + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.passphrase = ""; + + /** + * HybridPeeringDetails peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerVolumeName = ""; + + /** + * HybridPeeringDetails peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerClusterName = ""; + + /** + * HybridPeeringDetails peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerSvmName = ""; + + /** + * Creates a new HybridPeeringDetails instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails instance + */ + HybridPeeringDetails.create = function create(properties) { + return new HybridPeeringDetails(properties); + }; + + /** + * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridPeeringDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetIp != null && Object.hasOwnProperty.call(message, "subnetIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetIp); + if (message.command != null && Object.hasOwnProperty.call(message, "command")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); + if (message.commandExpiryTime != null && Object.hasOwnProperty.call(message, "commandExpiryTime")) + $root.google.protobuf.Timestamp.encode(message.commandExpiryTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.passphrase); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.peerSvmName); + return writer; + }; + + /** + * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridPeeringDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridPeeringDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridPeeringDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.subnetIp = reader.string(); + break; + } + case 2: { + message.command = reader.string(); + break; + } + case 3: { + message.commandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.passphrase = reader.string(); + break; + } + case 5: { + message.peerVolumeName = reader.string(); + break; + } + case 6: { + message.peerClusterName = reader.string(); + break; + } + case 7: { + message.peerSvmName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridPeeringDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridPeeringDetails message. + * @function verify + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridPeeringDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) + if (!$util.isString(message.subnetIp)) + return "subnetIp: string expected"; + if (message.command != null && message.hasOwnProperty("command")) + if (!$util.isString(message.command)) + return "command: string expected"; + if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.commandExpiryTime); + if (error) + return "commandExpiryTime." + error; + } + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + if (!$util.isString(message.passphrase)) + return "passphrase: string expected"; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + return null; + }; + + /** + * Creates a HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + */ + HybridPeeringDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HybridPeeringDetails) + return object; + var message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); + if (object.subnetIp != null) + message.subnetIp = String(object.subnetIp); + if (object.command != null) + message.command = String(object.command); + if (object.commandExpiryTime != null) { + if (typeof object.commandExpiryTime !== "object") + throw TypeError(".google.cloud.netapp.v1.HybridPeeringDetails.commandExpiryTime: object expected"); + message.commandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.commandExpiryTime); + } + if (object.passphrase != null) + message.passphrase = String(object.passphrase); + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + return message; + }; + + /** + * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {google.cloud.netapp.v1.HybridPeeringDetails} message HybridPeeringDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridPeeringDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subnetIp = ""; + object.command = ""; + object.commandExpiryTime = null; + object.passphrase = ""; + object.peerVolumeName = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + } + if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) + object.subnetIp = message.subnetIp; + if (message.command != null && message.hasOwnProperty("command")) + object.command = message.command; + if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) + object.commandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.commandExpiryTime, options); + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + object.passphrase = message.passphrase; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + return object; + }; + + /** + * Converts this HybridPeeringDetails to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + * @returns {Object.} JSON object + */ + HybridPeeringDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridPeeringDetails + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridPeeringDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.HybridPeeringDetails"; + }; + + return HybridPeeringDetails; + })(); + + v1.ListReplicationsRequest = (function() { + + /** + * Properties of a ListReplicationsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListReplicationsRequest + * @property {string|null} [parent] ListReplicationsRequest parent + * @property {number|null} [pageSize] ListReplicationsRequest pageSize + * @property {string|null} [pageToken] ListReplicationsRequest pageToken + * @property {string|null} [orderBy] ListReplicationsRequest orderBy + * @property {string|null} [filter] ListReplicationsRequest filter + */ + + /** + * Constructs a new ListReplicationsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListReplicationsRequest. + * @implements IListReplicationsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + */ + function ListReplicationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReplicationsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.parent = ""; + + /** + * ListReplicationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageSize = 0; + + /** + * ListReplicationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageToken = ""; + + /** + * ListReplicationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.orderBy = ""; + + /** + * ListReplicationsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.filter = ""; + + /** + * Creates a new ListReplicationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest instance + */ + ListReplicationsRequest.create = function create(properties) { + return new ListReplicationsRequest(properties); + }; + + /** + * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReplicationsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReplicationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + */ + ListReplicationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {google.cloud.netapp.v1.ListReplicationsRequest} message ListReplicationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReplicationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListReplicationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReplicationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReplicationsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsRequest"; + }; + + return ListReplicationsRequest; + })(); + + v1.ListReplicationsResponse = (function() { + + /** + * Properties of a ListReplicationsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListReplicationsResponse + * @property {Array.|null} [replications] ListReplicationsResponse replications + * @property {string|null} [nextPageToken] ListReplicationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReplicationsResponse unreachable + */ + + /** + * Constructs a new ListReplicationsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListReplicationsResponse. + * @implements IListReplicationsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + */ + function ListReplicationsResponse(properties) { + this.replications = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReplicationsResponse replications. + * @member {Array.} replications + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.replications = $util.emptyArray; + + /** + * ListReplicationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.nextPageToken = ""; + + /** + * ListReplicationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReplicationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse instance + */ + ListReplicationsResponse.create = function create(properties) { + return new ListReplicationsResponse(properties); + }; + + /** + * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replications != null && message.replications.length) + for (var i = 0; i < message.replications.length; ++i) + $root.google.cloud.netapp.v1.Replication.encode(message.replications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.replications && message.replications.length)) + message.replications = []; + message.replications.push($root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReplicationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReplicationsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReplicationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replications != null && message.hasOwnProperty("replications")) { + if (!Array.isArray(message.replications)) + return "replications: array expected"; + for (var i = 0; i < message.replications.length; ++i) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replications[i]); + if (error) + return "replications." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + */ + ListReplicationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + if (object.replications) { + if (!Array.isArray(object.replications)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: array expected"); + message.replications = []; + for (var i = 0; i < object.replications.length; ++i) { + if (typeof object.replications[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: object expected"); + message.replications[i] = $root.google.cloud.netapp.v1.Replication.fromObject(object.replications[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.ListReplicationsResponse} message ListReplicationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReplicationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.replications = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.replications && message.replications.length) { + object.replications = []; + for (var j = 0; j < message.replications.length; ++j) + object.replications[j] = $root.google.cloud.netapp.v1.Replication.toObject(message.replications[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReplicationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReplicationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReplicationsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsResponse"; + }; + + return ListReplicationsResponse; + })(); + + v1.GetReplicationRequest = (function() { + + /** + * Properties of a GetReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetReplicationRequest + * @property {string|null} [name] GetReplicationRequest name + */ + + /** + * Constructs a new GetReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetReplicationRequest. + * @implements IGetReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + */ + function GetReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @instance + */ + GetReplicationRequest.prototype.name = ""; + + /** + * Creates a new GetReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest instance + */ + GetReplicationRequest.create = function create(properties) { + return new GetReplicationRequest(properties); + }; + + /** + * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + */ + GetReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {google.cloud.netapp.v1.GetReplicationRequest} message GetReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + GetReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetReplicationRequest"; + }; + + return GetReplicationRequest; + })(); + + v1.DestinationVolumeParameters = (function() { + + /** + * Properties of a DestinationVolumeParameters. + * @memberof google.cloud.netapp.v1 + * @interface IDestinationVolumeParameters + * @property {string|null} [storagePool] DestinationVolumeParameters storagePool + * @property {string|null} [volumeId] DestinationVolumeParameters volumeId + * @property {string|null} [shareName] DestinationVolumeParameters shareName + * @property {string|null} [description] DestinationVolumeParameters description + * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] DestinationVolumeParameters tieringPolicy + */ + + /** + * Constructs a new DestinationVolumeParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DestinationVolumeParameters. + * @implements IDestinationVolumeParameters + * @constructor + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + */ + function DestinationVolumeParameters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DestinationVolumeParameters storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.storagePool = ""; + + /** + * DestinationVolumeParameters volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.volumeId = ""; + + /** + * DestinationVolumeParameters shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.shareName = ""; + + /** + * DestinationVolumeParameters description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.description = null; + + /** + * DestinationVolumeParameters tieringPolicy. + * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.tieringPolicy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DestinationVolumeParameters.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DestinationVolumeParameters.prototype, "_tieringPolicy", { + get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DestinationVolumeParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters instance + */ + DestinationVolumeParameters.create = function create(properties) { + return new DestinationVolumeParameters(properties); + }; + + /** + * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationVolumeParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.storagePool); + if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shareName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) + $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationVolumeParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationVolumeParameters.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.storagePool = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.shareName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationVolumeParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DestinationVolumeParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DestinationVolumeParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) + return "shareName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + properties._tieringPolicy = 1; + { + var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); + if (error) + return "tieringPolicy." + error; + } + } + return null; + }; + + /** + * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + */ + DestinationVolumeParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DestinationVolumeParameters) + return object; + var message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.shareName != null) + message.shareName = String(object.shareName); + if (object.description != null) + message.description = String(object.description); + if (object.tieringPolicy != null) { + if (typeof object.tieringPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.DestinationVolumeParameters.tieringPolicy: object expected"); + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); + } + return message; + }; + + /** + * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {google.cloud.netapp.v1.DestinationVolumeParameters} message DestinationVolumeParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DestinationVolumeParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.storagePool = ""; + object.volumeId = ""; + object.shareName = ""; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.shareName != null && message.hasOwnProperty("shareName")) + object.shareName = message.shareName; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); + if (options.oneofs) + object._tieringPolicy = "tieringPolicy"; + } + return object; + }; + + /** + * Converts this DestinationVolumeParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + * @returns {Object.} JSON object + */ + DestinationVolumeParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DestinationVolumeParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DestinationVolumeParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DestinationVolumeParameters"; + }; + + return DestinationVolumeParameters; + })(); + + v1.CreateReplicationRequest = (function() { + + /** + * Properties of a CreateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateReplicationRequest + * @property {string|null} [parent] CreateReplicationRequest parent + * @property {google.cloud.netapp.v1.IReplication|null} [replication] CreateReplicationRequest replication + * @property {string|null} [replicationId] CreateReplicationRequest replicationId + */ + + /** + * Constructs a new CreateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateReplicationRequest. + * @implements ICreateReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + */ + function CreateReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReplicationRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.parent = ""; + + /** + * CreateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.replication = null; + + /** + * CreateReplicationRequest replicationId. + * @member {string} replicationId + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + */ + CreateReplicationRequest.prototype.replicationId = ""; + + /** + * Creates a new CreateReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest instance + */ + CreateReplicationRequest.create = function create(properties) { + return new CreateReplicationRequest(properties); + }; + + /** + * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replicationId != null && Object.hasOwnProperty.call(message, "replicationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationId); + return writer; + }; + + /** + * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + break; + } + case 3: { + message.replicationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + if (!$util.isString(message.replicationId)) + return "replicationId: string expected"; + return null; + }; + + /** + * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + */ + CreateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } + if (object.replicationId != null) + message.replicationId = String(object.replicationId); + return message; + }; + + /** + * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.CreateReplicationRequest} message CreateReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.replication = null; + object.replicationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + object.replicationId = message.replicationId; + return object; + }; + + /** + * Converts this CreateReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateReplicationRequest"; + }; + + return CreateReplicationRequest; + })(); + + v1.DeleteReplicationRequest = (function() { + + /** + * Properties of a DeleteReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteReplicationRequest + * @property {string|null} [name] DeleteReplicationRequest name + */ + + /** + * Constructs a new DeleteReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteReplicationRequest. + * @implements IDeleteReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + */ + function DeleteReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @instance + */ + DeleteReplicationRequest.prototype.name = ""; + + /** + * Creates a new DeleteReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest instance + */ + DeleteReplicationRequest.create = function create(properties) { + return new DeleteReplicationRequest(properties); + }; + + /** + * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + */ + DeleteReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {google.cloud.netapp.v1.DeleteReplicationRequest} message DeleteReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteReplicationRequest"; + }; + + return DeleteReplicationRequest; + })(); + + v1.UpdateReplicationRequest = (function() { + + /** + * Properties of an UpdateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateReplicationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReplicationRequest updateMask + * @property {google.cloud.netapp.v1.IReplication|null} [replication] UpdateReplicationRequest replication + */ + + /** + * Constructs a new UpdateReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateReplicationRequest. + * @implements IUpdateReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + */ + function UpdateReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateReplicationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + */ + UpdateReplicationRequest.prototype.updateMask = null; + + /** + * UpdateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + */ + UpdateReplicationRequest.prototype.replication = null; + + /** + * Creates a new UpdateReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest instance + */ + UpdateReplicationRequest.create = function create(properties) { + return new UpdateReplicationRequest(properties); + }; + + /** + * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } + return null; + }; + + /** + * Creates an UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + */ + UpdateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } + return message; + }; + + /** + * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {google.cloud.netapp.v1.UpdateReplicationRequest} message UpdateReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.replication = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + return object; + }; + + /** + * Converts this UpdateReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateReplicationRequest"; + }; + + return UpdateReplicationRequest; + })(); + + v1.StopReplicationRequest = (function() { + + /** + * Properties of a StopReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IStopReplicationRequest + * @property {string|null} [name] StopReplicationRequest name + * @property {boolean|null} [force] StopReplicationRequest force + */ + + /** + * Constructs a new StopReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a StopReplicationRequest. + * @implements IStopReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + */ + function StopReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + */ + StopReplicationRequest.prototype.name = ""; + + /** + * StopReplicationRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + */ + StopReplicationRequest.prototype.force = false; + + /** + * Creates a new StopReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest instance + */ + StopReplicationRequest.create = function create(properties) { + return new StopReplicationRequest(properties); + }; + + /** + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + */ + StopReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.StopReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {google.cloud.netapp.v1.StopReplicationRequest} message StopReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this StopReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + StopReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.StopReplicationRequest"; + }; + + return StopReplicationRequest; + })(); + + v1.ResumeReplicationRequest = (function() { + + /** + * Properties of a ResumeReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface IResumeReplicationRequest + * @property {string|null} [name] ResumeReplicationRequest name + */ + + /** + * Constructs a new ResumeReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ResumeReplicationRequest. + * @implements IResumeReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + */ + function ResumeReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResumeReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @instance + */ + ResumeReplicationRequest.prototype.name = ""; + + /** + * Creates a new ResumeReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest instance + */ + ResumeReplicationRequest.create = function create(properties) { + return new ResumeReplicationRequest(properties); + }; + + /** + * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResumeReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResumeReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResumeReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResumeReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + */ + ResumeReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ResumeReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ResumeReplicationRequest} message ResumeReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResumeReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ResumeReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + ResumeReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResumeReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResumeReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ResumeReplicationRequest"; + }; + + return ResumeReplicationRequest; + })(); + + v1.ReverseReplicationDirectionRequest = (function() { + + /** + * Properties of a ReverseReplicationDirectionRequest. + * @memberof google.cloud.netapp.v1 + * @interface IReverseReplicationDirectionRequest + * @property {string|null} [name] ReverseReplicationDirectionRequest name + */ + + /** + * Constructs a new ReverseReplicationDirectionRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ReverseReplicationDirectionRequest. + * @implements IReverseReplicationDirectionRequest + * @constructor + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + */ + function ReverseReplicationDirectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReverseReplicationDirectionRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @instance + */ + ReverseReplicationDirectionRequest.prototype.name = ""; + + /** + * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest instance + */ + ReverseReplicationDirectionRequest.create = function create(properties) { + return new ReverseReplicationDirectionRequest(properties); + }; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseReplicationDirectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseReplicationDirectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseReplicationDirectionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseReplicationDirectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReverseReplicationDirectionRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReverseReplicationDirectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + */ + ReverseReplicationDirectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReverseReplicationDirectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ReverseReplicationDirectionRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @instance + * @returns {Object.} JSON object + */ + ReverseReplicationDirectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReverseReplicationDirectionRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReverseReplicationDirectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ReverseReplicationDirectionRequest"; + }; + + return ReverseReplicationDirectionRequest; + })(); + + v1.EstablishPeeringRequest = (function() { + + /** + * Properties of an EstablishPeeringRequest. + * @memberof google.cloud.netapp.v1 + * @interface IEstablishPeeringRequest + * @property {string|null} [name] EstablishPeeringRequest name + * @property {string|null} [peerClusterName] EstablishPeeringRequest peerClusterName + * @property {string|null} [peerSvmName] EstablishPeeringRequest peerSvmName + * @property {Array.|null} [peerIpAddresses] EstablishPeeringRequest peerIpAddresses + * @property {string|null} [peerVolumeName] EstablishPeeringRequest peerVolumeName + */ + + /** + * Constructs a new EstablishPeeringRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an EstablishPeeringRequest. + * @implements IEstablishPeeringRequest + * @constructor + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set + */ + function EstablishPeeringRequest(properties) { + this.peerIpAddresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EstablishPeeringRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.name = ""; + + /** + * EstablishPeeringRequest peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerClusterName = ""; + + /** + * EstablishPeeringRequest peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerSvmName = ""; + + /** + * EstablishPeeringRequest peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerIpAddresses = $util.emptyArray; + + /** + * EstablishPeeringRequest peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerVolumeName = ""; + + /** + * Creates a new EstablishPeeringRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest instance + */ + EstablishPeeringRequest.create = function create(properties) { + return new EstablishPeeringRequest(properties); + }; + + /** + * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishPeeringRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); + return writer; + }; + + /** + * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishPeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EstablishPeeringRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishPeeringRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.peerClusterName = reader.string(); + break; + } + case 3: { + message.peerSvmName = reader.string(); + break; + } + case 4: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 5: { + message.peerVolumeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishPeeringRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EstablishPeeringRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EstablishPeeringRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + return null; + }; + + /** + * Creates an EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + */ + EstablishPeeringRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EstablishPeeringRequest) + return object; + var message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.EstablishPeeringRequest.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + return message; + }; + + /** + * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {google.cloud.netapp.v1.EstablishPeeringRequest} message EstablishPeeringRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EstablishPeeringRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; + if (options.defaults) { + object.name = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.peerVolumeName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + return object; + }; + + /** + * Converts this EstablishPeeringRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + * @returns {Object.} JSON object + */ + EstablishPeeringRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EstablishPeeringRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EstablishPeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishPeeringRequest"; + }; + + return EstablishPeeringRequest; + })(); + + v1.SyncReplicationRequest = (function() { + + /** + * Properties of a SyncReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @interface ISyncReplicationRequest + * @property {string|null} [name] SyncReplicationRequest name + */ + + /** + * Constructs a new SyncReplicationRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SyncReplicationRequest. + * @implements ISyncReplicationRequest + * @constructor + * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set + */ + function SyncReplicationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SyncReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @instance + */ + SyncReplicationRequest.prototype.name = ""; + + /** + * Creates a new SyncReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest instance + */ + SyncReplicationRequest.create = function create(properties) { + return new SyncReplicationRequest(properties); + }; + + /** + * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + */ + SyncReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SyncReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.SyncReplicationRequest} message SyncReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncReplicationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SyncReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @instance + * @returns {Object.} JSON object + */ + SyncReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SyncReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SyncReplicationRequest"; + }; + + return SyncReplicationRequest; + })(); + + /** + * Protocols enum. + * @name google.cloud.netapp.v1.Protocols + * @enum {number} + * @property {number} PROTOCOLS_UNSPECIFIED=0 PROTOCOLS_UNSPECIFIED value + * @property {number} NFSV3=1 NFSV3 value + * @property {number} NFSV4=2 NFSV4 value + * @property {number} SMB=3 SMB value + * @property {number} ISCSI=4 ISCSI value + */ + v1.Protocols = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROTOCOLS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NFSV3"] = 1; + values[valuesById[2] = "NFSV4"] = 2; + values[valuesById[3] = "SMB"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * AccessType enum. + * @name google.cloud.netapp.v1.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} READ_ONLY=1 READ_ONLY value + * @property {number} READ_WRITE=2 READ_WRITE value + * @property {number} READ_NONE=3 READ_NONE value + */ + v1.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_ONLY"] = 1; + values[valuesById[2] = "READ_WRITE"] = 2; + values[valuesById[3] = "READ_NONE"] = 3; + return values; + })(); + + /** + * SMBSettings enum. + * @name google.cloud.netapp.v1.SMBSettings + * @enum {number} + * @property {number} SMB_SETTINGS_UNSPECIFIED=0 SMB_SETTINGS_UNSPECIFIED value + * @property {number} ENCRYPT_DATA=1 ENCRYPT_DATA value + * @property {number} BROWSABLE=2 BROWSABLE value + * @property {number} CHANGE_NOTIFY=3 CHANGE_NOTIFY value + * @property {number} NON_BROWSABLE=4 NON_BROWSABLE value + * @property {number} OPLOCKS=5 OPLOCKS value + * @property {number} SHOW_SNAPSHOT=6 SHOW_SNAPSHOT value + * @property {number} SHOW_PREVIOUS_VERSIONS=7 SHOW_PREVIOUS_VERSIONS value + * @property {number} ACCESS_BASED_ENUMERATION=8 ACCESS_BASED_ENUMERATION value + * @property {number} CONTINUOUSLY_AVAILABLE=9 CONTINUOUSLY_AVAILABLE value + */ + v1.SMBSettings = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SMB_SETTINGS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPT_DATA"] = 1; + values[valuesById[2] = "BROWSABLE"] = 2; + values[valuesById[3] = "CHANGE_NOTIFY"] = 3; + values[valuesById[4] = "NON_BROWSABLE"] = 4; + values[valuesById[5] = "OPLOCKS"] = 5; + values[valuesById[6] = "SHOW_SNAPSHOT"] = 6; + values[valuesById[7] = "SHOW_PREVIOUS_VERSIONS"] = 7; + values[valuesById[8] = "ACCESS_BASED_ENUMERATION"] = 8; + values[valuesById[9] = "CONTINUOUSLY_AVAILABLE"] = 9; + return values; + })(); + + /** + * SecurityStyle enum. + * @name google.cloud.netapp.v1.SecurityStyle + * @enum {number} + * @property {number} SECURITY_STYLE_UNSPECIFIED=0 SECURITY_STYLE_UNSPECIFIED value + * @property {number} NTFS=1 NTFS value + * @property {number} UNIX=2 UNIX value + */ + v1.SecurityStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECURITY_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NTFS"] = 1; + values[valuesById[2] = "UNIX"] = 2; + return values; + })(); + + /** + * RestrictedAction enum. + * @name google.cloud.netapp.v1.RestrictedAction + * @enum {number} + * @property {number} RESTRICTED_ACTION_UNSPECIFIED=0 RESTRICTED_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + */ + v1.RestrictedAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + return values; + })(); + + v1.ListVolumesRequest = (function() { + + /** + * Properties of a ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesRequest + * @property {string|null} [parent] ListVolumesRequest parent + * @property {number|null} [pageSize] ListVolumesRequest pageSize + * @property {string|null} [pageToken] ListVolumesRequest pageToken + * @property {string|null} [filter] ListVolumesRequest filter + * @property {string|null} [orderBy] ListVolumesRequest orderBy + */ + + /** + * Constructs a new ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesRequest. + * @implements IListVolumesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + */ + function ListVolumesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVolumesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.parent = ""; + + /** + * ListVolumesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.pageSize = 0; + + /** + * ListVolumesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.pageToken = ""; + + /** + * ListVolumesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.filter = ""; + + /** + * ListVolumesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + */ + ListVolumesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVolumesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest instance + */ + ListVolumesRequest.create = function create(properties) { + return new ListVolumesRequest(properties); + }; + + /** + * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVolumesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVolumesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + */ + ListVolumesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.ListVolumesRequest} message ListVolumesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVolumesRequest.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; + }; + + /** + * Converts this ListVolumesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @instance + * @returns {Object.} JSON object + */ + ListVolumesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVolumesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesRequest"; + }; + + return ListVolumesRequest; + })(); + + v1.ListVolumesResponse = (function() { + + /** + * Properties of a ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesResponse + * @property {Array.|null} [volumes] ListVolumesResponse volumes + * @property {string|null} [nextPageToken] ListVolumesResponse nextPageToken + * @property {Array.|null} [unreachable] ListVolumesResponse unreachable + */ + + /** + * Constructs a new ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesResponse. + * @implements IListVolumesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + */ + function ListVolumesResponse(properties) { + this.volumes = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVolumesResponse volumes. + * @member {Array.} volumes + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.volumes = $util.emptyArray; + + /** + * ListVolumesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.nextPageToken = ""; + + /** + * ListVolumesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + */ + ListVolumesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListVolumesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse instance + */ + ListVolumesResponse.create = function create(properties) { + return new ListVolumesResponse(properties); + }; + + /** + * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.cloud.netapp.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVolumesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVolumesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVolumesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVolumesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + */ + ListVolumesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: object expected"); + message.volumes[i] = $root.google.cloud.netapp.v1.Volume.fromObject(object.volumes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.ListVolumesResponse} message ListVolumesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVolumesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.volumes = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.cloud.netapp.v1.Volume.toObject(message.volumes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListVolumesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + * @returns {Object.} JSON object + */ + ListVolumesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVolumesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVolumesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesResponse"; + }; + + return ListVolumesResponse; + })(); + + v1.GetVolumeRequest = (function() { + + /** + * Properties of a GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetVolumeRequest + * @property {string|null} [name] GetVolumeRequest name + */ + + /** + * Constructs a new GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetVolumeRequest. + * @implements IGetVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + */ + function GetVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + */ + GetVolumeRequest.prototype.name = ""; + + /** + * Creates a new GetVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest instance + */ + GetVolumeRequest.create = function create(properties) { + return new GetVolumeRequest(properties); + }; + + /** + * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + */ + GetVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.GetVolumeRequest} message GetVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + GetVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetVolumeRequest"; + }; + + return GetVolumeRequest; + })(); + + v1.CreateVolumeRequest = (function() { + + /** + * Properties of a CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateVolumeRequest + * @property {string|null} [parent] CreateVolumeRequest parent + * @property {string|null} [volumeId] CreateVolumeRequest volumeId + * @property {google.cloud.netapp.v1.IVolume|null} [volume] CreateVolumeRequest volume + */ + + /** + * Constructs a new CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateVolumeRequest. + * @implements ICreateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + */ + function CreateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVolumeRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.parent = ""; + + /** + * CreateVolumeRequest volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volumeId = ""; + + /** + * CreateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volume = null; + + /** + * Creates a new CreateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest instance + */ + CreateVolumeRequest.create = function create(properties) { + return new CreateVolumeRequest(properties); + }; + + /** + * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + */ + CreateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.CreateVolumeRequest} message CreateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.volumeId = ""; + object.volume = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this CreateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateVolumeRequest"; + }; + + return CreateVolumeRequest; + })(); + + v1.UpdateVolumeRequest = (function() { + + /** + * Properties of an UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateVolumeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVolumeRequest updateMask + * @property {google.cloud.netapp.v1.IVolume|null} [volume] UpdateVolumeRequest volume + */ + + /** + * Constructs a new UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateVolumeRequest. + * @implements IUpdateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + */ + function UpdateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateVolumeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.updateMask = null; + + /** + * UpdateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.volume = null; + + /** + * Creates a new UpdateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest instance + */ + UpdateVolumeRequest.create = function create(properties) { + return new UpdateVolumeRequest(properties); + }; + + /** + * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates an UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + */ + UpdateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.UpdateVolumeRequest} message UpdateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.volume = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this UpdateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateVolumeRequest"; + }; + + return UpdateVolumeRequest; + })(); + + v1.DeleteVolumeRequest = (function() { + + /** + * Properties of a DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteVolumeRequest + * @property {string|null} [name] DeleteVolumeRequest name + * @property {boolean|null} [force] DeleteVolumeRequest force + */ + + /** + * Constructs a new DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteVolumeRequest. + * @implements IDeleteVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + */ + function DeleteVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.name = ""; + + /** + * DeleteVolumeRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.force = false; + + /** + * Creates a new DeleteVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest instance + */ + DeleteVolumeRequest.create = function create(properties) { + return new DeleteVolumeRequest(properties); + }; + + /** + * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + */ + DeleteVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.DeleteVolumeRequest} message DeleteVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteVolumeRequest"; + }; + + return DeleteVolumeRequest; + })(); + + v1.RevertVolumeRequest = (function() { + + /** + * Properties of a RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IRevertVolumeRequest + * @property {string|null} [name] RevertVolumeRequest name + * @property {string|null} [snapshotId] RevertVolumeRequest snapshotId + */ + + /** + * Constructs a new RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RevertVolumeRequest. + * @implements IRevertVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + */ + function RevertVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevertVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.name = ""; + + /** + * RevertVolumeRequest snapshotId. + * @member {string} snapshotId + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.snapshotId = ""; + + /** + * Creates a new RevertVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest instance + */ + RevertVolumeRequest.create = function create(properties) { + return new RevertVolumeRequest(properties); + }; + + /** + * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotId); + return writer; + }; + + /** + * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snapshotId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevertVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevertVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + return null; + }; + + /** + * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + */ + RevertVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RevertVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + return message; + }; + + /** + * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.RevertVolumeRequest} message RevertVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevertVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.snapshotId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + return object; + }; + + /** + * Converts this RevertVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + RevertVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RevertVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevertVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RevertVolumeRequest"; + }; + + return RevertVolumeRequest; + })(); + + v1.Volume = (function() { + + /** + * Properties of a Volume. + * @memberof google.cloud.netapp.v1 + * @interface IVolume + * @property {string|null} [name] Volume name + * @property {google.cloud.netapp.v1.Volume.State|null} [state] Volume state + * @property {string|null} [stateDetails] Volume stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] Volume createTime + * @property {string|null} [shareName] Volume shareName + * @property {string|null} [psaRange] Volume psaRange + * @property {string|null} [storagePool] Volume storagePool + * @property {string|null} [network] Volume network + * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] Volume serviceLevel + * @property {number|Long|null} [capacityGib] Volume capacityGib + * @property {google.cloud.netapp.v1.IExportPolicy|null} [exportPolicy] Volume exportPolicy + * @property {Array.|null} [protocols] Volume protocols + * @property {Array.|null} [smbSettings] Volume smbSettings + * @property {Array.|null} [mountOptions] Volume mountOptions + * @property {string|null} [unixPermissions] Volume unixPermissions + * @property {Object.|null} [labels] Volume labels + * @property {string|null} [description] Volume description + * @property {google.cloud.netapp.v1.ISnapshotPolicy|null} [snapshotPolicy] Volume snapshotPolicy + * @property {number|null} [snapReserve] Volume snapReserve + * @property {boolean|null} [snapshotDirectory] Volume snapshotDirectory + * @property {number|Long|null} [usedGib] Volume usedGib + * @property {google.cloud.netapp.v1.SecurityStyle|null} [securityStyle] Volume securityStyle + * @property {boolean|null} [kerberosEnabled] Volume kerberosEnabled + * @property {boolean|null} [ldapEnabled] Volume ldapEnabled + * @property {string|null} [activeDirectory] Volume activeDirectory + * @property {google.cloud.netapp.v1.IRestoreParameters|null} [restoreParameters] Volume restoreParameters + * @property {string|null} [kmsConfig] Volume kmsConfig + * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] Volume encryptionType + * @property {boolean|null} [hasReplication] Volume hasReplication + * @property {google.cloud.netapp.v1.IBackupConfig|null} [backupConfig] Volume backupConfig + * @property {Array.|null} [restrictedActions] Volume restrictedActions + * @property {boolean|null} [largeCapacity] Volume largeCapacity + * @property {boolean|null} [multipleEndpoints] Volume multipleEndpoints + * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] Volume tieringPolicy + * @property {string|null} [replicaZone] Volume replicaZone + * @property {string|null} [zone] Volume zone + * @property {number|Long|null} [coldTierSizeGib] Volume coldTierSizeGib + * @property {google.cloud.netapp.v1.IHybridReplicationParameters|null} [hybridReplicationParameters] Volume hybridReplicationParameters + * @property {number|null} [throughputMibps] Volume throughputMibps + * @property {google.cloud.netapp.v1.ICacheParameters|null} [cacheParameters] Volume cacheParameters + * @property {number|Long|null} [hotTierSizeUsedGib] Volume hotTierSizeUsedGib + * @property {Array.|null} [blockDevices] Volume blockDevices + * @property {google.cloud.netapp.v1.Volume.ICloneDetails|null} [cloneDetails] Volume cloneDetails + */ + + /** + * Constructs a new Volume. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Volume. + * @implements IVolume + * @constructor + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + */ + function Volume(properties) { + this.protocols = []; + this.smbSettings = []; + this.mountOptions = []; + this.labels = {}; + this.restrictedActions = []; + this.blockDevices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Volume name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.name = ""; + + /** + * Volume state. + * @member {google.cloud.netapp.v1.Volume.State} state + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.state = 0; + + /** + * Volume stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.stateDetails = ""; + + /** + * Volume createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.createTime = null; + + /** + * Volume shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.shareName = ""; + + /** + * Volume psaRange. + * @member {string} psaRange + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.psaRange = ""; + + /** + * Volume storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.storagePool = ""; + + /** + * Volume network. + * @member {string} network + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.network = ""; + + /** + * Volume serviceLevel. + * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.serviceLevel = 0; + + /** + * Volume capacityGib. + * @member {number|Long} capacityGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume exportPolicy. + * @member {google.cloud.netapp.v1.IExportPolicy|null|undefined} exportPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.exportPolicy = null; + + /** + * Volume protocols. + * @member {Array.} protocols + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.protocols = $util.emptyArray; + + /** + * Volume smbSettings. + * @member {Array.} smbSettings + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.smbSettings = $util.emptyArray; + + /** + * Volume mountOptions. + * @member {Array.} mountOptions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.mountOptions = $util.emptyArray; + + /** + * Volume unixPermissions. + * @member {string} unixPermissions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.unixPermissions = ""; + + /** + * Volume labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.labels = $util.emptyObject; + + /** + * Volume description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.description = ""; + + /** + * Volume snapshotPolicy. + * @member {google.cloud.netapp.v1.ISnapshotPolicy|null|undefined} snapshotPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotPolicy = null; + + /** + * Volume snapReserve. + * @member {number} snapReserve + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapReserve = 0; + + /** + * Volume snapshotDirectory. + * @member {boolean} snapshotDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotDirectory = false; + + /** + * Volume usedGib. + * @member {number|Long} usedGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.usedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume securityStyle. + * @member {google.cloud.netapp.v1.SecurityStyle} securityStyle + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.securityStyle = 0; + + /** + * Volume kerberosEnabled. + * @member {boolean} kerberosEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kerberosEnabled = false; + + /** + * Volume ldapEnabled. + * @member {boolean} ldapEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.ldapEnabled = false; + + /** + * Volume activeDirectory. + * @member {string} activeDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.activeDirectory = ""; + + /** + * Volume restoreParameters. + * @member {google.cloud.netapp.v1.IRestoreParameters|null|undefined} restoreParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restoreParameters = null; + + /** + * Volume kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kmsConfig = ""; + + /** + * Volume encryptionType. + * @member {google.cloud.netapp.v1.EncryptionType} encryptionType + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.encryptionType = 0; + + /** + * Volume hasReplication. + * @member {boolean} hasReplication + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hasReplication = false; + + /** + * Volume backupConfig. + * @member {google.cloud.netapp.v1.IBackupConfig|null|undefined} backupConfig + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.backupConfig = null; + + /** + * Volume restrictedActions. + * @member {Array.} restrictedActions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restrictedActions = $util.emptyArray; + + /** + * Volume largeCapacity. + * @member {boolean} largeCapacity + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.largeCapacity = false; + + /** + * Volume multipleEndpoints. + * @member {boolean} multipleEndpoints + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.multipleEndpoints = false; + + /** + * Volume tieringPolicy. + * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.tieringPolicy = null; + + /** + * Volume replicaZone. + * @member {string} replicaZone + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.replicaZone = ""; + + /** + * Volume zone. + * @member {string} zone + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.zone = ""; + + /** + * Volume coldTierSizeGib. + * @member {number|Long} coldTierSizeGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.coldTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume hybridReplicationParameters. + * @member {google.cloud.netapp.v1.IHybridReplicationParameters|null|undefined} hybridReplicationParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hybridReplicationParameters = null; + + /** + * Volume throughputMibps. + * @member {number} throughputMibps + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.throughputMibps = 0; + + /** + * Volume cacheParameters. + * @member {google.cloud.netapp.v1.ICacheParameters|null|undefined} cacheParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.cacheParameters = null; + + /** + * Volume hotTierSizeUsedGib. + * @member {number|Long} hotTierSizeUsedGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume blockDevices. + * @member {Array.} blockDevices + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.blockDevices = $util.emptyArray; + + /** + * Volume cloneDetails. + * @member {google.cloud.netapp.v1.Volume.ICloneDetails|null|undefined} cloneDetails + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.cloneDetails = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Volume.prototype, "_backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["backupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Volume.prototype, "_tieringPolicy", { + get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Volume instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Volume} Volume instance + */ + Volume.create = function create(properties) { + return new Volume(properties); + }; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.shareName); + if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.psaRange); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.storagePool); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.serviceLevel); + if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.capacityGib); + if (message.exportPolicy != null && Object.hasOwnProperty.call(message, "exportPolicy")) + $root.google.cloud.netapp.v1.ExportPolicy.encode(message.exportPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.protocols != null && message.protocols.length) { + writer.uint32(/* id 12, wireType 2 =*/98).fork(); + for (var i = 0; i < message.protocols.length; ++i) + writer.int32(message.protocols[i]); + writer.ldelim(); + } + if (message.smbSettings != null && message.smbSettings.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.smbSettings.length; ++i) + writer.int32(message.smbSettings[i]); + writer.ldelim(); + } + if (message.mountOptions != null && message.mountOptions.length) + for (var i = 0; i < message.mountOptions.length; ++i) + $root.google.cloud.netapp.v1.MountOption.encode(message.mountOptions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unixPermissions != null && Object.hasOwnProperty.call(message, "unixPermissions")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.unixPermissions); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); + if (message.snapshotPolicy != null && Object.hasOwnProperty.call(message, "snapshotPolicy")) + $root.google.cloud.netapp.v1.SnapshotPolicy.encode(message.snapshotPolicy, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.snapReserve != null && Object.hasOwnProperty.call(message, "snapReserve")) + writer.uint32(/* id 19, wireType 1 =*/153).double(message.snapReserve); + if (message.snapshotDirectory != null && Object.hasOwnProperty.call(message, "snapshotDirectory")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.snapshotDirectory); + if (message.usedGib != null && Object.hasOwnProperty.call(message, "usedGib")) + writer.uint32(/* id 21, wireType 0 =*/168).int64(message.usedGib); + if (message.securityStyle != null && Object.hasOwnProperty.call(message, "securityStyle")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.securityStyle); + if (message.kerberosEnabled != null && Object.hasOwnProperty.call(message, "kerberosEnabled")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.kerberosEnabled); + if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.ldapEnabled); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.activeDirectory); + if (message.restoreParameters != null && Object.hasOwnProperty.call(message, "restoreParameters")) + $root.google.cloud.netapp.v1.RestoreParameters.encode(message.restoreParameters, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.kmsConfig); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.encryptionType); + if (message.hasReplication != null && Object.hasOwnProperty.call(message, "hasReplication")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.hasReplication); + if (message.backupConfig != null && Object.hasOwnProperty.call(message, "backupConfig")) + $root.google.cloud.netapp.v1.BackupConfig.encode(message.backupConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.restrictedActions != null && message.restrictedActions.length) { + writer.uint32(/* id 31, wireType 2 =*/250).fork(); + for (var i = 0; i < message.restrictedActions.length; ++i) + writer.int32(message.restrictedActions[i]); + writer.ldelim(); + } + if (message.largeCapacity != null && Object.hasOwnProperty.call(message, "largeCapacity")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.largeCapacity); + if (message.multipleEndpoints != null && Object.hasOwnProperty.call(message, "multipleEndpoints")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.multipleEndpoints); + if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) + $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.replicaZone); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.zone); + if (message.coldTierSizeGib != null && Object.hasOwnProperty.call(message, "coldTierSizeGib")) + writer.uint32(/* id 39, wireType 0 =*/312).int64(message.coldTierSizeGib); + if (message.hybridReplicationParameters != null && Object.hasOwnProperty.call(message, "hybridReplicationParameters")) + $root.google.cloud.netapp.v1.HybridReplicationParameters.encode(message.hybridReplicationParameters, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.throughputMibps != null && Object.hasOwnProperty.call(message, "throughputMibps")) + writer.uint32(/* id 41, wireType 1 =*/329).double(message.throughputMibps); + if (message.cacheParameters != null && Object.hasOwnProperty.call(message, "cacheParameters")) + $root.google.cloud.netapp.v1.CacheParameters.encode(message.cacheParameters, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) + writer.uint32(/* id 44, wireType 0 =*/352).int64(message.hotTierSizeUsedGib); + if (message.blockDevices != null && message.blockDevices.length) + for (var i = 0; i < message.blockDevices.length; ++i) + $root.google.cloud.netapp.v1.BlockDevice.encode(message.blockDevices[i], writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.cloneDetails != null && Object.hasOwnProperty.call(message, "cloneDetails")) + $root.google.cloud.netapp.v1.Volume.CloneDetails.encode(message.cloneDetails, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.shareName = reader.string(); + break; + } + case 6: { + message.psaRange = reader.string(); + break; + } + case 7: { + message.storagePool = reader.string(); + break; + } + case 8: { + message.network = reader.string(); + break; + } + case 9: { + message.serviceLevel = reader.int32(); + break; + } + case 10: { + message.capacityGib = reader.int64(); + break; + } + case 11: { + message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.protocols.push(reader.int32()); + } else + message.protocols.push(reader.int32()); + break; + } + case 13: { + if (!(message.smbSettings && message.smbSettings.length)) + message.smbSettings = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.smbSettings.push(reader.int32()); + } else + message.smbSettings.push(reader.int32()); + break; + } + case 14: { + if (!(message.mountOptions && message.mountOptions.length)) + message.mountOptions = []; + message.mountOptions.push($root.google.cloud.netapp.v1.MountOption.decode(reader, reader.uint32())); + break; + } + case 15: { + message.unixPermissions = reader.string(); + break; + } + case 16: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 17: { + message.description = reader.string(); + break; + } + case 18: { + message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.decode(reader, reader.uint32()); + break; + } + case 19: { + message.snapReserve = reader.double(); + break; + } + case 20: { + message.snapshotDirectory = reader.bool(); + break; + } + case 21: { + message.usedGib = reader.int64(); + break; + } + case 22: { + message.securityStyle = reader.int32(); + break; + } + case 23: { + message.kerberosEnabled = reader.bool(); + break; + } + case 24: { + message.ldapEnabled = reader.bool(); + break; + } + case 25: { + message.activeDirectory = reader.string(); + break; + } + case 26: { + message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.decode(reader, reader.uint32()); + break; + } + case 27: { + message.kmsConfig = reader.string(); + break; + } + case 28: { + message.encryptionType = reader.int32(); + break; + } + case 29: { + message.hasReplication = reader.bool(); + break; + } + case 30: { + message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.decode(reader, reader.uint32()); + break; + } + case 31: { + if (!(message.restrictedActions && message.restrictedActions.length)) + message.restrictedActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedActions.push(reader.int32()); + } else + message.restrictedActions.push(reader.int32()); + break; + } + case 32: { + message.largeCapacity = reader.bool(); + break; + } + case 33: { + message.multipleEndpoints = reader.bool(); + break; + } + case 34: { + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); + break; + } + case 36: { + message.replicaZone = reader.string(); + break; + } + case 37: { + message.zone = reader.string(); + break; + } + case 39: { + message.coldTierSizeGib = reader.int64(); + break; + } + case 40: { + message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.decode(reader, reader.uint32()); + break; + } + case 41: { + message.throughputMibps = reader.double(); + break; + } + case 42: { + message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.decode(reader, reader.uint32()); + break; + } + case 44: { + message.hotTierSizeUsedGib = reader.int64(); + break; + } + case 45: { + if (!(message.blockDevices && message.blockDevices.length)) + message.blockDevices = []; + message.blockDevices.push($root.google.cloud.netapp.v1.BlockDevice.decode(reader, reader.uint32())); + break; + } + case 47: { + message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Volume message. + * @function verify + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Volume.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) + return "shareName: string expected"; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + if (!$util.isString(message.psaRange)) + return "psaRange: string expected"; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) + return "capacityGib: integer|Long expected"; + if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) { + var error = $root.google.cloud.netapp.v1.ExportPolicy.verify(message.exportPolicy); + if (error) + return "exportPolicy." + error; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + switch (message.protocols[i]) { + default: + return "protocols: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.smbSettings != null && message.hasOwnProperty("smbSettings")) { + if (!Array.isArray(message.smbSettings)) + return "smbSettings: array expected"; + for (var i = 0; i < message.smbSettings.length; ++i) + switch (message.smbSettings[i]) { + default: + return "smbSettings: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.mountOptions != null && message.hasOwnProperty("mountOptions")) { + if (!Array.isArray(message.mountOptions)) + return "mountOptions: array expected"; + for (var i = 0; i < message.mountOptions.length; ++i) { + var error = $root.google.cloud.netapp.v1.MountOption.verify(message.mountOptions[i]); + if (error) + return "mountOptions." + error; + } + } + if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) + if (!$util.isString(message.unixPermissions)) + return "unixPermissions: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) { + var error = $root.google.cloud.netapp.v1.SnapshotPolicy.verify(message.snapshotPolicy); + if (error) + return "snapshotPolicy." + error; + } + if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) + if (typeof message.snapReserve !== "number") + return "snapReserve: number expected"; + if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) + if (typeof message.snapshotDirectory !== "boolean") + return "snapshotDirectory: boolean expected"; + if (message.usedGib != null && message.hasOwnProperty("usedGib")) + if (!$util.isInteger(message.usedGib) && !(message.usedGib && $util.isInteger(message.usedGib.low) && $util.isInteger(message.usedGib.high))) + return "usedGib: integer|Long expected"; + if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) + switch (message.securityStyle) { + default: + return "securityStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) + if (typeof message.kerberosEnabled !== "boolean") + return "kerberosEnabled: boolean expected"; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + if (typeof message.ldapEnabled !== "boolean") + return "ldapEnabled: boolean expected"; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + if (!$util.isString(message.activeDirectory)) + return "activeDirectory: string expected"; + if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) { + var error = $root.google.cloud.netapp.v1.RestoreParameters.verify(message.restoreParameters); + if (error) + return "restoreParameters." + error; + } + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + if (!$util.isString(message.kmsConfig)) + return "kmsConfig: string expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) + if (typeof message.hasReplication !== "boolean") + return "hasReplication: boolean expected"; + if (message.backupConfig != null && message.hasOwnProperty("backupConfig")) { + properties._backupConfig = 1; + { + var error = $root.google.cloud.netapp.v1.BackupConfig.verify(message.backupConfig); + if (error) + return "backupConfig." + error; + } + } + if (message.restrictedActions != null && message.hasOwnProperty("restrictedActions")) { + if (!Array.isArray(message.restrictedActions)) + return "restrictedActions: array expected"; + for (var i = 0; i < message.restrictedActions.length; ++i) + switch (message.restrictedActions[i]) { + default: + return "restrictedActions: enum value[] expected"; + case 0: + case 1: + break; + } + } + if (message.largeCapacity != null && message.hasOwnProperty("largeCapacity")) + if (typeof message.largeCapacity !== "boolean") + return "largeCapacity: boolean expected"; + if (message.multipleEndpoints != null && message.hasOwnProperty("multipleEndpoints")) + if (typeof message.multipleEndpoints !== "boolean") + return "multipleEndpoints: boolean expected"; + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + properties._tieringPolicy = 1; + { + var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); + if (error) + return "tieringPolicy." + error; + } + } + if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) + if (!$util.isString(message.replicaZone)) + return "replicaZone: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.coldTierSizeGib != null && message.hasOwnProperty("coldTierSizeGib")) + if (!$util.isInteger(message.coldTierSizeGib) && !(message.coldTierSizeGib && $util.isInteger(message.coldTierSizeGib.low) && $util.isInteger(message.coldTierSizeGib.high))) + return "coldTierSizeGib: integer|Long expected"; + if (message.hybridReplicationParameters != null && message.hasOwnProperty("hybridReplicationParameters")) { + var error = $root.google.cloud.netapp.v1.HybridReplicationParameters.verify(message.hybridReplicationParameters); + if (error) + return "hybridReplicationParameters." + error; + } + if (message.throughputMibps != null && message.hasOwnProperty("throughputMibps")) + if (typeof message.throughputMibps !== "number") + return "throughputMibps: number expected"; + if (message.cacheParameters != null && message.hasOwnProperty("cacheParameters")) { + var error = $root.google.cloud.netapp.v1.CacheParameters.verify(message.cacheParameters); + if (error) + return "cacheParameters." + error; + } + if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) + if (!$util.isInteger(message.hotTierSizeUsedGib) && !(message.hotTierSizeUsedGib && $util.isInteger(message.hotTierSizeUsedGib.low) && $util.isInteger(message.hotTierSizeUsedGib.high))) + return "hotTierSizeUsedGib: integer|Long expected"; + if (message.blockDevices != null && message.hasOwnProperty("blockDevices")) { + if (!Array.isArray(message.blockDevices)) + return "blockDevices: array expected"; + for (var i = 0; i < message.blockDevices.length; ++i) { + var error = $root.google.cloud.netapp.v1.BlockDevice.verify(message.blockDevices[i]); + if (error) + return "blockDevices." + error; + } + } + if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) { + var error = $root.google.cloud.netapp.v1.Volume.CloneDetails.verify(message.cloneDetails); + if (error) + return "cloneDetails." + error; + } + return null; + }; + + /** + * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Volume} Volume + */ + Volume.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Volume) + return object; + var message = new $root.google.cloud.netapp.v1.Volume(); + 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 "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + case "DISABLED": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + case "PREPARING": + case 8: + message.state = 8; + break; + case "READ_ONLY": + case 9: + message.state = 9; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.shareName != null) + message.shareName = String(object.shareName); + if (object.psaRange != null) + message.psaRange = String(object.psaRange); + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.network != null) + message.network = String(object.network); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "PREMIUM": + case 1: + message.serviceLevel = 1; + break; + case "EXTREME": + case 2: + message.serviceLevel = 2; + break; + case "STANDARD": + case 3: + message.serviceLevel = 3; + break; + case "FLEX": + case 4: + message.serviceLevel = 4; + break; + } + if (object.capacityGib != null) + if ($util.Long) + (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; + else if (typeof object.capacityGib === "string") + message.capacityGib = parseInt(object.capacityGib, 10); + else if (typeof object.capacityGib === "number") + message.capacityGib = object.capacityGib; + else if (typeof object.capacityGib === "object") + message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); + if (object.exportPolicy != null) { + if (typeof object.exportPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.exportPolicy: object expected"); + message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.fromObject(object.exportPolicy); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.netapp.v1.Volume.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + switch (object.protocols[i]) { + default: + if (typeof object.protocols[i] === "number") { + message.protocols[i] = object.protocols[i]; + break; + } + case "PROTOCOLS_UNSPECIFIED": + case 0: + message.protocols[i] = 0; + break; + case "NFSV3": + case 1: + message.protocols[i] = 1; + break; + case "NFSV4": + case 2: + message.protocols[i] = 2; + break; + case "SMB": + case 3: + message.protocols[i] = 3; + break; + case "ISCSI": + case 4: + message.protocols[i] = 4; + break; + } + } + if (object.smbSettings) { + if (!Array.isArray(object.smbSettings)) + throw TypeError(".google.cloud.netapp.v1.Volume.smbSettings: array expected"); + message.smbSettings = []; + for (var i = 0; i < object.smbSettings.length; ++i) + switch (object.smbSettings[i]) { + default: + if (typeof object.smbSettings[i] === "number") { + message.smbSettings[i] = object.smbSettings[i]; + break; + } + case "SMB_SETTINGS_UNSPECIFIED": + case 0: + message.smbSettings[i] = 0; + break; + case "ENCRYPT_DATA": + case 1: + message.smbSettings[i] = 1; + break; + case "BROWSABLE": + case 2: + message.smbSettings[i] = 2; + break; + case "CHANGE_NOTIFY": + case 3: + message.smbSettings[i] = 3; + break; + case "NON_BROWSABLE": + case 4: + message.smbSettings[i] = 4; + break; + case "OPLOCKS": + case 5: + message.smbSettings[i] = 5; + break; + case "SHOW_SNAPSHOT": + case 6: + message.smbSettings[i] = 6; + break; + case "SHOW_PREVIOUS_VERSIONS": + case 7: + message.smbSettings[i] = 7; + break; + case "ACCESS_BASED_ENUMERATION": + case 8: + message.smbSettings[i] = 8; + break; + case "CONTINUOUSLY_AVAILABLE": + case 9: + message.smbSettings[i] = 9; + break; + } + } + if (object.mountOptions) { + if (!Array.isArray(object.mountOptions)) + throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: array expected"); + message.mountOptions = []; + for (var i = 0; i < object.mountOptions.length; ++i) { + if (typeof object.mountOptions[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: object expected"); + message.mountOptions[i] = $root.google.cloud.netapp.v1.MountOption.fromObject(object.mountOptions[i]); + } + } + if (object.unixPermissions != null) + message.unixPermissions = String(object.unixPermissions); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.snapshotPolicy != null) { + if (typeof object.snapshotPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.snapshotPolicy: object expected"); + message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.fromObject(object.snapshotPolicy); + } + if (object.snapReserve != null) + message.snapReserve = Number(object.snapReserve); + if (object.snapshotDirectory != null) + message.snapshotDirectory = Boolean(object.snapshotDirectory); + if (object.usedGib != null) + if ($util.Long) + (message.usedGib = $util.Long.fromValue(object.usedGib)).unsigned = false; + else if (typeof object.usedGib === "string") + message.usedGib = parseInt(object.usedGib, 10); + else if (typeof object.usedGib === "number") + message.usedGib = object.usedGib; + else if (typeof object.usedGib === "object") + message.usedGib = new $util.LongBits(object.usedGib.low >>> 0, object.usedGib.high >>> 0).toNumber(); + switch (object.securityStyle) { + default: + if (typeof object.securityStyle === "number") { + message.securityStyle = object.securityStyle; + break; + } + break; + case "SECURITY_STYLE_UNSPECIFIED": + case 0: + message.securityStyle = 0; + break; + case "NTFS": + case 1: + message.securityStyle = 1; + break; + case "UNIX": + case 2: + message.securityStyle = 2; + break; + } + if (object.kerberosEnabled != null) + message.kerberosEnabled = Boolean(object.kerberosEnabled); + if (object.ldapEnabled != null) + message.ldapEnabled = Boolean(object.ldapEnabled); + if (object.activeDirectory != null) + message.activeDirectory = String(object.activeDirectory); + if (object.restoreParameters != null) { + if (typeof object.restoreParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.restoreParameters: object expected"); + message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.fromObject(object.restoreParameters); + } + if (object.kmsConfig != null) + message.kmsConfig = String(object.kmsConfig); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "SERVICE_MANAGED": + case 1: + message.encryptionType = 1; + break; + case "CLOUD_KMS": + case 2: + message.encryptionType = 2; + break; + } + if (object.hasReplication != null) + message.hasReplication = Boolean(object.hasReplication); + if (object.backupConfig != null) { + if (typeof object.backupConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.backupConfig: object expected"); + message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.fromObject(object.backupConfig); + } + if (object.restrictedActions) { + if (!Array.isArray(object.restrictedActions)) + throw TypeError(".google.cloud.netapp.v1.Volume.restrictedActions: array expected"); + message.restrictedActions = []; + for (var i = 0; i < object.restrictedActions.length; ++i) + switch (object.restrictedActions[i]) { + default: + if (typeof object.restrictedActions[i] === "number") { + message.restrictedActions[i] = object.restrictedActions[i]; + break; + } + case "RESTRICTED_ACTION_UNSPECIFIED": + case 0: + message.restrictedActions[i] = 0; + break; + case "DELETE": + case 1: + message.restrictedActions[i] = 1; + break; + } + } + if (object.largeCapacity != null) + message.largeCapacity = Boolean(object.largeCapacity); + if (object.multipleEndpoints != null) + message.multipleEndpoints = Boolean(object.multipleEndpoints); + if (object.tieringPolicy != null) { + if (typeof object.tieringPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.tieringPolicy: object expected"); + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); + } + if (object.replicaZone != null) + message.replicaZone = String(object.replicaZone); + if (object.zone != null) + message.zone = String(object.zone); + if (object.coldTierSizeGib != null) + if ($util.Long) + (message.coldTierSizeGib = $util.Long.fromValue(object.coldTierSizeGib)).unsigned = false; + else if (typeof object.coldTierSizeGib === "string") + message.coldTierSizeGib = parseInt(object.coldTierSizeGib, 10); + else if (typeof object.coldTierSizeGib === "number") + message.coldTierSizeGib = object.coldTierSizeGib; + else if (typeof object.coldTierSizeGib === "object") + message.coldTierSizeGib = new $util.LongBits(object.coldTierSizeGib.low >>> 0, object.coldTierSizeGib.high >>> 0).toNumber(); + if (object.hybridReplicationParameters != null) { + if (typeof object.hybridReplicationParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.hybridReplicationParameters: object expected"); + message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.fromObject(object.hybridReplicationParameters); + } + if (object.throughputMibps != null) + message.throughputMibps = Number(object.throughputMibps); + if (object.cacheParameters != null) { + if (typeof object.cacheParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.cacheParameters: object expected"); + message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.fromObject(object.cacheParameters); + } + if (object.hotTierSizeUsedGib != null) + if ($util.Long) + (message.hotTierSizeUsedGib = $util.Long.fromValue(object.hotTierSizeUsedGib)).unsigned = false; + else if (typeof object.hotTierSizeUsedGib === "string") + message.hotTierSizeUsedGib = parseInt(object.hotTierSizeUsedGib, 10); + else if (typeof object.hotTierSizeUsedGib === "number") + message.hotTierSizeUsedGib = object.hotTierSizeUsedGib; + else if (typeof object.hotTierSizeUsedGib === "object") + message.hotTierSizeUsedGib = new $util.LongBits(object.hotTierSizeUsedGib.low >>> 0, object.hotTierSizeUsedGib.high >>> 0).toNumber(); + if (object.blockDevices) { + if (!Array.isArray(object.blockDevices)) + throw TypeError(".google.cloud.netapp.v1.Volume.blockDevices: array expected"); + message.blockDevices = []; + for (var i = 0; i < object.blockDevices.length; ++i) { + if (typeof object.blockDevices[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.blockDevices: object expected"); + message.blockDevices[i] = $root.google.cloud.netapp.v1.BlockDevice.fromObject(object.blockDevices[i]); + } + } + if (object.cloneDetails != null) { + if (typeof object.cloneDetails !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.cloneDetails: object expected"); + message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.fromObject(object.cloneDetails); + } + return message; + }; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.Volume} message Volume + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Volume.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.protocols = []; + object.smbSettings = []; + object.mountOptions = []; + object.restrictedActions = []; + object.blockDevices = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.shareName = ""; + object.psaRange = ""; + object.storagePool = ""; + object.network = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.capacityGib = options.longs === String ? "0" : 0; + object.exportPolicy = null; + object.unixPermissions = ""; + object.description = ""; + object.snapshotPolicy = null; + object.snapReserve = 0; + object.snapshotDirectory = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.usedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.usedGib = options.longs === String ? "0" : 0; + object.securityStyle = options.enums === String ? "SECURITY_STYLE_UNSPECIFIED" : 0; + object.kerberosEnabled = false; + object.ldapEnabled = false; + object.activeDirectory = ""; + object.restoreParameters = null; + object.kmsConfig = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.hasReplication = false; + object.largeCapacity = false; + object.multipleEndpoints = false; + object.replicaZone = ""; + object.zone = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.coldTierSizeGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.coldTierSizeGib = options.longs === String ? "0" : 0; + object.hybridReplicationParameters = null; + object.throughputMibps = 0; + object.cacheParameters = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hotTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hotTierSizeUsedGib = options.longs === String ? "0" : 0; + object.cloneDetails = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Volume.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Volume.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.shareName != null && message.hasOwnProperty("shareName")) + object.shareName = message.shareName; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + object.psaRange = message.psaRange; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (typeof message.capacityGib === "number") + object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; + else + object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; + if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) + object.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.toObject(message.exportPolicy, options); + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] === undefined ? message.protocols[j] : $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] : message.protocols[j]; + } + if (message.smbSettings && message.smbSettings.length) { + object.smbSettings = []; + for (var j = 0; j < message.smbSettings.length; ++j) + object.smbSettings[j] = options.enums === String ? $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] === undefined ? message.smbSettings[j] : $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] : message.smbSettings[j]; + } + if (message.mountOptions && message.mountOptions.length) { + object.mountOptions = []; + for (var j = 0; j < message.mountOptions.length; ++j) + object.mountOptions[j] = $root.google.cloud.netapp.v1.MountOption.toObject(message.mountOptions[j], options); + } + if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) + object.unixPermissions = message.unixPermissions; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) + object.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.toObject(message.snapshotPolicy, options); + if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) + object.snapReserve = options.json && !isFinite(message.snapReserve) ? String(message.snapReserve) : message.snapReserve; + if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) + object.snapshotDirectory = message.snapshotDirectory; + if (message.usedGib != null && message.hasOwnProperty("usedGib")) + if (typeof message.usedGib === "number") + object.usedGib = options.longs === String ? String(message.usedGib) : message.usedGib; + else + object.usedGib = options.longs === String ? $util.Long.prototype.toString.call(message.usedGib) : options.longs === Number ? new $util.LongBits(message.usedGib.low >>> 0, message.usedGib.high >>> 0).toNumber() : message.usedGib; + if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) + object.securityStyle = options.enums === String ? $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] === undefined ? message.securityStyle : $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] : message.securityStyle; + if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) + object.kerberosEnabled = message.kerberosEnabled; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + object.ldapEnabled = message.ldapEnabled; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = message.activeDirectory; + if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) + object.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.toObject(message.restoreParameters, options); + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = message.kmsConfig; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) + object.hasReplication = message.hasReplication; + if (message.backupConfig != null && message.hasOwnProperty("backupConfig")) { + object.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.toObject(message.backupConfig, options); + if (options.oneofs) + object._backupConfig = "backupConfig"; + } + if (message.restrictedActions && message.restrictedActions.length) { + object.restrictedActions = []; + for (var j = 0; j < message.restrictedActions.length; ++j) + object.restrictedActions[j] = options.enums === String ? $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] === undefined ? message.restrictedActions[j] : $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] : message.restrictedActions[j]; + } + if (message.largeCapacity != null && message.hasOwnProperty("largeCapacity")) + object.largeCapacity = message.largeCapacity; + if (message.multipleEndpoints != null && message.hasOwnProperty("multipleEndpoints")) + object.multipleEndpoints = message.multipleEndpoints; + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); + if (options.oneofs) + object._tieringPolicy = "tieringPolicy"; + } + if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) + object.replicaZone = message.replicaZone; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.coldTierSizeGib != null && message.hasOwnProperty("coldTierSizeGib")) + if (typeof message.coldTierSizeGib === "number") + object.coldTierSizeGib = options.longs === String ? String(message.coldTierSizeGib) : message.coldTierSizeGib; + else + object.coldTierSizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.coldTierSizeGib) : options.longs === Number ? new $util.LongBits(message.coldTierSizeGib.low >>> 0, message.coldTierSizeGib.high >>> 0).toNumber() : message.coldTierSizeGib; + if (message.hybridReplicationParameters != null && message.hasOwnProperty("hybridReplicationParameters")) + object.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.toObject(message.hybridReplicationParameters, options); + if (message.throughputMibps != null && message.hasOwnProperty("throughputMibps")) + object.throughputMibps = options.json && !isFinite(message.throughputMibps) ? String(message.throughputMibps) : message.throughputMibps; + if (message.cacheParameters != null && message.hasOwnProperty("cacheParameters")) + object.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.toObject(message.cacheParameters, options); + if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) + if (typeof message.hotTierSizeUsedGib === "number") + object.hotTierSizeUsedGib = options.longs === String ? String(message.hotTierSizeUsedGib) : message.hotTierSizeUsedGib; + else + object.hotTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeUsedGib.low >>> 0, message.hotTierSizeUsedGib.high >>> 0).toNumber() : message.hotTierSizeUsedGib; + if (message.blockDevices && message.blockDevices.length) { + object.blockDevices = []; + for (var j = 0; j < message.blockDevices.length; ++j) + object.blockDevices[j] = $root.google.cloud.netapp.v1.BlockDevice.toObject(message.blockDevices[j], options); + } + if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) + object.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.toObject(message.cloneDetails, options); + return object; + }; + + /** + * Converts this Volume to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Volume + * @instance + * @returns {Object.} JSON object + */ + Volume.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Volume + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Volume"; + }; + + Volume.CloneDetails = (function() { + + /** + * Properties of a CloneDetails. + * @memberof google.cloud.netapp.v1.Volume + * @interface ICloneDetails + * @property {string|null} [sourceSnapshot] CloneDetails sourceSnapshot + * @property {string|null} [sourceVolume] CloneDetails sourceVolume + * @property {number|Long|null} [sharedSpaceGib] CloneDetails sharedSpaceGib + */ + + /** + * Constructs a new CloneDetails. + * @memberof google.cloud.netapp.v1.Volume + * @classdesc Represents a CloneDetails. + * @implements ICloneDetails + * @constructor + * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set + */ + function CloneDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloneDetails sourceSnapshot. + * @member {string} sourceSnapshot + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sourceSnapshot = ""; + + /** + * CloneDetails sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sourceVolume = ""; + + /** + * CloneDetails sharedSpaceGib. + * @member {number|Long} sharedSpaceGib + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sharedSpaceGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloneDetails instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails instance + */ + CloneDetails.create = function create(properties) { + return new CloneDetails(properties); + }; + + /** + * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloneDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceVolume); + if (message.sharedSpaceGib != null && Object.hasOwnProperty.call(message, "sharedSpaceGib")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sharedSpaceGib); + return writer; + }; + + /** + * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloneDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloneDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloneDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceSnapshot = reader.string(); + break; + } + case 2: { + message.sourceVolume = reader.string(); + break; + } + case 3: { + message.sharedSpaceGib = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloneDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloneDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloneDetails message. + * @function verify + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloneDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) + if (!$util.isInteger(message.sharedSpaceGib) && !(message.sharedSpaceGib && $util.isInteger(message.sharedSpaceGib.low) && $util.isInteger(message.sharedSpaceGib.high))) + return "sharedSpaceGib: integer|Long expected"; + return null; + }; + + /** + * Creates a CloneDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + */ + CloneDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Volume.CloneDetails) + return object; + var message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + if (object.sharedSpaceGib != null) + if ($util.Long) + (message.sharedSpaceGib = $util.Long.fromValue(object.sharedSpaceGib)).unsigned = false; + else if (typeof object.sharedSpaceGib === "string") + message.sharedSpaceGib = parseInt(object.sharedSpaceGib, 10); + else if (typeof object.sharedSpaceGib === "number") + message.sharedSpaceGib = object.sharedSpaceGib; + else if (typeof object.sharedSpaceGib === "object") + message.sharedSpaceGib = new $util.LongBits(object.sharedSpaceGib.low >>> 0, object.sharedSpaceGib.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.CloneDetails} message CloneDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloneDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceSnapshot = ""; + object.sourceVolume = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sharedSpaceGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sharedSpaceGib = options.longs === String ? "0" : 0; + } + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + object.sourceSnapshot = message.sourceSnapshot; + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) + if (typeof message.sharedSpaceGib === "number") + object.sharedSpaceGib = options.longs === String ? String(message.sharedSpaceGib) : message.sharedSpaceGib; + else + object.sharedSpaceGib = options.longs === String ? $util.Long.prototype.toString.call(message.sharedSpaceGib) : options.longs === Number ? new $util.LongBits(message.sharedSpaceGib.low >>> 0, message.sharedSpaceGib.high >>> 0).toNumber() : message.sharedSpaceGib; + return object; + }; + + /** + * Converts this CloneDetails to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + * @returns {Object.} JSON object + */ + CloneDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloneDetails + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloneDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Volume.CloneDetails"; + }; + + return CloneDetails; + })(); + + /** + * State enum. + * @name google.cloud.netapp.v1.Volume.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} RESTORING=5 RESTORING value + * @property {number} DISABLED=6 DISABLED value + * @property {number} ERROR=7 ERROR value + * @property {number} PREPARING=8 PREPARING value + * @property {number} READ_ONLY=9 READ_ONLY value + */ + Volume.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + values[valuesById[6] = "DISABLED"] = 6; + values[valuesById[7] = "ERROR"] = 7; + values[valuesById[8] = "PREPARING"] = 8; + values[valuesById[9] = "READ_ONLY"] = 9; + return values; + })(); + + return Volume; + })(); + + v1.ExportPolicy = (function() { + + /** + * Properties of an ExportPolicy. + * @memberof google.cloud.netapp.v1 + * @interface IExportPolicy + * @property {Array.|null} [rules] ExportPolicy rules + */ + + /** + * Constructs a new ExportPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an ExportPolicy. + * @implements IExportPolicy + * @constructor + * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set + */ + function ExportPolicy(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportPolicy rules. + * @member {Array.} rules + * @memberof google.cloud.netapp.v1.ExportPolicy + * @instance + */ + ExportPolicy.prototype.rules = $util.emptyArray; + + /** + * Creates a new ExportPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy instance + */ + ExportPolicy.create = function create(properties) { + return new ExportPolicy(properties); + }; + + /** + * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.netapp.v1.SimpleExportPolicyRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExportPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.netapp.v1.SimpleExportPolicyRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an ExportPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy + */ + ExportPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExportPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.ExportPolicy(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: object expected"); + message.rules[i] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {google.cloud.netapp.v1.ExportPolicy} message ExportPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this ExportPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ExportPolicy + * @instance + * @returns {Object.} JSON object + */ + ExportPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ExportPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ExportPolicy"; + }; + + return ExportPolicy; + })(); + + v1.SimpleExportPolicyRule = (function() { + + /** + * Properties of a SimpleExportPolicyRule. + * @memberof google.cloud.netapp.v1 + * @interface ISimpleExportPolicyRule + * @property {string|null} [allowedClients] SimpleExportPolicyRule allowedClients + * @property {string|null} [hasRootAccess] SimpleExportPolicyRule hasRootAccess + * @property {google.cloud.netapp.v1.AccessType|null} [accessType] SimpleExportPolicyRule accessType + * @property {boolean|null} [nfsv3] SimpleExportPolicyRule nfsv3 + * @property {boolean|null} [nfsv4] SimpleExportPolicyRule nfsv4 + * @property {boolean|null} [kerberos_5ReadOnly] SimpleExportPolicyRule kerberos_5ReadOnly + * @property {boolean|null} [kerberos_5ReadWrite] SimpleExportPolicyRule kerberos_5ReadWrite + * @property {boolean|null} [kerberos_5iReadOnly] SimpleExportPolicyRule kerberos_5iReadOnly + * @property {boolean|null} [kerberos_5iReadWrite] SimpleExportPolicyRule kerberos_5iReadWrite + * @property {boolean|null} [kerberos_5pReadOnly] SimpleExportPolicyRule kerberos_5pReadOnly + * @property {boolean|null} [kerberos_5pReadWrite] SimpleExportPolicyRule kerberos_5pReadWrite + * @property {google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null} [squashMode] SimpleExportPolicyRule squashMode + * @property {number|Long|null} [anonUid] SimpleExportPolicyRule anonUid + */ + + /** + * Constructs a new SimpleExportPolicyRule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SimpleExportPolicyRule. + * @implements ISimpleExportPolicyRule + * @constructor + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set + */ + function SimpleExportPolicyRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimpleExportPolicyRule allowedClients. + * @member {string|null|undefined} allowedClients + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.allowedClients = null; + + /** + * SimpleExportPolicyRule hasRootAccess. + * @member {string|null|undefined} hasRootAccess + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.hasRootAccess = null; + + /** + * SimpleExportPolicyRule accessType. + * @member {google.cloud.netapp.v1.AccessType|null|undefined} accessType + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.accessType = null; + + /** + * SimpleExportPolicyRule nfsv3. + * @member {boolean|null|undefined} nfsv3 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.nfsv3 = null; + + /** + * SimpleExportPolicyRule nfsv4. + * @member {boolean|null|undefined} nfsv4 + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.nfsv4 = null; + + /** + * SimpleExportPolicyRule kerberos_5ReadOnly. + * @member {boolean|null|undefined} kerberos_5ReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5ReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5ReadWrite. + * @member {boolean|null|undefined} kerberos_5ReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5ReadWrite = null; + + /** + * SimpleExportPolicyRule kerberos_5iReadOnly. + * @member {boolean|null|undefined} kerberos_5iReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5iReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5iReadWrite. + * @member {boolean|null|undefined} kerberos_5iReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5iReadWrite = null; + + /** + * SimpleExportPolicyRule kerberos_5pReadOnly. + * @member {boolean|null|undefined} kerberos_5pReadOnly + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5pReadOnly = null; + + /** + * SimpleExportPolicyRule kerberos_5pReadWrite. + * @member {boolean|null|undefined} kerberos_5pReadWrite + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.kerberos_5pReadWrite = null; + + /** + * SimpleExportPolicyRule squashMode. + * @member {google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null|undefined} squashMode + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.squashMode = null; + + /** + * SimpleExportPolicyRule anonUid. + * @member {number|Long|null|undefined} anonUid + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + */ + SimpleExportPolicyRule.prototype.anonUid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_allowedClients", { + get: $util.oneOfGetter($oneOfFields = ["allowedClients"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_hasRootAccess", { + get: $util.oneOfGetter($oneOfFields = ["hasRootAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_accessType", { + get: $util.oneOfGetter($oneOfFields = ["accessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv3", { + get: $util.oneOfGetter($oneOfFields = ["nfsv3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv4", { + get: $util.oneOfGetter($oneOfFields = ["nfsv4"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadOnly", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadWrite", { + get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadWrite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_squashMode", { + get: $util.oneOfGetter($oneOfFields = ["squashMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SimpleExportPolicyRule.prototype, "_anonUid", { + get: $util.oneOfGetter($oneOfFields = ["anonUid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SimpleExportPolicyRule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule instance + */ + SimpleExportPolicyRule.create = function create(properties) { + return new SimpleExportPolicyRule(properties); + }; + + /** + * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleExportPolicyRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedClients != null && Object.hasOwnProperty.call(message, "allowedClients")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients); + if (message.hasRootAccess != null && Object.hasOwnProperty.call(message, "hasRootAccess")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hasRootAccess); + if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accessType); + if (message.nfsv3 != null && Object.hasOwnProperty.call(message, "nfsv3")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nfsv3); + if (message.nfsv4 != null && Object.hasOwnProperty.call(message, "nfsv4")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.nfsv4); + if (message.kerberos_5ReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5ReadOnly")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.kerberos_5ReadOnly); + if (message.kerberos_5ReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5ReadWrite")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.kerberos_5ReadWrite); + if (message.kerberos_5iReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5iReadOnly")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.kerberos_5iReadOnly); + if (message.kerberos_5iReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5iReadWrite")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.kerberos_5iReadWrite); + if (message.kerberos_5pReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5pReadOnly")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.kerberos_5pReadOnly); + if (message.kerberos_5pReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5pReadWrite")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.kerberos_5pReadWrite); + if (message.squashMode != null && Object.hasOwnProperty.call(message, "squashMode")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.squashMode); + if (message.anonUid != null && Object.hasOwnProperty.call(message, "anonUid")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.anonUid); + return writer; + }; + + /** + * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleExportPolicyRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleExportPolicyRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allowedClients = reader.string(); + break; + } + case 2: { + message.hasRootAccess = reader.string(); + break; + } + case 3: { + message.accessType = reader.int32(); + break; + } + case 4: { + message.nfsv3 = reader.bool(); + break; + } + case 5: { + message.nfsv4 = reader.bool(); + break; + } + case 6: { + message.kerberos_5ReadOnly = reader.bool(); + break; + } + case 7: { + message.kerberos_5ReadWrite = reader.bool(); + break; + } + case 8: { + message.kerberos_5iReadOnly = reader.bool(); + break; + } + case 9: { + message.kerberos_5iReadWrite = reader.bool(); + break; + } + case 10: { + message.kerberos_5pReadOnly = reader.bool(); + break; + } + case 11: { + message.kerberos_5pReadWrite = reader.bool(); + break; + } + case 12: { + message.squashMode = reader.int32(); + break; + } + case 13: { + message.anonUid = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleExportPolicyRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleExportPolicyRule message. + * @function verify + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleExportPolicyRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + properties._allowedClients = 1; + if (!$util.isString(message.allowedClients)) + return "allowedClients: string expected"; + } + if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { + properties._hasRootAccess = 1; + if (!$util.isString(message.hasRootAccess)) + return "hasRootAccess: string expected"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + properties._accessType = 1; + switch (message.accessType) { + default: + return "accessType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { + properties._nfsv3 = 1; + if (typeof message.nfsv3 !== "boolean") + return "nfsv3: boolean expected"; + } + if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { + properties._nfsv4 = 1; + if (typeof message.nfsv4 !== "boolean") + return "nfsv4: boolean expected"; + } + if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { + properties._kerberos_5ReadOnly = 1; + if (typeof message.kerberos_5ReadOnly !== "boolean") + return "kerberos_5ReadOnly: boolean expected"; + } + if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { + properties._kerberos_5ReadWrite = 1; + if (typeof message.kerberos_5ReadWrite !== "boolean") + return "kerberos_5ReadWrite: boolean expected"; + } + if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { + properties._kerberos_5iReadOnly = 1; + if (typeof message.kerberos_5iReadOnly !== "boolean") + return "kerberos_5iReadOnly: boolean expected"; + } + if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { + properties._kerberos_5iReadWrite = 1; + if (typeof message.kerberos_5iReadWrite !== "boolean") + return "kerberos_5iReadWrite: boolean expected"; + } + if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { + properties._kerberos_5pReadOnly = 1; + if (typeof message.kerberos_5pReadOnly !== "boolean") + return "kerberos_5pReadOnly: boolean expected"; + } + if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { + properties._kerberos_5pReadWrite = 1; + if (typeof message.kerberos_5pReadWrite !== "boolean") + return "kerberos_5pReadWrite: boolean expected"; + } + if (message.squashMode != null && message.hasOwnProperty("squashMode")) { + properties._squashMode = 1; + switch (message.squashMode) { + default: + return "squashMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.anonUid != null && message.hasOwnProperty("anonUid")) { + properties._anonUid = 1; + if (!$util.isInteger(message.anonUid) && !(message.anonUid && $util.isInteger(message.anonUid.low) && $util.isInteger(message.anonUid.high))) + return "anonUid: integer|Long expected"; + } + return null; + }; + + /** + * Creates a SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule + */ + SimpleExportPolicyRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SimpleExportPolicyRule) + return object; + var message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); + if (object.allowedClients != null) + message.allowedClients = String(object.allowedClients); + if (object.hasRootAccess != null) + message.hasRootAccess = String(object.hasRootAccess); + switch (object.accessType) { + default: + if (typeof object.accessType === "number") { + message.accessType = object.accessType; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.accessType = 0; + break; + case "READ_ONLY": + case 1: + message.accessType = 1; + break; + case "READ_WRITE": + case 2: + message.accessType = 2; + break; + case "READ_NONE": + case 3: + message.accessType = 3; + break; + } + if (object.nfsv3 != null) + message.nfsv3 = Boolean(object.nfsv3); + if (object.nfsv4 != null) + message.nfsv4 = Boolean(object.nfsv4); + if (object.kerberos_5ReadOnly != null) + message.kerberos_5ReadOnly = Boolean(object.kerberos_5ReadOnly); + if (object.kerberos_5ReadWrite != null) + message.kerberos_5ReadWrite = Boolean(object.kerberos_5ReadWrite); + if (object.kerberos_5iReadOnly != null) + message.kerberos_5iReadOnly = Boolean(object.kerberos_5iReadOnly); + if (object.kerberos_5iReadWrite != null) + message.kerberos_5iReadWrite = Boolean(object.kerberos_5iReadWrite); + if (object.kerberos_5pReadOnly != null) + message.kerberos_5pReadOnly = Boolean(object.kerberos_5pReadOnly); + if (object.kerberos_5pReadWrite != null) + message.kerberos_5pReadWrite = Boolean(object.kerberos_5pReadWrite); + switch (object.squashMode) { + default: + if (typeof object.squashMode === "number") { + message.squashMode = object.squashMode; + break; + } + break; + case "SQUASH_MODE_UNSPECIFIED": + case 0: + message.squashMode = 0; + break; + case "NO_ROOT_SQUASH": + case 1: + message.squashMode = 1; + break; + case "ROOT_SQUASH": + case 2: + message.squashMode = 2; + break; + case "ALL_SQUASH": + case 3: + message.squashMode = 3; + break; + } + if (object.anonUid != null) + if ($util.Long) + (message.anonUid = $util.Long.fromValue(object.anonUid)).unsigned = false; + else if (typeof object.anonUid === "string") + message.anonUid = parseInt(object.anonUid, 10); + else if (typeof object.anonUid === "number") + message.anonUid = object.anonUid; + else if (typeof object.anonUid === "object") + message.anonUid = new $util.LongBits(object.anonUid.low >>> 0, object.anonUid.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {google.cloud.netapp.v1.SimpleExportPolicyRule} message SimpleExportPolicyRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleExportPolicyRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + object.allowedClients = message.allowedClients; + if (options.oneofs) + object._allowedClients = "allowedClients"; + } + if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { + object.hasRootAccess = message.hasRootAccess; + if (options.oneofs) + object._hasRootAccess = "hasRootAccess"; + } + if (message.accessType != null && message.hasOwnProperty("accessType")) { + object.accessType = options.enums === String ? $root.google.cloud.netapp.v1.AccessType[message.accessType] === undefined ? message.accessType : $root.google.cloud.netapp.v1.AccessType[message.accessType] : message.accessType; + if (options.oneofs) + object._accessType = "accessType"; + } + if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { + object.nfsv3 = message.nfsv3; + if (options.oneofs) + object._nfsv3 = "nfsv3"; + } + if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { + object.nfsv4 = message.nfsv4; + if (options.oneofs) + object._nfsv4 = "nfsv4"; + } + if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { + object.kerberos_5ReadOnly = message.kerberos_5ReadOnly; + if (options.oneofs) + object._kerberos_5ReadOnly = "kerberos_5ReadOnly"; + } + if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { + object.kerberos_5ReadWrite = message.kerberos_5ReadWrite; + if (options.oneofs) + object._kerberos_5ReadWrite = "kerberos_5ReadWrite"; + } + if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { + object.kerberos_5iReadOnly = message.kerberos_5iReadOnly; + if (options.oneofs) + object._kerberos_5iReadOnly = "kerberos_5iReadOnly"; + } + if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { + object.kerberos_5iReadWrite = message.kerberos_5iReadWrite; + if (options.oneofs) + object._kerberos_5iReadWrite = "kerberos_5iReadWrite"; + } + if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { + object.kerberos_5pReadOnly = message.kerberos_5pReadOnly; + if (options.oneofs) + object._kerberos_5pReadOnly = "kerberos_5pReadOnly"; + } + if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { + object.kerberos_5pReadWrite = message.kerberos_5pReadWrite; + if (options.oneofs) + object._kerberos_5pReadWrite = "kerberos_5pReadWrite"; + } + if (message.squashMode != null && message.hasOwnProperty("squashMode")) { + object.squashMode = options.enums === String ? $root.google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode[message.squashMode] === undefined ? message.squashMode : $root.google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode[message.squashMode] : message.squashMode; + if (options.oneofs) + object._squashMode = "squashMode"; + } + if (message.anonUid != null && message.hasOwnProperty("anonUid")) { + if (typeof message.anonUid === "number") + object.anonUid = options.longs === String ? String(message.anonUid) : message.anonUid; + else + object.anonUid = options.longs === String ? $util.Long.prototype.toString.call(message.anonUid) : options.longs === Number ? new $util.LongBits(message.anonUid.low >>> 0, message.anonUid.high >>> 0).toNumber() : message.anonUid; + if (options.oneofs) + object._anonUid = "anonUid"; + } + return object; + }; + + /** + * Converts this SimpleExportPolicyRule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @instance + * @returns {Object.} JSON object + */ + SimpleExportPolicyRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimpleExportPolicyRule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimpleExportPolicyRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SimpleExportPolicyRule"; + }; + + /** + * SquashMode enum. + * @name google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode + * @enum {number} + * @property {number} SQUASH_MODE_UNSPECIFIED=0 SQUASH_MODE_UNSPECIFIED value + * @property {number} NO_ROOT_SQUASH=1 NO_ROOT_SQUASH value + * @property {number} ROOT_SQUASH=2 ROOT_SQUASH value + * @property {number} ALL_SQUASH=3 ALL_SQUASH value + */ + SimpleExportPolicyRule.SquashMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQUASH_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_ROOT_SQUASH"] = 1; + values[valuesById[2] = "ROOT_SQUASH"] = 2; + values[valuesById[3] = "ALL_SQUASH"] = 3; + return values; + })(); + + return SimpleExportPolicyRule; + })(); + + v1.SnapshotPolicy = (function() { + + /** + * Properties of a SnapshotPolicy. + * @memberof google.cloud.netapp.v1 + * @interface ISnapshotPolicy + * @property {boolean|null} [enabled] SnapshotPolicy enabled + * @property {google.cloud.netapp.v1.IHourlySchedule|null} [hourlySchedule] SnapshotPolicy hourlySchedule + * @property {google.cloud.netapp.v1.IDailySchedule|null} [dailySchedule] SnapshotPolicy dailySchedule + * @property {google.cloud.netapp.v1.IWeeklySchedule|null} [weeklySchedule] SnapshotPolicy weeklySchedule + * @property {google.cloud.netapp.v1.IMonthlySchedule|null} [monthlySchedule] SnapshotPolicy monthlySchedule + */ + + /** + * Constructs a new SnapshotPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SnapshotPolicy. + * @implements ISnapshotPolicy + * @constructor + * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set + */ + function SnapshotPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotPolicy enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.enabled = null; + + /** + * SnapshotPolicy hourlySchedule. + * @member {google.cloud.netapp.v1.IHourlySchedule|null|undefined} hourlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.hourlySchedule = null; + + /** + * SnapshotPolicy dailySchedule. + * @member {google.cloud.netapp.v1.IDailySchedule|null|undefined} dailySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.dailySchedule = null; + + /** + * SnapshotPolicy weeklySchedule. + * @member {google.cloud.netapp.v1.IWeeklySchedule|null|undefined} weeklySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.weeklySchedule = null; + + /** + * SnapshotPolicy monthlySchedule. + * @member {google.cloud.netapp.v1.IMonthlySchedule|null|undefined} monthlySchedule + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + */ + SnapshotPolicy.prototype.monthlySchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SnapshotPolicy.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SnapshotPolicy.prototype, "_hourlySchedule", { + get: $util.oneOfGetter($oneOfFields = ["hourlySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SnapshotPolicy.prototype, "_dailySchedule", { + get: $util.oneOfGetter($oneOfFields = ["dailySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SnapshotPolicy.prototype, "_weeklySchedule", { + get: $util.oneOfGetter($oneOfFields = ["weeklySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SnapshotPolicy.prototype, "_monthlySchedule", { + get: $util.oneOfGetter($oneOfFields = ["monthlySchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SnapshotPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy instance + */ + SnapshotPolicy.create = function create(properties) { + return new SnapshotPolicy(properties); + }; + + /** + * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.hourlySchedule != null && Object.hasOwnProperty.call(message, "hourlySchedule")) + $root.google.cloud.netapp.v1.HourlySchedule.encode(message.hourlySchedule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dailySchedule != null && Object.hasOwnProperty.call(message, "dailySchedule")) + $root.google.cloud.netapp.v1.DailySchedule.encode(message.dailySchedule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.weeklySchedule != null && Object.hasOwnProperty.call(message, "weeklySchedule")) + $root.google.cloud.netapp.v1.WeeklySchedule.encode(message.weeklySchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.monthlySchedule != null && Object.hasOwnProperty.call(message, "monthlySchedule")) + $root.google.cloud.netapp.v1.MonthlySchedule.encode(message.monthlySchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.decode(reader, reader.uint32()); + break; + } + case 4: { + message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.decode(reader, reader.uint32()); + break; + } + case 5: { + message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { + properties._hourlySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.HourlySchedule.verify(message.hourlySchedule); + if (error) + return "hourlySchedule." + error; + } + } + if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { + properties._dailySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.DailySchedule.verify(message.dailySchedule); + if (error) + return "dailySchedule." + error; + } + } + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + properties._weeklySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.WeeklySchedule.verify(message.weeklySchedule); + if (error) + return "weeklySchedule." + error; + } + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + properties._monthlySchedule = 1; + { + var error = $root.google.cloud.netapp.v1.MonthlySchedule.verify(message.monthlySchedule); + if (error) + return "monthlySchedule." + error; + } + } + return null; + }; + + /** + * Creates a SnapshotPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy + */ + SnapshotPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SnapshotPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.hourlySchedule != null) { + if (typeof object.hourlySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.hourlySchedule: object expected"); + message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.fromObject(object.hourlySchedule); + } + if (object.dailySchedule != null) { + if (typeof object.dailySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.dailySchedule: object expected"); + message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.fromObject(object.dailySchedule); + } + if (object.weeklySchedule != null) { + if (typeof object.weeklySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.weeklySchedule: object expected"); + message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.fromObject(object.weeklySchedule); + } + if (object.monthlySchedule != null) { + if (typeof object.monthlySchedule !== "object") + throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.monthlySchedule: object expected"); + message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.fromObject(object.monthlySchedule); + } + return message; + }; + + /** + * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {google.cloud.netapp.v1.SnapshotPolicy} message SnapshotPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { + object.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.toObject(message.hourlySchedule, options); + if (options.oneofs) + object._hourlySchedule = "hourlySchedule"; + } + if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { + object.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.toObject(message.dailySchedule, options); + if (options.oneofs) + object._dailySchedule = "dailySchedule"; + } + if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { + object.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.toObject(message.weeklySchedule, options); + if (options.oneofs) + object._weeklySchedule = "weeklySchedule"; + } + if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { + object.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.toObject(message.monthlySchedule, options); + if (options.oneofs) + object._monthlySchedule = "monthlySchedule"; + } + return object; + }; + + /** + * Converts this SnapshotPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @instance + * @returns {Object.} JSON object + */ + SnapshotPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnapshotPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SnapshotPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnapshotPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SnapshotPolicy"; + }; + + return SnapshotPolicy; + })(); + + v1.HourlySchedule = (function() { + + /** + * Properties of an HourlySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IHourlySchedule + * @property {number|null} [snapshotsToKeep] HourlySchedule snapshotsToKeep + * @property {number|null} [minute] HourlySchedule minute + */ + + /** + * Constructs a new HourlySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an HourlySchedule. + * @implements IHourlySchedule + * @constructor + * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set + */ + function HourlySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HourlySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + HourlySchedule.prototype.snapshotsToKeep = null; + + /** + * HourlySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + */ + HourlySchedule.prototype.minute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HourlySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HourlySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HourlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule instance + */ + HourlySchedule.create = function create(properties) { + return new HourlySchedule(properties); + }; + + /** + * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HourlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + return writer; + }; + + /** + * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HourlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HourlySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HourlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HourlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an HourlySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HourlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + return null; + }; + + /** + * Creates an HourlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule + */ + HourlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HourlySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.HourlySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + return message; + }; + + /** + * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {google.cloud.netapp.v1.HourlySchedule} message HourlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HourlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + return object; + }; + + /** + * Converts this HourlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.HourlySchedule + * @instance + * @returns {Object.} JSON object + */ + HourlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HourlySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.HourlySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HourlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.HourlySchedule"; + }; + + return HourlySchedule; + })(); + + v1.DailySchedule = (function() { + + /** + * Properties of a DailySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IDailySchedule + * @property {number|null} [snapshotsToKeep] DailySchedule snapshotsToKeep + * @property {number|null} [minute] DailySchedule minute + * @property {number|null} [hour] DailySchedule hour + */ + + /** + * Constructs a new DailySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DailySchedule. + * @implements IDailySchedule + * @constructor + * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set + */ + function DailySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DailySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.snapshotsToKeep = null; + + /** + * DailySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.minute = null; + + /** + * DailySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + */ + DailySchedule.prototype.hour = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DailySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DailySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DailySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DailySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule instance + */ + DailySchedule.create = function create(properties) { + return new DailySchedule(properties); + }; + + /** + * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + return writer; + }; + + /** + * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DailySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DailySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DailySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DailySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DailySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DailySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DailySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + return null; + }; + + /** + * Creates a DailySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule + */ + DailySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DailySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.DailySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + return message; + }; + + /** + * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {google.cloud.netapp.v1.DailySchedule} message DailySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DailySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + return object; + }; + + /** + * Converts this DailySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DailySchedule + * @instance + * @returns {Object.} JSON object + */ + DailySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DailySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DailySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DailySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DailySchedule"; + }; + + return DailySchedule; + })(); + + v1.WeeklySchedule = (function() { + + /** + * Properties of a WeeklySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IWeeklySchedule + * @property {number|null} [snapshotsToKeep] WeeklySchedule snapshotsToKeep + * @property {number|null} [minute] WeeklySchedule minute + * @property {number|null} [hour] WeeklySchedule hour + * @property {string|null} [day] WeeklySchedule day + */ + + /** + * Constructs a new WeeklySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a WeeklySchedule. + * @implements IWeeklySchedule + * @constructor + * @param {google.cloud.netapp.v1.IWeeklySchedule=} [properties] Properties to set + */ + function WeeklySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeeklySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.snapshotsToKeep = null; + + /** + * WeeklySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.minute = null; + + /** + * WeeklySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.hour = null; + + /** + * WeeklySchedule day. + * @member {string|null|undefined} day + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + */ + WeeklySchedule.prototype.day = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WeeklySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WeeklySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WeeklySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WeeklySchedule.prototype, "_day", { + get: $util.oneOfGetter($oneOfFields = ["day"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WeeklySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.v1.IWeeklySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule instance + */ + WeeklySchedule.create = function create(properties) { + return new WeeklySchedule(properties); + }; + + /** + * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.day); + return writer; + }; + + /** + * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.WeeklySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + case 4: { + message.day = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeeklySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeeklySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + if (message.day != null && message.hasOwnProperty("day")) { + properties._day = 1; + if (!$util.isString(message.day)) + return "day: string expected"; + } + return null; + }; + + /** + * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule + */ + WeeklySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.WeeklySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.WeeklySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + if (object.day != null) + message.day = String(object.day); + return message; + }; + + /** + * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {google.cloud.netapp.v1.WeeklySchedule} message WeeklySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeeklySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.day != null && message.hasOwnProperty("day")) { + object.day = message.day; + if (options.oneofs) + object._day = "day"; + } + return object; + }; + + /** + * Converts this WeeklySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @instance + * @returns {Object.} JSON object + */ + WeeklySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeeklySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.WeeklySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeeklySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.WeeklySchedule"; + }; + + return WeeklySchedule; + })(); + + v1.MonthlySchedule = (function() { + + /** + * Properties of a MonthlySchedule. + * @memberof google.cloud.netapp.v1 + * @interface IMonthlySchedule + * @property {number|null} [snapshotsToKeep] MonthlySchedule snapshotsToKeep + * @property {number|null} [minute] MonthlySchedule minute + * @property {number|null} [hour] MonthlySchedule hour + * @property {string|null} [daysOfMonth] MonthlySchedule daysOfMonth + */ + + /** + * Constructs a new MonthlySchedule. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a MonthlySchedule. + * @implements IMonthlySchedule + * @constructor + * @param {google.cloud.netapp.v1.IMonthlySchedule=} [properties] Properties to set + */ + function MonthlySchedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MonthlySchedule snapshotsToKeep. + * @member {number|null|undefined} snapshotsToKeep + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.snapshotsToKeep = null; + + /** + * MonthlySchedule minute. + * @member {number|null|undefined} minute + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.minute = null; + + /** + * MonthlySchedule hour. + * @member {number|null|undefined} hour + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.hour = null; + + /** + * MonthlySchedule daysOfMonth. + * @member {string|null|undefined} daysOfMonth + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + */ + MonthlySchedule.prototype.daysOfMonth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MonthlySchedule.prototype, "_snapshotsToKeep", { + get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MonthlySchedule.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MonthlySchedule.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MonthlySchedule.prototype, "_daysOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["daysOfMonth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MonthlySchedule instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.v1.IMonthlySchedule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule instance + */ + MonthlySchedule.create = function create(properties) { + return new MonthlySchedule(properties); + }; + + /** + * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); + if (message.daysOfMonth != null && Object.hasOwnProperty.call(message, "daysOfMonth")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.daysOfMonth); + return writer; + }; + + /** + * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.MonthlySchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotsToKeep = reader.double(); + break; + } + case 2: { + message.minute = reader.double(); + break; + } + case 3: { + message.hour = reader.double(); + break; + } + case 4: { + message.daysOfMonth = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonthlySchedule message. + * @function verify + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonthlySchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + properties._snapshotsToKeep = 1; + if (typeof message.snapshotsToKeep !== "number") + return "snapshotsToKeep: number expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (typeof message.minute !== "number") + return "minute: number expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (typeof message.hour !== "number") + return "hour: number expected"; + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + properties._daysOfMonth = 1; + if (!$util.isString(message.daysOfMonth)) + return "daysOfMonth: string expected"; + } + return null; + }; + + /** + * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule + */ + MonthlySchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.MonthlySchedule) + return object; + var message = new $root.google.cloud.netapp.v1.MonthlySchedule(); + if (object.snapshotsToKeep != null) + message.snapshotsToKeep = Number(object.snapshotsToKeep); + if (object.minute != null) + message.minute = Number(object.minute); + if (object.hour != null) + message.hour = Number(object.hour); + if (object.daysOfMonth != null) + message.daysOfMonth = String(object.daysOfMonth); + return message; + }; + + /** + * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {google.cloud.netapp.v1.MonthlySchedule} message MonthlySchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonthlySchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { + object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; + if (options.oneofs) + object._snapshotsToKeep = "snapshotsToKeep"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + object.daysOfMonth = message.daysOfMonth; + if (options.oneofs) + object._daysOfMonth = "daysOfMonth"; + } + return object; + }; + + /** + * Converts this MonthlySchedule to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @instance + * @returns {Object.} JSON object + */ + MonthlySchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonthlySchedule + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.MonthlySchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonthlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.MonthlySchedule"; + }; + + return MonthlySchedule; + })(); + + v1.MountOption = (function() { + + /** + * Properties of a MountOption. + * @memberof google.cloud.netapp.v1 + * @interface IMountOption + * @property {string|null} ["export"] MountOption export + * @property {string|null} [exportFull] MountOption exportFull + * @property {google.cloud.netapp.v1.Protocols|null} [protocol] MountOption protocol + * @property {string|null} [instructions] MountOption instructions + * @property {string|null} [ipAddress] MountOption ipAddress + */ + + /** + * Constructs a new MountOption. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a MountOption. + * @implements IMountOption + * @constructor + * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set + */ + function MountOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MountOption export. + * @member {string} export + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype["export"] = ""; + + /** + * MountOption exportFull. + * @member {string} exportFull + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.exportFull = ""; + + /** + * MountOption protocol. + * @member {google.cloud.netapp.v1.Protocols} protocol + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.protocol = 0; + + /** + * MountOption instructions. + * @member {string} instructions + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.instructions = ""; + + /** + * MountOption ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.netapp.v1.MountOption + * @instance + */ + MountOption.prototype.ipAddress = ""; + + /** + * Creates a new MountOption instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.MountOption} MountOption instance + */ + MountOption.create = function create(properties) { + return new MountOption(properties); + }; + + /** + * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MountOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["export"] != null && Object.hasOwnProperty.call(message, "export")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["export"]); + if (message.exportFull != null && Object.hasOwnProperty.call(message, "exportFull")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exportFull); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.protocol); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instructions); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MountOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MountOption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.MountOption} MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MountOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.MountOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message["export"] = reader.string(); + break; + } + case 2: { + message.exportFull = reader.string(); + break; + } + case 3: { + message.protocol = reader.int32(); + break; + } + case 4: { + message.instructions = reader.string(); + break; + } + case 5: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MountOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.MountOption} MountOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MountOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MountOption message. + * @function verify + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MountOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["export"] != null && message.hasOwnProperty("export")) + if (!$util.isString(message["export"])) + return "export: string expected"; + if (message.exportFull != null && message.hasOwnProperty("exportFull")) + if (!$util.isString(message.exportFull)) + return "exportFull: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + switch (message.protocol) { + default: + return "protocol: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a MountOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.MountOption} MountOption + */ + MountOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.MountOption) + return object; + var message = new $root.google.cloud.netapp.v1.MountOption(); + if (object["export"] != null) + message["export"] = String(object["export"]); + if (object.exportFull != null) + message.exportFull = String(object.exportFull); + switch (object.protocol) { + default: + if (typeof object.protocol === "number") { + message.protocol = object.protocol; + break; + } + break; + case "PROTOCOLS_UNSPECIFIED": + case 0: + message.protocol = 0; + break; + case "NFSV3": + case 1: + message.protocol = 1; + break; + case "NFSV4": + case 2: + message.protocol = 2; + break; + case "SMB": + case 3: + message.protocol = 3; + break; + case "ISCSI": + case 4: + message.protocol = 4; + break; + } + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a MountOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {google.cloud.netapp.v1.MountOption} message MountOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MountOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["export"] = ""; + object.exportFull = ""; + object.protocol = options.enums === String ? "PROTOCOLS_UNSPECIFIED" : 0; + object.instructions = ""; + object.ipAddress = ""; + } + if (message["export"] != null && message.hasOwnProperty("export")) + object["export"] = message["export"]; + if (message.exportFull != null && message.hasOwnProperty("exportFull")) + object.exportFull = message.exportFull; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocol] === undefined ? message.protocol : $root.google.cloud.netapp.v1.Protocols[message.protocol] : message.protocol; + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this MountOption to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.MountOption + * @instance + * @returns {Object.} JSON object + */ + MountOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MountOption + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.MountOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MountOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.MountOption"; + }; + + return MountOption; + })(); + + v1.RestoreParameters = (function() { + + /** + * Properties of a RestoreParameters. + * @memberof google.cloud.netapp.v1 + * @interface IRestoreParameters + * @property {string|null} [sourceSnapshot] RestoreParameters sourceSnapshot + * @property {string|null} [sourceBackup] RestoreParameters sourceBackup + */ + + /** + * Constructs a new RestoreParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RestoreParameters. + * @implements IRestoreParameters + * @constructor + * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set + */ + function RestoreParameters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreParameters sourceSnapshot. + * @member {string|null|undefined} sourceSnapshot + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + */ + RestoreParameters.prototype.sourceSnapshot = null; + + /** + * RestoreParameters sourceBackup. + * @member {string|null|undefined} sourceBackup + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + */ + RestoreParameters.prototype.sourceBackup = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreParameters source. + * @member {"sourceSnapshot"|"sourceBackup"|undefined} source + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + */ + Object.defineProperty(RestoreParameters.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot", "sourceBackup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters instance + */ + RestoreParameters.create = function create(properties) { + return new RestoreParameters(properties); + }; + + /** + * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); + if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceBackup); + return writer; + }; + + /** + * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreParameters.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreParameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceSnapshot = reader.string(); + break; + } + case 2: { + message.sourceBackup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + properties.source = 1; + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + } + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.sourceBackup)) + return "sourceBackup: string expected"; + } + return null; + }; + + /** + * Creates a RestoreParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters + */ + RestoreParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RestoreParameters) + return object; + var message = new $root.google.cloud.netapp.v1.RestoreParameters(); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + if (object.sourceBackup != null) + message.sourceBackup = String(object.sourceBackup); + return message; + }; + + /** + * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {google.cloud.netapp.v1.RestoreParameters} message RestoreParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { + object.sourceSnapshot = message.sourceSnapshot; + if (options.oneofs) + object.source = "sourceSnapshot"; + } + if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) { + object.sourceBackup = message.sourceBackup; + if (options.oneofs) + object.source = "sourceBackup"; + } + return object; + }; + + /** + * Converts this RestoreParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RestoreParameters + * @instance + * @returns {Object.} JSON object + */ + RestoreParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RestoreParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreParameters"; + }; + + return RestoreParameters; + })(); + + v1.BackupConfig = (function() { + + /** + * Properties of a BackupConfig. + * @memberof google.cloud.netapp.v1 + * @interface IBackupConfig + * @property {Array.|null} [backupPolicies] BackupConfig backupPolicies + * @property {string|null} [backupVault] BackupConfig backupVault + * @property {boolean|null} [scheduledBackupEnabled] BackupConfig scheduledBackupEnabled + * @property {number|Long|null} [backupChainBytes] BackupConfig backupChainBytes + */ + + /** + * Constructs a new BackupConfig. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a BackupConfig. + * @implements IBackupConfig + * @constructor + * @param {google.cloud.netapp.v1.IBackupConfig=} [properties] Properties to set + */ + function BackupConfig(properties) { + this.backupPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupConfig backupPolicies. + * @member {Array.} backupPolicies + * @memberof google.cloud.netapp.v1.BackupConfig + * @instance + */ + BackupConfig.prototype.backupPolicies = $util.emptyArray; + + /** + * BackupConfig backupVault. + * @member {string} backupVault + * @memberof google.cloud.netapp.v1.BackupConfig + * @instance + */ + BackupConfig.prototype.backupVault = ""; + + /** + * BackupConfig scheduledBackupEnabled. + * @member {boolean|null|undefined} scheduledBackupEnabled + * @memberof google.cloud.netapp.v1.BackupConfig + * @instance + */ + BackupConfig.prototype.scheduledBackupEnabled = null; + + /** + * BackupConfig backupChainBytes. + * @member {number|Long|null|undefined} backupChainBytes + * @memberof google.cloud.netapp.v1.BackupConfig + * @instance + */ + BackupConfig.prototype.backupChainBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupConfig.prototype, "_scheduledBackupEnabled", { + get: $util.oneOfGetter($oneOfFields = ["scheduledBackupEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupConfig.prototype, "_backupChainBytes", { + get: $util.oneOfGetter($oneOfFields = ["backupChainBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {google.cloud.netapp.v1.IBackupConfig=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig instance + */ + BackupConfig.create = function create(properties) { + return new BackupConfig(properties); + }; + + /** + * Encodes the specified BackupConfig message. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {google.cloud.netapp.v1.IBackupConfig} message BackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPolicies != null && message.backupPolicies.length) + for (var i = 0; i < message.backupPolicies.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPolicies[i]); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVault); + if (message.scheduledBackupEnabled != null && Object.hasOwnProperty.call(message, "scheduledBackupEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.scheduledBackupEnabled); + if (message.backupChainBytes != null && Object.hasOwnProperty.call(message, "backupChainBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.backupChainBytes); + return writer; + }; + + /** + * Encodes the specified BackupConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {google.cloud.netapp.v1.IBackupConfig} message BackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.backupPolicies && message.backupPolicies.length)) + message.backupPolicies = []; + message.backupPolicies.push(reader.string()); + break; + } + case 2: { + message.backupVault = reader.string(); + break; + } + case 3: { + message.scheduledBackupEnabled = reader.bool(); + break; + } + case 4: { + message.backupChainBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupConfig message. + * @function verify + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupPolicies != null && message.hasOwnProperty("backupPolicies")) { + if (!Array.isArray(message.backupPolicies)) + return "backupPolicies: array expected"; + for (var i = 0; i < message.backupPolicies.length; ++i) + if (!$util.isString(message.backupPolicies[i])) + return "backupPolicies: string[] expected"; + } + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + if (!$util.isString(message.backupVault)) + return "backupVault: string expected"; + if (message.scheduledBackupEnabled != null && message.hasOwnProperty("scheduledBackupEnabled")) { + properties._scheduledBackupEnabled = 1; + if (typeof message.scheduledBackupEnabled !== "boolean") + return "scheduledBackupEnabled: boolean expected"; + } + if (message.backupChainBytes != null && message.hasOwnProperty("backupChainBytes")) { + properties._backupChainBytes = 1; + if (!$util.isInteger(message.backupChainBytes) && !(message.backupChainBytes && $util.isInteger(message.backupChainBytes.low) && $util.isInteger(message.backupChainBytes.high))) + return "backupChainBytes: integer|Long expected"; + } + return null; + }; + + /** + * Creates a BackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig + */ + BackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.BackupConfig) + return object; + var message = new $root.google.cloud.netapp.v1.BackupConfig(); + if (object.backupPolicies) { + if (!Array.isArray(object.backupPolicies)) + throw TypeError(".google.cloud.netapp.v1.BackupConfig.backupPolicies: array expected"); + message.backupPolicies = []; + for (var i = 0; i < object.backupPolicies.length; ++i) + message.backupPolicies[i] = String(object.backupPolicies[i]); + } + if (object.backupVault != null) + message.backupVault = String(object.backupVault); + if (object.scheduledBackupEnabled != null) + message.scheduledBackupEnabled = Boolean(object.scheduledBackupEnabled); + if (object.backupChainBytes != null) + if ($util.Long) + (message.backupChainBytes = $util.Long.fromValue(object.backupChainBytes)).unsigned = false; + else if (typeof object.backupChainBytes === "string") + message.backupChainBytes = parseInt(object.backupChainBytes, 10); + else if (typeof object.backupChainBytes === "number") + message.backupChainBytes = object.backupChainBytes; + else if (typeof object.backupChainBytes === "object") + message.backupChainBytes = new $util.LongBits(object.backupChainBytes.low >>> 0, object.backupChainBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {google.cloud.netapp.v1.BackupConfig} message BackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupPolicies = []; + if (options.defaults) + object.backupVault = ""; + if (message.backupPolicies && message.backupPolicies.length) { + object.backupPolicies = []; + for (var j = 0; j < message.backupPolicies.length; ++j) + object.backupPolicies[j] = message.backupPolicies[j]; + } + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = message.backupVault; + if (message.scheduledBackupEnabled != null && message.hasOwnProperty("scheduledBackupEnabled")) { + object.scheduledBackupEnabled = message.scheduledBackupEnabled; + if (options.oneofs) + object._scheduledBackupEnabled = "scheduledBackupEnabled"; + } + if (message.backupChainBytes != null && message.hasOwnProperty("backupChainBytes")) { + if (typeof message.backupChainBytes === "number") + object.backupChainBytes = options.longs === String ? String(message.backupChainBytes) : message.backupChainBytes; + else + object.backupChainBytes = options.longs === String ? $util.Long.prototype.toString.call(message.backupChainBytes) : options.longs === Number ? new $util.LongBits(message.backupChainBytes.low >>> 0, message.backupChainBytes.high >>> 0).toNumber() : message.backupChainBytes; + if (options.oneofs) + object._backupChainBytes = "backupChainBytes"; + } + return object; + }; + + /** + * Converts this BackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.BackupConfig + * @instance + * @returns {Object.} JSON object + */ + BackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupConfig + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.BackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.BackupConfig"; + }; + + return BackupConfig; + })(); + + v1.TieringPolicy = (function() { + + /** + * Properties of a TieringPolicy. + * @memberof google.cloud.netapp.v1 + * @interface ITieringPolicy + * @property {google.cloud.netapp.v1.TieringPolicy.TierAction|null} [tierAction] TieringPolicy tierAction + * @property {number|null} [coolingThresholdDays] TieringPolicy coolingThresholdDays + * @property {boolean|null} [hotTierBypassModeEnabled] TieringPolicy hotTierBypassModeEnabled + */ + + /** + * Constructs a new TieringPolicy. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a TieringPolicy. + * @implements ITieringPolicy + * @constructor + * @param {google.cloud.netapp.v1.ITieringPolicy=} [properties] Properties to set + */ + function TieringPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TieringPolicy tierAction. + * @member {google.cloud.netapp.v1.TieringPolicy.TierAction|null|undefined} tierAction + * @memberof google.cloud.netapp.v1.TieringPolicy + * @instance + */ + TieringPolicy.prototype.tierAction = null; + + /** + * TieringPolicy coolingThresholdDays. + * @member {number|null|undefined} coolingThresholdDays + * @memberof google.cloud.netapp.v1.TieringPolicy + * @instance + */ + TieringPolicy.prototype.coolingThresholdDays = null; + + /** + * TieringPolicy hotTierBypassModeEnabled. + * @member {boolean|null|undefined} hotTierBypassModeEnabled + * @memberof google.cloud.netapp.v1.TieringPolicy + * @instance + */ + TieringPolicy.prototype.hotTierBypassModeEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TieringPolicy.prototype, "_tierAction", { + get: $util.oneOfGetter($oneOfFields = ["tierAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TieringPolicy.prototype, "_coolingThresholdDays", { + get: $util.oneOfGetter($oneOfFields = ["coolingThresholdDays"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TieringPolicy.prototype, "_hotTierBypassModeEnabled", { + get: $util.oneOfGetter($oneOfFields = ["hotTierBypassModeEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TieringPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {google.cloud.netapp.v1.ITieringPolicy=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy instance + */ + TieringPolicy.create = function create(properties) { + return new TieringPolicy(properties); + }; + + /** + * Encodes the specified TieringPolicy message. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {google.cloud.netapp.v1.ITieringPolicy} message TieringPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieringPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tierAction != null && Object.hasOwnProperty.call(message, "tierAction")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tierAction); + if (message.coolingThresholdDays != null && Object.hasOwnProperty.call(message, "coolingThresholdDays")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.coolingThresholdDays); + if (message.hotTierBypassModeEnabled != null && Object.hasOwnProperty.call(message, "hotTierBypassModeEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hotTierBypassModeEnabled); + return writer; + }; + + /** + * Encodes the specified TieringPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {google.cloud.netapp.v1.ITieringPolicy} message TieringPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TieringPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TieringPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieringPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TieringPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tierAction = reader.int32(); + break; + } + case 2: { + message.coolingThresholdDays = reader.int32(); + break; + } + case 3: { + message.hotTierBypassModeEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TieringPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TieringPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TieringPolicy message. + * @function verify + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TieringPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tierAction != null && message.hasOwnProperty("tierAction")) { + properties._tierAction = 1; + switch (message.tierAction) { + default: + return "tierAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.coolingThresholdDays != null && message.hasOwnProperty("coolingThresholdDays")) { + properties._coolingThresholdDays = 1; + if (!$util.isInteger(message.coolingThresholdDays)) + return "coolingThresholdDays: integer expected"; + } + if (message.hotTierBypassModeEnabled != null && message.hasOwnProperty("hotTierBypassModeEnabled")) { + properties._hotTierBypassModeEnabled = 1; + if (typeof message.hotTierBypassModeEnabled !== "boolean") + return "hotTierBypassModeEnabled: boolean expected"; + } + return null; + }; + + /** + * Creates a TieringPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy + */ + TieringPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.TieringPolicy) + return object; + var message = new $root.google.cloud.netapp.v1.TieringPolicy(); + switch (object.tierAction) { + default: + if (typeof object.tierAction === "number") { + message.tierAction = object.tierAction; + break; + } + break; + case "TIER_ACTION_UNSPECIFIED": + case 0: + message.tierAction = 0; + break; + case "ENABLED": + case 1: + message.tierAction = 1; + break; + case "PAUSED": + case 2: + message.tierAction = 2; + break; + } + if (object.coolingThresholdDays != null) + message.coolingThresholdDays = object.coolingThresholdDays | 0; + if (object.hotTierBypassModeEnabled != null) + message.hotTierBypassModeEnabled = Boolean(object.hotTierBypassModeEnabled); + return message; + }; + + /** + * Creates a plain object from a TieringPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {google.cloud.netapp.v1.TieringPolicy} message TieringPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TieringPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.tierAction != null && message.hasOwnProperty("tierAction")) { + object.tierAction = options.enums === String ? $root.google.cloud.netapp.v1.TieringPolicy.TierAction[message.tierAction] === undefined ? message.tierAction : $root.google.cloud.netapp.v1.TieringPolicy.TierAction[message.tierAction] : message.tierAction; + if (options.oneofs) + object._tierAction = "tierAction"; + } + if (message.coolingThresholdDays != null && message.hasOwnProperty("coolingThresholdDays")) { + object.coolingThresholdDays = message.coolingThresholdDays; + if (options.oneofs) + object._coolingThresholdDays = "coolingThresholdDays"; + } + if (message.hotTierBypassModeEnabled != null && message.hasOwnProperty("hotTierBypassModeEnabled")) { + object.hotTierBypassModeEnabled = message.hotTierBypassModeEnabled; + if (options.oneofs) + object._hotTierBypassModeEnabled = "hotTierBypassModeEnabled"; + } + return object; + }; + + /** + * Converts this TieringPolicy to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.TieringPolicy + * @instance + * @returns {Object.} JSON object + */ + TieringPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TieringPolicy + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.TieringPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TieringPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.TieringPolicy"; + }; + + /** + * TierAction enum. + * @name google.cloud.netapp.v1.TieringPolicy.TierAction + * @enum {number} + * @property {number} TIER_ACTION_UNSPECIFIED=0 TIER_ACTION_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} PAUSED=2 PAUSED value + */ + TieringPolicy.TierAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "PAUSED"] = 2; + return values; + })(); + + return TieringPolicy; + })(); + + v1.HybridReplicationParameters = (function() { + + /** + * Properties of a HybridReplicationParameters. + * @memberof google.cloud.netapp.v1 + * @interface IHybridReplicationParameters + * @property {string|null} [replication] HybridReplicationParameters replication + * @property {string|null} [peerVolumeName] HybridReplicationParameters peerVolumeName + * @property {string|null} [peerClusterName] HybridReplicationParameters peerClusterName + * @property {string|null} [peerSvmName] HybridReplicationParameters peerSvmName + * @property {Array.|null} [peerIpAddresses] HybridReplicationParameters peerIpAddresses + * @property {string|null} [clusterLocation] HybridReplicationParameters clusterLocation + * @property {string|null} [description] HybridReplicationParameters description + * @property {Object.|null} [labels] HybridReplicationParameters labels + * @property {google.cloud.netapp.v1.HybridReplicationSchedule|null} [replicationSchedule] HybridReplicationParameters replicationSchedule + * @property {google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|null} [hybridReplicationType] HybridReplicationParameters hybridReplicationType + * @property {number|null} [largeVolumeConstituentCount] HybridReplicationParameters largeVolumeConstituentCount + */ + + /** + * Constructs a new HybridReplicationParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a HybridReplicationParameters. + * @implements IHybridReplicationParameters + * @constructor + * @param {google.cloud.netapp.v1.IHybridReplicationParameters=} [properties] Properties to set + */ + function HybridReplicationParameters(properties) { + this.peerIpAddresses = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridReplicationParameters replication. + * @member {string} replication + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.replication = ""; + + /** + * HybridReplicationParameters peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.peerVolumeName = ""; + + /** + * HybridReplicationParameters peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.peerClusterName = ""; + + /** + * HybridReplicationParameters peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.peerSvmName = ""; + + /** + * HybridReplicationParameters peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.peerIpAddresses = $util.emptyArray; + + /** + * HybridReplicationParameters clusterLocation. + * @member {string} clusterLocation + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.clusterLocation = ""; + + /** + * HybridReplicationParameters description. + * @member {string} description + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.description = ""; + + /** + * HybridReplicationParameters labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.labels = $util.emptyObject; + + /** + * HybridReplicationParameters replicationSchedule. + * @member {google.cloud.netapp.v1.HybridReplicationSchedule} replicationSchedule + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.replicationSchedule = 0; + + /** + * HybridReplicationParameters hybridReplicationType. + * @member {google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType} hybridReplicationType + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.hybridReplicationType = 0; + + /** + * HybridReplicationParameters largeVolumeConstituentCount. + * @member {number} largeVolumeConstituentCount + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + */ + HybridReplicationParameters.prototype.largeVolumeConstituentCount = 0; + + /** + * Creates a new HybridReplicationParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {google.cloud.netapp.v1.IHybridReplicationParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters instance + */ + HybridReplicationParameters.create = function create(properties) { + return new HybridReplicationParameters(properties); + }; + + /** + * Encodes the specified HybridReplicationParameters message. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {google.cloud.netapp.v1.IHybridReplicationParameters} message HybridReplicationParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridReplicationParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.replication); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerVolumeName); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerIpAddresses[i]); + if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.clusterLocation); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.replicationSchedule); + if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.hybridReplicationType); + if (message.largeVolumeConstituentCount != null && Object.hasOwnProperty.call(message, "largeVolumeConstituentCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.largeVolumeConstituentCount); + return writer; + }; + + /** + * Encodes the specified HybridReplicationParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {google.cloud.netapp.v1.IHybridReplicationParameters} message HybridReplicationParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridReplicationParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridReplicationParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridReplicationParameters.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridReplicationParameters(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.replication = reader.string(); + break; + } + case 2: { + message.peerVolumeName = reader.string(); + break; + } + case 3: { + message.peerClusterName = reader.string(); + break; + } + case 4: { + message.peerSvmName = reader.string(); + break; + } + case 5: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 6: { + message.clusterLocation = reader.string(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 9: { + message.replicationSchedule = reader.int32(); + break; + } + case 10: { + message.hybridReplicationType = reader.int32(); + break; + } + case 11: { + message.largeVolumeConstituentCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HybridReplicationParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridReplicationParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridReplicationParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridReplicationParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replication != null && message.hasOwnProperty("replication")) + if (!$util.isString(message.replication)) + return "replication: string expected"; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + if (!$util.isString(message.clusterLocation)) + return "clusterLocation: 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + switch (message.replicationSchedule) { + default: + return "replicationSchedule: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + switch (message.hybridReplicationType) { + default: + return "hybridReplicationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.largeVolumeConstituentCount != null && message.hasOwnProperty("largeVolumeConstituentCount")) + if (!$util.isInteger(message.largeVolumeConstituentCount)) + return "largeVolumeConstituentCount: integer expected"; + return null; + }; + + /** + * Creates a HybridReplicationParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters + */ + HybridReplicationParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HybridReplicationParameters) + return object; + var message = new $root.google.cloud.netapp.v1.HybridReplicationParameters(); + if (object.replication != null) + message.replication = String(object.replication); + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.HybridReplicationParameters.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.clusterLocation != null) + message.clusterLocation = String(object.clusterLocation); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.HybridReplicationParameters.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.replicationSchedule) { + default: + if (typeof object.replicationSchedule === "number") { + message.replicationSchedule = object.replicationSchedule; + break; + } + break; + case "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED": + case 0: + message.replicationSchedule = 0; + break; + case "EVERY_10_MINUTES": + case 1: + message.replicationSchedule = 1; + break; + case "HOURLY": + case 2: + message.replicationSchedule = 2; + break; + case "DAILY": + case 3: + message.replicationSchedule = 3; + break; + } + switch (object.hybridReplicationType) { + default: + if (typeof object.hybridReplicationType === "number") { + message.hybridReplicationType = object.hybridReplicationType; + break; + } + break; + case "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED": + case 0: + message.hybridReplicationType = 0; + break; + case "MIGRATION": + case 1: + message.hybridReplicationType = 1; + break; + case "CONTINUOUS_REPLICATION": + case 2: + message.hybridReplicationType = 2; + break; + case "ONPREM_REPLICATION": + case 3: + message.hybridReplicationType = 3; + break; + case "REVERSE_ONPREM_REPLICATION": + case 4: + message.hybridReplicationType = 4; + break; + } + if (object.largeVolumeConstituentCount != null) + message.largeVolumeConstituentCount = object.largeVolumeConstituentCount | 0; + return message; + }; + + /** + * Creates a plain object from a HybridReplicationParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {google.cloud.netapp.v1.HybridReplicationParameters} message HybridReplicationParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridReplicationParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.replication = ""; + object.peerVolumeName = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.clusterLocation = ""; + object.description = ""; + object.replicationSchedule = options.enums === String ? "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED" : 0; + object.hybridReplicationType = options.enums === String ? "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; + object.largeVolumeConstituentCount = 0; + } + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = message.replication; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + object.clusterLocation = message.clusterLocation; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.HybridReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.HybridReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; + if (message.largeVolumeConstituentCount != null && message.hasOwnProperty("largeVolumeConstituentCount")) + object.largeVolumeConstituentCount = message.largeVolumeConstituentCount; + return object; + }; + + /** + * Converts this HybridReplicationParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @instance + * @returns {Object.} JSON object + */ + HybridReplicationParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridReplicationParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.HybridReplicationParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridReplicationParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.HybridReplicationParameters"; + }; + + /** + * VolumeHybridReplicationType enum. + * @name google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType + * @enum {number} + * @property {number} VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED value + * @property {number} MIGRATION=1 MIGRATION value + * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value + * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value + * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value + */ + HybridReplicationParameters.VolumeHybridReplicationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MIGRATION"] = 1; + values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; + values[valuesById[3] = "ONPREM_REPLICATION"] = 3; + values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; + return values; + })(); + + return HybridReplicationParameters; + })(); + + v1.CacheParameters = (function() { + + /** + * Properties of a CacheParameters. + * @memberof google.cloud.netapp.v1 + * @interface ICacheParameters + * @property {string|null} [peerVolumeName] CacheParameters peerVolumeName + * @property {string|null} [peerClusterName] CacheParameters peerClusterName + * @property {string|null} [peerSvmName] CacheParameters peerSvmName + * @property {Array.|null} [peerIpAddresses] CacheParameters peerIpAddresses + * @property {boolean|null} [enableGlobalFileLock] CacheParameters enableGlobalFileLock + * @property {google.cloud.netapp.v1.ICacheConfig|null} [cacheConfig] CacheParameters cacheConfig + * @property {google.cloud.netapp.v1.CacheParameters.CacheState|null} [cacheState] CacheParameters cacheState + * @property {string|null} [command] CacheParameters command + * @property {google.protobuf.ITimestamp|null} [peeringCommandExpiryTime] CacheParameters peeringCommandExpiryTime + * @property {string|null} [passphrase] CacheParameters passphrase + * @property {string|null} [stateDetails] CacheParameters stateDetails + */ + + /** + * Constructs a new CacheParameters. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CacheParameters. + * @implements ICacheParameters + * @constructor + * @param {google.cloud.netapp.v1.ICacheParameters=} [properties] Properties to set + */ + function CacheParameters(properties) { + this.peerIpAddresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CacheParameters peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.peerVolumeName = ""; + + /** + * CacheParameters peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.peerClusterName = ""; + + /** + * CacheParameters peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.peerSvmName = ""; + + /** + * CacheParameters peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.peerIpAddresses = $util.emptyArray; + + /** + * CacheParameters enableGlobalFileLock. + * @member {boolean|null|undefined} enableGlobalFileLock + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.enableGlobalFileLock = null; + + /** + * CacheParameters cacheConfig. + * @member {google.cloud.netapp.v1.ICacheConfig|null|undefined} cacheConfig + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.cacheConfig = null; + + /** + * CacheParameters cacheState. + * @member {google.cloud.netapp.v1.CacheParameters.CacheState} cacheState + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.cacheState = 0; + + /** + * CacheParameters command. + * @member {string} command + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.command = ""; + + /** + * CacheParameters peeringCommandExpiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} peeringCommandExpiryTime + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.peeringCommandExpiryTime = null; + + /** + * CacheParameters passphrase. + * @member {string} passphrase + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.passphrase = ""; + + /** + * CacheParameters stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + */ + CacheParameters.prototype.stateDetails = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CacheParameters.prototype, "_enableGlobalFileLock", { + get: $util.oneOfGetter($oneOfFields = ["enableGlobalFileLock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CacheParameters instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {google.cloud.netapp.v1.ICacheParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters instance + */ + CacheParameters.create = function create(properties) { + return new CacheParameters(properties); + }; + + /** + * Encodes the specified CacheParameters message. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {google.cloud.netapp.v1.ICacheParameters} message CacheParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheParameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.peerVolumeName); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); + if (message.enableGlobalFileLock != null && Object.hasOwnProperty.call(message, "enableGlobalFileLock")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableGlobalFileLock); + if (message.cacheConfig != null && Object.hasOwnProperty.call(message, "cacheConfig")) + $root.google.cloud.netapp.v1.CacheConfig.encode(message.cacheConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cacheState != null && Object.hasOwnProperty.call(message, "cacheState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.cacheState); + if (message.command != null && Object.hasOwnProperty.call(message, "command")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.command); + if (message.peeringCommandExpiryTime != null && Object.hasOwnProperty.call(message, "peeringCommandExpiryTime")) + $root.google.protobuf.Timestamp.encode(message.peeringCommandExpiryTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.passphrase); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.stateDetails); + return writer; + }; + + /** + * Encodes the specified CacheParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {google.cloud.netapp.v1.ICacheParameters} message CacheParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheParameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CacheParameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheParameters.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CacheParameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.peerVolumeName = reader.string(); + break; + } + case 2: { + message.peerClusterName = reader.string(); + break; + } + case 3: { + message.peerSvmName = reader.string(); + break; + } + case 4: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 5: { + message.enableGlobalFileLock = reader.bool(); + break; + } + case 6: { + message.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.cacheState = reader.int32(); + break; + } + case 8: { + message.command = reader.string(); + break; + } + case 9: { + message.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.passphrase = reader.string(); + break; + } + case 12: { + message.stateDetails = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CacheParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheParameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CacheParameters message. + * @function verify + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CacheParameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.enableGlobalFileLock != null && message.hasOwnProperty("enableGlobalFileLock")) { + properties._enableGlobalFileLock = 1; + if (typeof message.enableGlobalFileLock !== "boolean") + return "enableGlobalFileLock: boolean expected"; + } + if (message.cacheConfig != null && message.hasOwnProperty("cacheConfig")) { + var error = $root.google.cloud.netapp.v1.CacheConfig.verify(message.cacheConfig); + if (error) + return "cacheConfig." + error; + } + if (message.cacheState != null && message.hasOwnProperty("cacheState")) + switch (message.cacheState) { + default: + return "cacheState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.command != null && message.hasOwnProperty("command")) + if (!$util.isString(message.command)) + return "command: string expected"; + if (message.peeringCommandExpiryTime != null && message.hasOwnProperty("peeringCommandExpiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.peeringCommandExpiryTime); + if (error) + return "peeringCommandExpiryTime." + error; + } + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + if (!$util.isString(message.passphrase)) + return "passphrase: string expected"; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + return null; + }; + + /** + * Creates a CacheParameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters + */ + CacheParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CacheParameters) + return object; + var message = new $root.google.cloud.netapp.v1.CacheParameters(); + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.CacheParameters.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.enableGlobalFileLock != null) + message.enableGlobalFileLock = Boolean(object.enableGlobalFileLock); + if (object.cacheConfig != null) { + if (typeof object.cacheConfig !== "object") + throw TypeError(".google.cloud.netapp.v1.CacheParameters.cacheConfig: object expected"); + message.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.fromObject(object.cacheConfig); + } + switch (object.cacheState) { + default: + if (typeof object.cacheState === "number") { + message.cacheState = object.cacheState; + break; + } + break; + case "CACHE_STATE_UNSPECIFIED": + case 0: + message.cacheState = 0; + break; + case "PENDING_CLUSTER_PEERING": + case 1: + message.cacheState = 1; + break; + case "PENDING_SVM_PEERING": + case 2: + message.cacheState = 2; + break; + case "PEERED": + case 3: + message.cacheState = 3; + break; + case "ERROR": + case 4: + message.cacheState = 4; + break; + } + if (object.command != null) + message.command = String(object.command); + if (object.peeringCommandExpiryTime != null) { + if (typeof object.peeringCommandExpiryTime !== "object") + throw TypeError(".google.cloud.netapp.v1.CacheParameters.peeringCommandExpiryTime: object expected"); + message.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.peeringCommandExpiryTime); + } + if (object.passphrase != null) + message.passphrase = String(object.passphrase); + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + return message; + }; + + /** + * Creates a plain object from a CacheParameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {google.cloud.netapp.v1.CacheParameters} message CacheParameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CacheParameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; + if (options.defaults) { + object.peerVolumeName = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.cacheConfig = null; + object.cacheState = options.enums === String ? "CACHE_STATE_UNSPECIFIED" : 0; + object.command = ""; + object.peeringCommandExpiryTime = null; + object.passphrase = ""; + object.stateDetails = ""; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.enableGlobalFileLock != null && message.hasOwnProperty("enableGlobalFileLock")) { + object.enableGlobalFileLock = message.enableGlobalFileLock; + if (options.oneofs) + object._enableGlobalFileLock = "enableGlobalFileLock"; + } + if (message.cacheConfig != null && message.hasOwnProperty("cacheConfig")) + object.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.toObject(message.cacheConfig, options); + if (message.cacheState != null && message.hasOwnProperty("cacheState")) + object.cacheState = options.enums === String ? $root.google.cloud.netapp.v1.CacheParameters.CacheState[message.cacheState] === undefined ? message.cacheState : $root.google.cloud.netapp.v1.CacheParameters.CacheState[message.cacheState] : message.cacheState; + if (message.command != null && message.hasOwnProperty("command")) + object.command = message.command; + if (message.peeringCommandExpiryTime != null && message.hasOwnProperty("peeringCommandExpiryTime")) + object.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.peeringCommandExpiryTime, options); + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + object.passphrase = message.passphrase; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + return object; + }; + + /** + * Converts this CacheParameters to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CacheParameters + * @instance + * @returns {Object.} JSON object + */ + CacheParameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CacheParameters + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CacheParameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CacheParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CacheParameters"; + }; + + /** + * CacheState enum. + * @name google.cloud.netapp.v1.CacheParameters.CacheState + * @enum {number} + * @property {number} CACHE_STATE_UNSPECIFIED=0 CACHE_STATE_UNSPECIFIED value + * @property {number} PENDING_CLUSTER_PEERING=1 PENDING_CLUSTER_PEERING value + * @property {number} PENDING_SVM_PEERING=2 PENDING_SVM_PEERING value + * @property {number} PEERED=3 PEERED value + * @property {number} ERROR=4 ERROR value + */ + CacheParameters.CacheState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CACHE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING_CLUSTER_PEERING"] = 1; + values[valuesById[2] = "PENDING_SVM_PEERING"] = 2; + values[valuesById[3] = "PEERED"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return CacheParameters; + })(); + + v1.CacheConfig = (function() { + + /** + * Properties of a CacheConfig. + * @memberof google.cloud.netapp.v1 + * @interface ICacheConfig + * @property {google.cloud.netapp.v1.ICachePrePopulate|null} [cachePrePopulate] CacheConfig cachePrePopulate + * @property {boolean|null} [writebackEnabled] CacheConfig writebackEnabled + * @property {boolean|null} [cifsChangeNotifyEnabled] CacheConfig cifsChangeNotifyEnabled + * @property {google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|null} [cachePrePopulateState] CacheConfig cachePrePopulateState + */ + + /** + * Constructs a new CacheConfig. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CacheConfig. + * @implements ICacheConfig + * @constructor + * @param {google.cloud.netapp.v1.ICacheConfig=} [properties] Properties to set + */ + function CacheConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CacheConfig cachePrePopulate. + * @member {google.cloud.netapp.v1.ICachePrePopulate|null|undefined} cachePrePopulate + * @memberof google.cloud.netapp.v1.CacheConfig + * @instance + */ + CacheConfig.prototype.cachePrePopulate = null; + + /** + * CacheConfig writebackEnabled. + * @member {boolean|null|undefined} writebackEnabled + * @memberof google.cloud.netapp.v1.CacheConfig + * @instance + */ + CacheConfig.prototype.writebackEnabled = null; + + /** + * CacheConfig cifsChangeNotifyEnabled. + * @member {boolean|null|undefined} cifsChangeNotifyEnabled + * @memberof google.cloud.netapp.v1.CacheConfig + * @instance + */ + CacheConfig.prototype.cifsChangeNotifyEnabled = null; + + /** + * CacheConfig cachePrePopulateState. + * @member {google.cloud.netapp.v1.CacheConfig.CachePrePopulateState} cachePrePopulateState + * @memberof google.cloud.netapp.v1.CacheConfig + * @instance + */ + CacheConfig.prototype.cachePrePopulateState = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CacheConfig.prototype, "_writebackEnabled", { + get: $util.oneOfGetter($oneOfFields = ["writebackEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CacheConfig.prototype, "_cifsChangeNotifyEnabled", { + get: $util.oneOfGetter($oneOfFields = ["cifsChangeNotifyEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CacheConfig instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {google.cloud.netapp.v1.ICacheConfig=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig instance + */ + CacheConfig.create = function create(properties) { + return new CacheConfig(properties); + }; + + /** + * Encodes the specified CacheConfig message. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {google.cloud.netapp.v1.ICacheConfig} message CacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cachePrePopulate != null && Object.hasOwnProperty.call(message, "cachePrePopulate")) + $root.google.cloud.netapp.v1.CachePrePopulate.encode(message.cachePrePopulate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.writebackEnabled != null && Object.hasOwnProperty.call(message, "writebackEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.writebackEnabled); + if (message.cifsChangeNotifyEnabled != null && Object.hasOwnProperty.call(message, "cifsChangeNotifyEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.cifsChangeNotifyEnabled); + if (message.cachePrePopulateState != null && Object.hasOwnProperty.call(message, "cachePrePopulateState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.cachePrePopulateState); + return writer; + }; + + /** + * Encodes the specified CacheConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {google.cloud.netapp.v1.ICacheConfig} message CacheConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CacheConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CacheConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.writebackEnabled = reader.bool(); + break; + } + case 5: { + message.cifsChangeNotifyEnabled = reader.bool(); + break; + } + case 6: { + message.cachePrePopulateState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CacheConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CacheConfig message. + * @function verify + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CacheConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cachePrePopulate != null && message.hasOwnProperty("cachePrePopulate")) { + var error = $root.google.cloud.netapp.v1.CachePrePopulate.verify(message.cachePrePopulate); + if (error) + return "cachePrePopulate." + error; + } + if (message.writebackEnabled != null && message.hasOwnProperty("writebackEnabled")) { + properties._writebackEnabled = 1; + if (typeof message.writebackEnabled !== "boolean") + return "writebackEnabled: boolean expected"; + } + if (message.cifsChangeNotifyEnabled != null && message.hasOwnProperty("cifsChangeNotifyEnabled")) { + properties._cifsChangeNotifyEnabled = 1; + if (typeof message.cifsChangeNotifyEnabled !== "boolean") + return "cifsChangeNotifyEnabled: boolean expected"; + } + if (message.cachePrePopulateState != null && message.hasOwnProperty("cachePrePopulateState")) + switch (message.cachePrePopulateState) { + default: + return "cachePrePopulateState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a CacheConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig + */ + CacheConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CacheConfig) + return object; + var message = new $root.google.cloud.netapp.v1.CacheConfig(); + if (object.cachePrePopulate != null) { + if (typeof object.cachePrePopulate !== "object") + throw TypeError(".google.cloud.netapp.v1.CacheConfig.cachePrePopulate: object expected"); + message.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.fromObject(object.cachePrePopulate); + } + if (object.writebackEnabled != null) + message.writebackEnabled = Boolean(object.writebackEnabled); + if (object.cifsChangeNotifyEnabled != null) + message.cifsChangeNotifyEnabled = Boolean(object.cifsChangeNotifyEnabled); + switch (object.cachePrePopulateState) { + default: + if (typeof object.cachePrePopulateState === "number") { + message.cachePrePopulateState = object.cachePrePopulateState; + break; + } + break; + case "CACHE_PRE_POPULATE_STATE_UNSPECIFIED": + case 0: + message.cachePrePopulateState = 0; + break; + case "NOT_NEEDED": + case 1: + message.cachePrePopulateState = 1; + break; + case "IN_PROGRESS": + case 2: + message.cachePrePopulateState = 2; + break; + case "COMPLETE": + case 3: + message.cachePrePopulateState = 3; + break; + case "ERROR": + case 4: + message.cachePrePopulateState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a CacheConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {google.cloud.netapp.v1.CacheConfig} message CacheConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CacheConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cachePrePopulate = null; + object.cachePrePopulateState = options.enums === String ? "CACHE_PRE_POPULATE_STATE_UNSPECIFIED" : 0; + } + if (message.cachePrePopulate != null && message.hasOwnProperty("cachePrePopulate")) + object.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.toObject(message.cachePrePopulate, options); + if (message.writebackEnabled != null && message.hasOwnProperty("writebackEnabled")) { + object.writebackEnabled = message.writebackEnabled; + if (options.oneofs) + object._writebackEnabled = "writebackEnabled"; + } + if (message.cifsChangeNotifyEnabled != null && message.hasOwnProperty("cifsChangeNotifyEnabled")) { + object.cifsChangeNotifyEnabled = message.cifsChangeNotifyEnabled; + if (options.oneofs) + object._cifsChangeNotifyEnabled = "cifsChangeNotifyEnabled"; + } + if (message.cachePrePopulateState != null && message.hasOwnProperty("cachePrePopulateState")) + object.cachePrePopulateState = options.enums === String ? $root.google.cloud.netapp.v1.CacheConfig.CachePrePopulateState[message.cachePrePopulateState] === undefined ? message.cachePrePopulateState : $root.google.cloud.netapp.v1.CacheConfig.CachePrePopulateState[message.cachePrePopulateState] : message.cachePrePopulateState; + return object; + }; + + /** + * Converts this CacheConfig to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CacheConfig + * @instance + * @returns {Object.} JSON object + */ + CacheConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CacheConfig + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CacheConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CacheConfig"; + }; + + /** + * CachePrePopulateState enum. + * @name google.cloud.netapp.v1.CacheConfig.CachePrePopulateState + * @enum {number} + * @property {number} CACHE_PRE_POPULATE_STATE_UNSPECIFIED=0 CACHE_PRE_POPULATE_STATE_UNSPECIFIED value + * @property {number} NOT_NEEDED=1 NOT_NEEDED value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} COMPLETE=3 COMPLETE value + * @property {number} ERROR=4 ERROR value + */ + CacheConfig.CachePrePopulateState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CACHE_PRE_POPULATE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_NEEDED"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "COMPLETE"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return CacheConfig; + })(); + + v1.CachePrePopulate = (function() { + + /** + * Properties of a CachePrePopulate. + * @memberof google.cloud.netapp.v1 + * @interface ICachePrePopulate + * @property {Array.|null} [pathList] CachePrePopulate pathList + * @property {Array.|null} [excludePathList] CachePrePopulate excludePathList + * @property {boolean|null} [recursion] CachePrePopulate recursion + */ + + /** + * Constructs a new CachePrePopulate. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CachePrePopulate. + * @implements ICachePrePopulate + * @constructor + * @param {google.cloud.netapp.v1.ICachePrePopulate=} [properties] Properties to set + */ + function CachePrePopulate(properties) { + this.pathList = []; + this.excludePathList = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CachePrePopulate pathList. + * @member {Array.} pathList + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @instance + */ + CachePrePopulate.prototype.pathList = $util.emptyArray; + + /** + * CachePrePopulate excludePathList. + * @member {Array.} excludePathList + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @instance + */ + CachePrePopulate.prototype.excludePathList = $util.emptyArray; + + /** + * CachePrePopulate recursion. + * @member {boolean|null|undefined} recursion + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @instance + */ + CachePrePopulate.prototype.recursion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CachePrePopulate.prototype, "_recursion", { + get: $util.oneOfGetter($oneOfFields = ["recursion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CachePrePopulate instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {google.cloud.netapp.v1.ICachePrePopulate=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate instance + */ + CachePrePopulate.create = function create(properties) { + return new CachePrePopulate(properties); + }; + + /** + * Encodes the specified CachePrePopulate message. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {google.cloud.netapp.v1.ICachePrePopulate} message CachePrePopulate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CachePrePopulate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pathList != null && message.pathList.length) + for (var i = 0; i < message.pathList.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pathList[i]); + if (message.excludePathList != null && message.excludePathList.length) + for (var i = 0; i < message.excludePathList.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludePathList[i]); + if (message.recursion != null && Object.hasOwnProperty.call(message, "recursion")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recursion); + return writer; + }; + + /** + * Encodes the specified CachePrePopulate message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {google.cloud.netapp.v1.ICachePrePopulate} message CachePrePopulate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CachePrePopulate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CachePrePopulate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CachePrePopulate.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CachePrePopulate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.pathList && message.pathList.length)) + message.pathList = []; + message.pathList.push(reader.string()); + break; + } + case 2: { + if (!(message.excludePathList && message.excludePathList.length)) + message.excludePathList = []; + message.excludePathList.push(reader.string()); + break; + } + case 3: { + message.recursion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CachePrePopulate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CachePrePopulate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CachePrePopulate message. + * @function verify + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CachePrePopulate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pathList != null && message.hasOwnProperty("pathList")) { + if (!Array.isArray(message.pathList)) + return "pathList: array expected"; + for (var i = 0; i < message.pathList.length; ++i) + if (!$util.isString(message.pathList[i])) + return "pathList: string[] expected"; + } + if (message.excludePathList != null && message.hasOwnProperty("excludePathList")) { + if (!Array.isArray(message.excludePathList)) + return "excludePathList: array expected"; + for (var i = 0; i < message.excludePathList.length; ++i) + if (!$util.isString(message.excludePathList[i])) + return "excludePathList: string[] expected"; + } + if (message.recursion != null && message.hasOwnProperty("recursion")) { + properties._recursion = 1; + if (typeof message.recursion !== "boolean") + return "recursion: boolean expected"; + } + return null; + }; + + /** + * Creates a CachePrePopulate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate + */ + CachePrePopulate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CachePrePopulate) + return object; + var message = new $root.google.cloud.netapp.v1.CachePrePopulate(); + if (object.pathList) { + if (!Array.isArray(object.pathList)) + throw TypeError(".google.cloud.netapp.v1.CachePrePopulate.pathList: array expected"); + message.pathList = []; + for (var i = 0; i < object.pathList.length; ++i) + message.pathList[i] = String(object.pathList[i]); + } + if (object.excludePathList) { + if (!Array.isArray(object.excludePathList)) + throw TypeError(".google.cloud.netapp.v1.CachePrePopulate.excludePathList: array expected"); + message.excludePathList = []; + for (var i = 0; i < object.excludePathList.length; ++i) + message.excludePathList[i] = String(object.excludePathList[i]); + } + if (object.recursion != null) + message.recursion = Boolean(object.recursion); + return message; + }; + + /** + * Creates a plain object from a CachePrePopulate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {google.cloud.netapp.v1.CachePrePopulate} message CachePrePopulate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CachePrePopulate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pathList = []; + object.excludePathList = []; + } + if (message.pathList && message.pathList.length) { + object.pathList = []; + for (var j = 0; j < message.pathList.length; ++j) + object.pathList[j] = message.pathList[j]; + } + if (message.excludePathList && message.excludePathList.length) { + object.excludePathList = []; + for (var j = 0; j < message.excludePathList.length; ++j) + object.excludePathList[j] = message.excludePathList[j]; + } + if (message.recursion != null && message.hasOwnProperty("recursion")) { + object.recursion = message.recursion; + if (options.oneofs) + object._recursion = "recursion"; + } + return object; + }; + + /** + * Converts this CachePrePopulate to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @instance + * @returns {Object.} JSON object + */ + CachePrePopulate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CachePrePopulate + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CachePrePopulate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CachePrePopulate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CachePrePopulate"; + }; + + return CachePrePopulate; + })(); + + v1.BlockDevice = (function() { + + /** + * Properties of a BlockDevice. + * @memberof google.cloud.netapp.v1 + * @interface IBlockDevice + * @property {string|null} [name] BlockDevice name + * @property {Array.|null} [hostGroups] BlockDevice hostGroups + * @property {string|null} [identifier] BlockDevice identifier + * @property {number|Long|null} [sizeGib] BlockDevice sizeGib + * @property {google.cloud.netapp.v1.OsType|null} [osType] BlockDevice osType + */ + + /** + * Constructs a new BlockDevice. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a BlockDevice. + * @implements IBlockDevice + * @constructor + * @param {google.cloud.netapp.v1.IBlockDevice=} [properties] Properties to set + */ + function BlockDevice(properties) { + this.hostGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockDevice name. + * @member {string|null|undefined} name + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + */ + BlockDevice.prototype.name = null; + + /** + * BlockDevice hostGroups. + * @member {Array.} hostGroups + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + */ + BlockDevice.prototype.hostGroups = $util.emptyArray; + + /** + * BlockDevice identifier. + * @member {string} identifier + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + */ + BlockDevice.prototype.identifier = ""; + + /** + * BlockDevice sizeGib. + * @member {number|Long|null|undefined} sizeGib + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + */ + BlockDevice.prototype.sizeGib = null; + + /** + * BlockDevice osType. + * @member {google.cloud.netapp.v1.OsType} osType + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + */ + BlockDevice.prototype.osType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BlockDevice.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BlockDevice.prototype, "_sizeGib", { + get: $util.oneOfGetter($oneOfFields = ["sizeGib"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BlockDevice instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {google.cloud.netapp.v1.IBlockDevice=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice instance + */ + BlockDevice.create = function create(properties) { + return new BlockDevice(properties); + }; + + /** + * Encodes the specified BlockDevice message. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {google.cloud.netapp.v1.IBlockDevice} message BlockDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.hostGroups != null && message.hostGroups.length) + for (var i = 0; i < message.hostGroups.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostGroups[i]); + if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier); + if (message.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeGib); + if (message.osType != null && Object.hasOwnProperty.call(message, "osType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.osType); + return writer; + }; + + /** + * Encodes the specified BlockDevice message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {google.cloud.netapp.v1.IBlockDevice} message BlockDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockDevice.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BlockDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.hostGroups && message.hostGroups.length)) + message.hostGroups = []; + message.hostGroups.push(reader.string()); + break; + } + case 3: { + message.identifier = reader.string(); + break; + } + case 4: { + message.sizeGib = reader.int64(); + break; + } + case 5: { + message.osType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockDevice message. + * @function verify + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.hostGroups != null && message.hasOwnProperty("hostGroups")) { + if (!Array.isArray(message.hostGroups)) + return "hostGroups: array expected"; + for (var i = 0; i < message.hostGroups.length; ++i) + if (!$util.isString(message.hostGroups[i])) + return "hostGroups: string[] expected"; + } + if (message.identifier != null && message.hasOwnProperty("identifier")) + if (!$util.isString(message.identifier)) + return "identifier: string expected"; + if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) { + properties._sizeGib = 1; + if (!$util.isInteger(message.sizeGib) && !(message.sizeGib && $util.isInteger(message.sizeGib.low) && $util.isInteger(message.sizeGib.high))) + return "sizeGib: integer|Long expected"; + } + if (message.osType != null && message.hasOwnProperty("osType")) + switch (message.osType) { + default: + return "osType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BlockDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice + */ + BlockDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.BlockDevice) + return object; + var message = new $root.google.cloud.netapp.v1.BlockDevice(); + if (object.name != null) + message.name = String(object.name); + if (object.hostGroups) { + if (!Array.isArray(object.hostGroups)) + throw TypeError(".google.cloud.netapp.v1.BlockDevice.hostGroups: array expected"); + message.hostGroups = []; + for (var i = 0; i < object.hostGroups.length; ++i) + message.hostGroups[i] = String(object.hostGroups[i]); + } + if (object.identifier != null) + message.identifier = String(object.identifier); + if (object.sizeGib != null) + if ($util.Long) + (message.sizeGib = $util.Long.fromValue(object.sizeGib)).unsigned = false; + else if (typeof object.sizeGib === "string") + message.sizeGib = parseInt(object.sizeGib, 10); + else if (typeof object.sizeGib === "number") + message.sizeGib = object.sizeGib; + else if (typeof object.sizeGib === "object") + message.sizeGib = new $util.LongBits(object.sizeGib.low >>> 0, object.sizeGib.high >>> 0).toNumber(); + switch (object.osType) { + default: + if (typeof object.osType === "number") { + message.osType = object.osType; + break; + } + break; + case "OS_TYPE_UNSPECIFIED": + case 0: + message.osType = 0; + break; + case "LINUX": + case 1: + message.osType = 1; + break; + case "WINDOWS": + case 2: + message.osType = 2; + break; + case "ESXI": + case 3: + message.osType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BlockDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {google.cloud.netapp.v1.BlockDevice} message BlockDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hostGroups = []; + if (options.defaults) { + object.identifier = ""; + object.osType = options.enums === String ? "OS_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.hostGroups && message.hostGroups.length) { + object.hostGroups = []; + for (var j = 0; j < message.hostGroups.length; ++j) + object.hostGroups[j] = message.hostGroups[j]; + } + if (message.identifier != null && message.hasOwnProperty("identifier")) + object.identifier = message.identifier; + if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) { + if (typeof message.sizeGib === "number") + object.sizeGib = options.longs === String ? String(message.sizeGib) : message.sizeGib; + else + object.sizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.sizeGib) : options.longs === Number ? new $util.LongBits(message.sizeGib.low >>> 0, message.sizeGib.high >>> 0).toNumber() : message.sizeGib; + if (options.oneofs) + object._sizeGib = "sizeGib"; + } + if (message.osType != null && message.hasOwnProperty("osType")) + object.osType = options.enums === String ? $root.google.cloud.netapp.v1.OsType[message.osType] === undefined ? message.osType : $root.google.cloud.netapp.v1.OsType[message.osType] : message.osType; + return object; + }; + + /** + * Converts this BlockDevice to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.BlockDevice + * @instance + * @returns {Object.} JSON object + */ + BlockDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlockDevice + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.BlockDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlockDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.BlockDevice"; + }; + + return BlockDevice; + })(); + + v1.RestoreBackupFilesRequest = (function() { + + /** + * Properties of a RestoreBackupFilesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IRestoreBackupFilesRequest + * @property {string|null} [name] RestoreBackupFilesRequest name + * @property {string|null} [backup] RestoreBackupFilesRequest backup + * @property {Array.|null} [fileList] RestoreBackupFilesRequest fileList + * @property {string|null} [restoreDestinationPath] RestoreBackupFilesRequest restoreDestinationPath + */ + + /** + * Constructs a new RestoreBackupFilesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RestoreBackupFilesRequest. + * @implements IRestoreBackupFilesRequest + * @constructor + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest=} [properties] Properties to set + */ + function RestoreBackupFilesRequest(properties) { + this.fileList = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupFilesRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @instance + */ + RestoreBackupFilesRequest.prototype.name = ""; + + /** + * RestoreBackupFilesRequest backup. + * @member {string} backup + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @instance + */ + RestoreBackupFilesRequest.prototype.backup = ""; + + /** + * RestoreBackupFilesRequest fileList. + * @member {Array.} fileList + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @instance + */ + RestoreBackupFilesRequest.prototype.fileList = $util.emptyArray; + + /** + * RestoreBackupFilesRequest restoreDestinationPath. + * @member {string} restoreDestinationPath + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @instance + */ + RestoreBackupFilesRequest.prototype.restoreDestinationPath = ""; + + /** + * Creates a new RestoreBackupFilesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest instance + */ + RestoreBackupFilesRequest.create = function create(properties) { + return new RestoreBackupFilesRequest(properties); + }; + + /** + * Encodes the specified RestoreBackupFilesRequest message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} message RestoreBackupFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupFilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); + if (message.fileList != null && message.fileList.length) + for (var i = 0; i < message.fileList.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileList[i]); + if (message.restoreDestinationPath != null && Object.hasOwnProperty.call(message, "restoreDestinationPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.restoreDestinationPath); + return writer; + }; + + /** + * Encodes the specified RestoreBackupFilesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} message RestoreBackupFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupFilesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreBackupFilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.backup = reader.string(); + break; + } + case 3: { + if (!(message.fileList && message.fileList.length)) + message.fileList = []; + message.fileList.push(reader.string()); + break; + } + case 4: { + message.restoreDestinationPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupFilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupFilesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupFilesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.fileList != null && message.hasOwnProperty("fileList")) { + if (!Array.isArray(message.fileList)) + return "fileList: array expected"; + for (var i = 0; i < message.fileList.length; ++i) + if (!$util.isString(message.fileList[i])) + return "fileList: string[] expected"; + } + if (message.restoreDestinationPath != null && message.hasOwnProperty("restoreDestinationPath")) + if (!$util.isString(message.restoreDestinationPath)) + return "restoreDestinationPath: string expected"; + return null; + }; + + /** + * Creates a RestoreBackupFilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest + */ + RestoreBackupFilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RestoreBackupFilesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.RestoreBackupFilesRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.backup != null) + message.backup = String(object.backup); + if (object.fileList) { + if (!Array.isArray(object.fileList)) + throw TypeError(".google.cloud.netapp.v1.RestoreBackupFilesRequest.fileList: array expected"); + message.fileList = []; + for (var i = 0; i < object.fileList.length; ++i) + message.fileList[i] = String(object.fileList[i]); + } + if (object.restoreDestinationPath != null) + message.restoreDestinationPath = String(object.restoreDestinationPath); + return message; + }; + + /** + * Creates a plain object from a RestoreBackupFilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {google.cloud.netapp.v1.RestoreBackupFilesRequest} message RestoreBackupFilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupFilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileList = []; + if (options.defaults) { + object.name = ""; + object.backup = ""; + object.restoreDestinationPath = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.fileList && message.fileList.length) { + object.fileList = []; + for (var j = 0; j < message.fileList.length; ++j) + object.fileList[j] = message.fileList[j]; + } + if (message.restoreDestinationPath != null && message.hasOwnProperty("restoreDestinationPath")) + object.restoreDestinationPath = message.restoreDestinationPath; + return object; + }; + + /** + * Converts this RestoreBackupFilesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupFilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupFilesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreBackupFilesRequest"; + }; + + return RestoreBackupFilesRequest; + })(); + + v1.RestoreBackupFilesResponse = (function() { + + /** + * Properties of a RestoreBackupFilesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IRestoreBackupFilesResponse + */ + + /** + * Constructs a new RestoreBackupFilesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RestoreBackupFilesResponse. + * @implements IRestoreBackupFilesResponse + * @constructor + * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse=} [properties] Properties to set + */ + function RestoreBackupFilesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RestoreBackupFilesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse instance + */ + RestoreBackupFilesResponse.create = function create(properties) { + return new RestoreBackupFilesResponse(properties); + }; + + /** + * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse} message RestoreBackupFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupFilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse} message RestoreBackupFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupFilesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreBackupFilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupFilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupFilesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupFilesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse + */ + RestoreBackupFilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RestoreBackupFilesResponse) + return object; + return new $root.google.cloud.netapp.v1.RestoreBackupFilesResponse(); + }; + + /** + * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {google.cloud.netapp.v1.RestoreBackupFilesResponse} message RestoreBackupFilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupFilesResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RestoreBackupFilesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupFilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupFilesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreBackupFilesResponse"; + }; + + return RestoreBackupFilesResponse; + })(); + + v1.EstablishVolumePeeringRequest = (function() { + + /** + * Properties of an EstablishVolumePeeringRequest. + * @memberof google.cloud.netapp.v1 + * @interface IEstablishVolumePeeringRequest + * @property {string|null} [name] EstablishVolumePeeringRequest name + * @property {string|null} [peerClusterName] EstablishVolumePeeringRequest peerClusterName + * @property {string|null} [peerSvmName] EstablishVolumePeeringRequest peerSvmName + * @property {Array.|null} [peerIpAddresses] EstablishVolumePeeringRequest peerIpAddresses + * @property {string|null} [peerVolumeName] EstablishVolumePeeringRequest peerVolumeName + */ + + /** + * Constructs a new EstablishVolumePeeringRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an EstablishVolumePeeringRequest. + * @implements IEstablishVolumePeeringRequest + * @constructor + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set + */ + function EstablishVolumePeeringRequest(properties) { + this.peerIpAddresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EstablishVolumePeeringRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.name = ""; + + /** + * EstablishVolumePeeringRequest peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerClusterName = ""; + + /** + * EstablishVolumePeeringRequest peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerSvmName = ""; + + /** + * EstablishVolumePeeringRequest peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerIpAddresses = $util.emptyArray; + + /** + * EstablishVolumePeeringRequest peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerVolumeName = ""; + + /** + * Creates a new EstablishVolumePeeringRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest instance + */ + EstablishVolumePeeringRequest.create = function create(properties) { + return new EstablishVolumePeeringRequest(properties); + }; + + /** + * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishVolumePeeringRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); + return writer; + }; + + /** + * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishVolumePeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishVolumePeeringRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.peerClusterName = reader.string(); + break; + } + case 3: { + message.peerSvmName = reader.string(); + break; + } + case 4: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 5: { + message.peerVolumeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishVolumePeeringRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EstablishVolumePeeringRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EstablishVolumePeeringRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + return null; + }; + + /** + * Creates an EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + */ + EstablishVolumePeeringRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest) + return object; + var message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.EstablishVolumePeeringRequest.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + return message; + }; + + /** + * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.EstablishVolumePeeringRequest} message EstablishVolumePeeringRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EstablishVolumePeeringRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; + if (options.defaults) { + object.name = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.peerVolumeName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + return object; + }; + + /** + * Converts this EstablishVolumePeeringRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + * @returns {Object.} JSON object + */ + EstablishVolumePeeringRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EstablishVolumePeeringRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EstablishVolumePeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishVolumePeeringRequest"; + }; + + return EstablishVolumePeeringRequest; + })(); + + v1.ListSnapshotsRequest = (function() { + + /** + * Properties of a ListSnapshotsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListSnapshotsRequest + * @property {string|null} [parent] ListSnapshotsRequest parent + * @property {number|null} [pageSize] ListSnapshotsRequest pageSize + * @property {string|null} [pageToken] ListSnapshotsRequest pageToken + * @property {string|null} [orderBy] ListSnapshotsRequest orderBy + * @property {string|null} [filter] ListSnapshotsRequest filter + */ + + /** + * Constructs a new ListSnapshotsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListSnapshotsRequest. + * @implements IListSnapshotsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set + */ + function ListSnapshotsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.parent = ""; + + /** + * ListSnapshotsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageSize = 0; + + /** + * ListSnapshotsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.pageToken = ""; + + /** + * ListSnapshotsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.orderBy = ""; + + /** + * ListSnapshotsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + */ + ListSnapshotsRequest.prototype.filter = ""; + + /** + * Creates a new ListSnapshotsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest instance + */ + ListSnapshotsRequest.create = function create(properties) { + return new ListSnapshotsRequest(properties); + }; + + /** + * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest + */ + ListSnapshotsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {google.cloud.netapp.v1.ListSnapshotsRequest} message ListSnapshotsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListSnapshotsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListSnapshotsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsRequest"; + }; + + return ListSnapshotsRequest; + })(); + + v1.ListSnapshotsResponse = (function() { + + /** + * Properties of a ListSnapshotsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListSnapshotsResponse + * @property {Array.|null} [snapshots] ListSnapshotsResponse snapshots + * @property {string|null} [nextPageToken] ListSnapshotsResponse nextPageToken + * @property {Array.|null} [unreachable] ListSnapshotsResponse unreachable + */ + + /** + * Constructs a new ListSnapshotsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListSnapshotsResponse. + * @implements IListSnapshotsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set + */ + function ListSnapshotsResponse(properties) { + this.snapshots = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSnapshotsResponse snapshots. + * @member {Array.} snapshots + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.snapshots = $util.emptyArray; + + /** + * ListSnapshotsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.nextPageToken = ""; + + /** + * ListSnapshotsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + */ + ListSnapshotsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListSnapshotsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse instance + */ + ListSnapshotsResponse.create = function create(properties) { + return new ListSnapshotsResponse(properties); + }; + + /** + * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshots != null && message.snapshots.length) + for (var i = 0; i < message.snapshots.length; ++i) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSnapshotsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSnapshotsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (var i = 0; i < message.snapshots.length; ++i) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshots[i]); + if (error) + return "snapshots." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse + */ + ListSnapshotsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: array expected"); + message.snapshots = []; + for (var i = 0; i < object.snapshots.length; ++i) { + if (typeof object.snapshots[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: object expected"); + message.snapshots[i] = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshots[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {google.cloud.netapp.v1.ListSnapshotsResponse} message ListSnapshotsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSnapshotsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.snapshots = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (var j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshots[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListSnapshotsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @instance + * @returns {Object.} JSON object + */ + ListSnapshotsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSnapshotsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListSnapshotsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsResponse"; + }; + + return ListSnapshotsResponse; + })(); + + v1.GetSnapshotRequest = (function() { + + /** + * Properties of a GetSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetSnapshotRequest + * @property {string|null} [name] GetSnapshotRequest name + */ + + /** + * Constructs a new GetSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetSnapshotRequest. + * @implements IGetSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set + */ + function GetSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSnapshotRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @instance + */ + GetSnapshotRequest.prototype.name = ""; + + /** + * Creates a new GetSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest instance + */ + GetSnapshotRequest.create = function create(properties) { + return new GetSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest + */ + GetSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.GetSnapshotRequest} message GetSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetSnapshotRequest"; + }; + + return GetSnapshotRequest; + })(); + + v1.CreateSnapshotRequest = (function() { + + /** + * Properties of a CreateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateSnapshotRequest + * @property {string|null} [parent] CreateSnapshotRequest parent + * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] CreateSnapshotRequest snapshot + * @property {string|null} [snapshotId] CreateSnapshotRequest snapshotId + */ + + /** + * Constructs a new CreateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateSnapshotRequest. + * @implements ICreateSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set + */ + function CreateSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSnapshotRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.parent = ""; + + /** + * CreateSnapshotRequest snapshot. + * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.snapshot = null; + + /** + * CreateSnapshotRequest snapshotId. + * @member {string} snapshotId + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + */ + CreateSnapshotRequest.prototype.snapshotId = ""; + + /** + * Creates a new CreateSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest instance + */ + CreateSnapshotRequest.create = function create(properties) { + return new CreateSnapshotRequest(properties); + }; + + /** + * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotId); + return writer; + }; + + /** + * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); + break; + } + case 3: { + message.snapshotId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + return null; + }; + + /** + * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest + */ + CreateSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateSnapshotRequest.snapshot: object expected"); + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); + } + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + return message; + }; + + /** + * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.CreateSnapshotRequest} message CreateSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.snapshot = null; + object.snapshotId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + return object; + }; + + /** + * Converts this CreateSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateSnapshotRequest"; + }; + + return CreateSnapshotRequest; + })(); + + v1.DeleteSnapshotRequest = (function() { + + /** + * Properties of a DeleteSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteSnapshotRequest + * @property {string|null} [name] DeleteSnapshotRequest name + */ + + /** + * Constructs a new DeleteSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteSnapshotRequest. + * @implements IDeleteSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set + */ + function DeleteSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSnapshotRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @instance + */ + DeleteSnapshotRequest.prototype.name = ""; + + /** + * Creates a new DeleteSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest instance + */ + DeleteSnapshotRequest.create = function create(properties) { + return new DeleteSnapshotRequest(properties); + }; + + /** + * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest + */ + DeleteSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.DeleteSnapshotRequest} message DeleteSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteSnapshotRequest"; + }; + + return DeleteSnapshotRequest; + })(); + + v1.UpdateSnapshotRequest = (function() { + + /** + * Properties of an UpdateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateSnapshotRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSnapshotRequest updateMask + * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] UpdateSnapshotRequest snapshot + */ + + /** + * Constructs a new UpdateSnapshotRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateSnapshotRequest. + * @implements IUpdateSnapshotRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set + */ + function UpdateSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSnapshotRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + */ + UpdateSnapshotRequest.prototype.updateMask = null; + + /** + * UpdateSnapshotRequest snapshot. + * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + */ + UpdateSnapshotRequest.prototype.snapshot = null; + + /** + * Creates a new UpdateSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest instance + */ + UpdateSnapshotRequest.create = function create(properties) { + return new UpdateSnapshotRequest(properties); + }; + + /** + * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSnapshotRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSnapshotRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + return null; + }; + + /** + * Creates an UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest + */ + UpdateSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateSnapshotRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.snapshot: object expected"); + message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {google.cloud.netapp.v1.UpdateSnapshotRequest} message UpdateSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.snapshot = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); + return object; + }; + + /** + * Converts this UpdateSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateSnapshotRequest"; + }; + + return UpdateSnapshotRequest; + })(); + + v1.Snapshot = (function() { + + /** + * Properties of a Snapshot. + * @memberof google.cloud.netapp.v1 + * @interface ISnapshot + * @property {string|null} [name] Snapshot name + * @property {google.cloud.netapp.v1.Snapshot.State|null} [state] Snapshot state + * @property {string|null} [stateDetails] Snapshot stateDetails + * @property {string|null} [description] Snapshot description + * @property {number|null} [usedBytes] Snapshot usedBytes + * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime + * @property {Object.|null} [labels] Snapshot labels + */ + + /** + * Constructs a new Snapshot. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.name = ""; + + /** + * Snapshot state. + * @member {google.cloud.netapp.v1.Snapshot.State} state + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.state = 0; + + /** + * Snapshot stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.stateDetails = ""; + + /** + * Snapshot description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.description = ""; + + /** + * Snapshot usedBytes. + * @member {number} usedBytes + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.usedBytes = 0; + + /** + * Snapshot createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.createTime = null; + + /** + * Snapshot labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + */ + Snapshot.prototype.labels = $util.emptyObject; + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.usedBytes != null && Object.hasOwnProperty.call(message, "usedBytes")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.usedBytes); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Snapshot(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.usedBytes = reader.double(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) + if (typeof message.usedBytes !== "number") + return "usedBytes: number expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Snapshot) + return object; + var message = new $root.google.cloud.netapp.v1.Snapshot(); + 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 "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "DISABLED": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.description != null) + message.description = String(object.description); + if (object.usedBytes != null) + message.usedBytes = Number(object.usedBytes); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Snapshot.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Snapshot.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {google.cloud.netapp.v1.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.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.stateDetails = ""; + object.description = ""; + object.usedBytes = 0; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Snapshot.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Snapshot.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) + object.usedBytes = options.json && !isFinite(message.usedBytes) ? String(message.usedBytes) : message.usedBytes; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Snapshot + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Snapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Snapshot"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.Snapshot.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} DISABLED=5 DISABLED value + * @property {number} ERROR=6 ERROR value + */ + Snapshot.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "DISABLED"] = 5; + values[valuesById[6] = "ERROR"] = 6; + return values; + })(); + + return Snapshot; + })(); + + /** + * Mode enum. + * @name google.cloud.netapp.v1.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} ONTAP=2 ONTAP value + */ + v1.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "ONTAP"] = 2; + return values; + })(); + + v1.GetStoragePoolRequest = (function() { + + /** + * Properties of a GetStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetStoragePoolRequest + * @property {string|null} [name] GetStoragePoolRequest name + */ + + /** + * Constructs a new GetStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetStoragePoolRequest. + * @implements IGetStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set + */ + function GetStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetStoragePoolRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @instance + */ + GetStoragePoolRequest.prototype.name = ""; + + /** + * Creates a new GetStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest instance + */ + GetStoragePoolRequest.create = function create(properties) { + return new GetStoragePoolRequest(properties); + }; + + /** + * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoragePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoragePoolRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetStoragePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest + */ + GetStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.GetStoragePoolRequest} message GetStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetStoragePoolRequest"; + }; + + return GetStoragePoolRequest; + })(); + + v1.ListStoragePoolsRequest = (function() { + + /** + * Properties of a ListStoragePoolsRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListStoragePoolsRequest + * @property {string|null} [parent] ListStoragePoolsRequest parent + * @property {number|null} [pageSize] ListStoragePoolsRequest pageSize + * @property {string|null} [pageToken] ListStoragePoolsRequest pageToken + * @property {string|null} [orderBy] ListStoragePoolsRequest orderBy + * @property {string|null} [filter] ListStoragePoolsRequest filter + */ + + /** + * Constructs a new ListStoragePoolsRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListStoragePoolsRequest. + * @implements IListStoragePoolsRequest + * @constructor + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set + */ + function ListStoragePoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoragePoolsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.parent = ""; + + /** + * ListStoragePoolsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.pageSize = 0; + + /** + * ListStoragePoolsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.pageToken = ""; + + /** + * ListStoragePoolsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.orderBy = ""; + + /** + * ListStoragePoolsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + */ + ListStoragePoolsRequest.prototype.filter = ""; + + /** + * Creates a new ListStoragePoolsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest instance + */ + ListStoragePoolsRequest.create = function create(properties) { + return new ListStoragePoolsRequest(properties); + }; + + /** + * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoragePoolsRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoragePoolsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest + */ + ListStoragePoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {google.cloud.netapp.v1.ListStoragePoolsRequest} message ListStoragePoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoragePoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListStoragePoolsRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListStoragePoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoragePoolsRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoragePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsRequest"; + }; + + return ListStoragePoolsRequest; + })(); + + v1.ListStoragePoolsResponse = (function() { + + /** + * Properties of a ListStoragePoolsResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListStoragePoolsResponse + * @property {Array.|null} [storagePools] ListStoragePoolsResponse storagePools + * @property {string|null} [nextPageToken] ListStoragePoolsResponse nextPageToken + * @property {Array.|null} [unreachable] ListStoragePoolsResponse unreachable + */ + + /** + * Constructs a new ListStoragePoolsResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListStoragePoolsResponse. + * @implements IListStoragePoolsResponse + * @constructor + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set + */ + function ListStoragePoolsResponse(properties) { + this.storagePools = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoragePoolsResponse storagePools. + * @member {Array.} storagePools + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.storagePools = $util.emptyArray; + + /** + * ListStoragePoolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.nextPageToken = ""; + + /** + * ListStoragePoolsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + */ + ListStoragePoolsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListStoragePoolsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse instance + */ + ListStoragePoolsResponse.create = function create(properties) { + return new ListStoragePoolsResponse(properties); + }; + + /** + * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoragePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push($root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoragePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoragePoolsResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoragePoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePools[i]); + if (error) + return "storagePools." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse + */ + ListStoragePoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) { + if (typeof object.storagePools[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: object expected"); + message.storagePools[i] = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePools[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} message ListStoragePoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoragePoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.storagePools = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePools[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListStoragePoolsResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListStoragePoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoragePoolsResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoragePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsResponse"; + }; + + return ListStoragePoolsResponse; + })(); + + v1.CreateStoragePoolRequest = (function() { + + /** + * Properties of a CreateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateStoragePoolRequest + * @property {string|null} [parent] CreateStoragePoolRequest parent + * @property {string|null} [storagePoolId] CreateStoragePoolRequest storagePoolId + * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] CreateStoragePoolRequest storagePool + */ + + /** + * Constructs a new CreateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateStoragePoolRequest. + * @implements ICreateStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set + */ + function CreateStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateStoragePoolRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.parent = ""; + + /** + * CreateStoragePoolRequest storagePoolId. + * @member {string} storagePoolId + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.storagePoolId = ""; + + /** + * CreateStoragePoolRequest storagePool. + * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + */ + CreateStoragePoolRequest.prototype.storagePool = null; + + /** + * Creates a new CreateStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest instance + */ + CreateStoragePoolRequest.create = function create(properties) { + return new CreateStoragePoolRequest(properties); + }; + + /** + * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoragePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.storagePoolId != null && Object.hasOwnProperty.call(message, "storagePoolId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.storagePoolId); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoragePoolRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.storagePoolId = reader.string(); + break; + } + case 3: { + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateStoragePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.storagePoolId != null && message.hasOwnProperty("storagePoolId")) + if (!$util.isString(message.storagePoolId)) + return "storagePoolId: string expected"; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); + if (error) + return "storagePool." + error; + } + return null; + }; + + /** + * Creates a CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest + */ + CreateStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.storagePoolId != null) + message.storagePoolId = String(object.storagePoolId); + if (object.storagePool != null) { + if (typeof object.storagePool !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateStoragePoolRequest.storagePool: object expected"); + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); + } + return message; + }; + + /** + * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.CreateStoragePoolRequest} message CreateStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.storagePoolId = ""; + object.storagePool = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.storagePoolId != null && message.hasOwnProperty("storagePoolId")) + object.storagePoolId = message.storagePoolId; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); + return object; + }; + + /** + * Converts this CreateStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateStoragePoolRequest"; + }; + + return CreateStoragePoolRequest; + })(); + + v1.UpdateStoragePoolRequest = (function() { + + /** + * Properties of an UpdateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateStoragePoolRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoragePoolRequest updateMask + * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] UpdateStoragePoolRequest storagePool + */ + + /** + * Constructs a new UpdateStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateStoragePoolRequest. + * @implements IUpdateStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set + */ + function UpdateStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateStoragePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + */ + UpdateStoragePoolRequest.prototype.updateMask = null; + + /** + * UpdateStoragePoolRequest storagePool. + * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + */ + UpdateStoragePoolRequest.prototype.storagePool = null; + + /** + * Creates a new UpdateStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest instance + */ + UpdateStoragePoolRequest.create = function create(properties) { + return new UpdateStoragePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoragePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoragePoolRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateStoragePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) { + var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); + if (error) + return "storagePool." + error; + } + return null; + }; + + /** + * Creates an UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest + */ + UpdateStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.storagePool != null) { + if (typeof object.storagePool !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.storagePool: object expected"); + message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); + } + return message; + }; + + /** + * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.UpdateStoragePoolRequest} message UpdateStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.storagePool = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); + return object; + }; + + /** + * Converts this UpdateStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateStoragePoolRequest"; + }; + + return UpdateStoragePoolRequest; + })(); + + v1.DeleteStoragePoolRequest = (function() { + + /** + * Properties of a DeleteStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteStoragePoolRequest + * @property {string|null} [name] DeleteStoragePoolRequest name + */ + + /** + * Constructs a new DeleteStoragePoolRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteStoragePoolRequest. + * @implements IDeleteStoragePoolRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set + */ + function DeleteStoragePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteStoragePoolRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @instance + */ + DeleteStoragePoolRequest.prototype.name = ""; + + /** + * Creates a new DeleteStoragePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest instance + */ + DeleteStoragePoolRequest.create = function create(properties) { + return new DeleteStoragePoolRequest(properties); + }; + + /** + * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoragePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoragePoolRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteStoragePoolRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteStoragePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest + */ + DeleteStoragePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteStoragePoolRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {google.cloud.netapp.v1.DeleteStoragePoolRequest} message DeleteStoragePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteStoragePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteStoragePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteStoragePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteStoragePoolRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteStoragePoolRequest"; + }; + + return DeleteStoragePoolRequest; + })(); + + v1.SwitchActiveReplicaZoneRequest = (function() { + + /** + * Properties of a SwitchActiveReplicaZoneRequest. + * @memberof google.cloud.netapp.v1 + * @interface ISwitchActiveReplicaZoneRequest + * @property {string|null} [name] SwitchActiveReplicaZoneRequest name + */ + + /** + * Constructs a new SwitchActiveReplicaZoneRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a SwitchActiveReplicaZoneRequest. + * @implements ISwitchActiveReplicaZoneRequest + * @constructor + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest=} [properties] Properties to set + */ + function SwitchActiveReplicaZoneRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SwitchActiveReplicaZoneRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @instance + */ + SwitchActiveReplicaZoneRequest.prototype.name = ""; + + /** + * Creates a new SwitchActiveReplicaZoneRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest instance + */ + SwitchActiveReplicaZoneRequest.create = function create(properties) { + return new SwitchActiveReplicaZoneRequest(properties); + }; + + /** + * Encodes the specified SwitchActiveReplicaZoneRequest message. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchActiveReplicaZoneRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified SwitchActiveReplicaZoneRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchActiveReplicaZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchActiveReplicaZoneRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchActiveReplicaZoneRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SwitchActiveReplicaZoneRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SwitchActiveReplicaZoneRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SwitchActiveReplicaZoneRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest + */ + SwitchActiveReplicaZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest) + return object; + var message = new $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SwitchActiveReplicaZoneRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SwitchActiveReplicaZoneRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SwitchActiveReplicaZoneRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @instance + * @returns {Object.} JSON object + */ + SwitchActiveReplicaZoneRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SwitchActiveReplicaZoneRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SwitchActiveReplicaZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest"; + }; + + return SwitchActiveReplicaZoneRequest; + })(); + + v1.StoragePool = (function() { + + /** + * Properties of a StoragePool. + * @memberof google.cloud.netapp.v1 + * @interface IStoragePool + * @property {string|null} [name] StoragePool name + * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] StoragePool serviceLevel + * @property {number|Long|null} [capacityGib] StoragePool capacityGib + * @property {number|Long|null} [volumeCapacityGib] StoragePool volumeCapacityGib + * @property {number|null} [volumeCount] StoragePool volumeCount + * @property {google.cloud.netapp.v1.StoragePool.State|null} [state] StoragePool state + * @property {string|null} [stateDetails] StoragePool stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] StoragePool createTime + * @property {string|null} [description] StoragePool description + * @property {Object.|null} [labels] StoragePool labels + * @property {string|null} [network] StoragePool network + * @property {string|null} [activeDirectory] StoragePool activeDirectory + * @property {string|null} [kmsConfig] StoragePool kmsConfig + * @property {boolean|null} [ldapEnabled] StoragePool ldapEnabled + * @property {string|null} [psaRange] StoragePool psaRange + * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] StoragePool encryptionType + * @property {boolean|null} [globalAccessAllowed] StoragePool globalAccessAllowed + * @property {boolean|null} [allowAutoTiering] StoragePool allowAutoTiering + * @property {string|null} [replicaZone] StoragePool replicaZone + * @property {string|null} [zone] StoragePool zone + * @property {boolean|null} [satisfiesPzs] StoragePool satisfiesPzs + * @property {boolean|null} [satisfiesPzi] StoragePool satisfiesPzi + * @property {boolean|null} [customPerformanceEnabled] StoragePool customPerformanceEnabled + * @property {number|Long|null} [totalThroughputMibps] StoragePool totalThroughputMibps + * @property {number|Long|null} [totalIops] StoragePool totalIops + * @property {number|Long|null} [hotTierSizeGib] StoragePool hotTierSizeGib + * @property {boolean|null} [enableHotTierAutoResize] StoragePool enableHotTierAutoResize + * @property {google.cloud.netapp.v1.QosType|null} [qosType] StoragePool qosType + * @property {number|null} [availableThroughputMibps] StoragePool availableThroughputMibps + * @property {number|Long|null} [coldTierSizeUsedGib] StoragePool coldTierSizeUsedGib + * @property {number|Long|null} [hotTierSizeUsedGib] StoragePool hotTierSizeUsedGib + * @property {google.cloud.netapp.v1.StoragePoolType|null} [type] StoragePool type + * @property {google.cloud.netapp.v1.Mode|null} [mode] StoragePool mode + */ + + /** + * Constructs a new StoragePool. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a StoragePool. + * @implements IStoragePool + * @constructor + * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set + */ + function StoragePool(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoragePool name. + * @member {string} name + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.name = ""; + + /** + * StoragePool serviceLevel. + * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.serviceLevel = 0; + + /** + * StoragePool capacityGib. + * @member {number|Long} capacityGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool volumeCapacityGib. + * @member {number|Long} volumeCapacityGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.volumeCapacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool volumeCount. + * @member {number} volumeCount + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.volumeCount = 0; + + /** + * StoragePool state. + * @member {google.cloud.netapp.v1.StoragePool.State} state + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.state = 0; + + /** + * StoragePool stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.stateDetails = ""; + + /** + * StoragePool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.createTime = null; + + /** + * StoragePool description. + * @member {string} description + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.description = ""; + + /** + * StoragePool labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.labels = $util.emptyObject; + + /** + * StoragePool network. + * @member {string} network + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.network = ""; + + /** + * StoragePool activeDirectory. + * @member {string} activeDirectory + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.activeDirectory = ""; + + /** + * StoragePool kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.kmsConfig = ""; + + /** + * StoragePool ldapEnabled. + * @member {boolean} ldapEnabled + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.ldapEnabled = false; + + /** + * StoragePool psaRange. + * @member {string} psaRange + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.psaRange = ""; + + /** + * StoragePool encryptionType. + * @member {google.cloud.netapp.v1.EncryptionType} encryptionType + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.encryptionType = 0; + + /** + * StoragePool globalAccessAllowed. + * @member {boolean|null|undefined} globalAccessAllowed + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.globalAccessAllowed = null; + + /** + * StoragePool allowAutoTiering. + * @member {boolean} allowAutoTiering + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.allowAutoTiering = false; + + /** + * StoragePool replicaZone. + * @member {string} replicaZone + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.replicaZone = ""; + + /** + * StoragePool zone. + * @member {string} zone + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.zone = ""; + + /** + * StoragePool satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.satisfiesPzs = false; + + /** + * StoragePool satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.satisfiesPzi = false; + + /** + * StoragePool customPerformanceEnabled. + * @member {boolean} customPerformanceEnabled + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.customPerformanceEnabled = false; + + /** + * StoragePool totalThroughputMibps. + * @member {number|Long} totalThroughputMibps + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.totalThroughputMibps = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool totalIops. + * @member {number|Long} totalIops + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.totalIops = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool hotTierSizeGib. + * @member {number|Long} hotTierSizeGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.hotTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool enableHotTierAutoResize. + * @member {boolean|null|undefined} enableHotTierAutoResize + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.enableHotTierAutoResize = null; + + /** + * StoragePool qosType. + * @member {google.cloud.netapp.v1.QosType} qosType + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.qosType = 0; + + /** + * StoragePool availableThroughputMibps. + * @member {number} availableThroughputMibps + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.availableThroughputMibps = 0; + + /** + * StoragePool coldTierSizeUsedGib. + * @member {number|Long} coldTierSizeUsedGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.coldTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool hotTierSizeUsedGib. + * @member {number|Long} hotTierSizeUsedGib + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StoragePool type. + * @member {google.cloud.netapp.v1.StoragePoolType|null|undefined} type + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.type = null; + + /** + * StoragePool mode. + * @member {google.cloud.netapp.v1.Mode|null|undefined} mode + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.mode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StoragePool.prototype, "_globalAccessAllowed", { + get: $util.oneOfGetter($oneOfFields = ["globalAccessAllowed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StoragePool.prototype, "_enableHotTierAutoResize", { + get: $util.oneOfGetter($oneOfFields = ["enableHotTierAutoResize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StoragePool.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StoragePool.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StoragePool instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool instance + */ + StoragePool.create = function create(properties) { + return new StoragePool(properties); + }; + + /** + * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoragePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serviceLevel); + if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.capacityGib); + if (message.volumeCapacityGib != null && Object.hasOwnProperty.call(message, "volumeCapacityGib")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.volumeCapacityGib); + if (message.volumeCount != null && Object.hasOwnProperty.call(message, "volumeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.volumeCount); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.network); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.activeDirectory); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.kmsConfig); + if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.ldapEnabled); + if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.psaRange); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.encryptionType); + if (message.globalAccessAllowed != null && Object.hasOwnProperty.call(message, "globalAccessAllowed")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.globalAccessAllowed); + if (message.allowAutoTiering != null && Object.hasOwnProperty.call(message, "allowAutoTiering")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.allowAutoTiering); + if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.replicaZone); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.zone); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.satisfiesPzi); + if (message.customPerformanceEnabled != null && Object.hasOwnProperty.call(message, "customPerformanceEnabled")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.customPerformanceEnabled); + if (message.totalThroughputMibps != null && Object.hasOwnProperty.call(message, "totalThroughputMibps")) + writer.uint32(/* id 26, wireType 0 =*/208).int64(message.totalThroughputMibps); + if (message.totalIops != null && Object.hasOwnProperty.call(message, "totalIops")) + writer.uint32(/* id 27, wireType 0 =*/216).int64(message.totalIops); + if (message.hotTierSizeGib != null && Object.hasOwnProperty.call(message, "hotTierSizeGib")) + writer.uint32(/* id 28, wireType 0 =*/224).int64(message.hotTierSizeGib); + if (message.enableHotTierAutoResize != null && Object.hasOwnProperty.call(message, "enableHotTierAutoResize")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.enableHotTierAutoResize); + if (message.qosType != null && Object.hasOwnProperty.call(message, "qosType")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.qosType); + if (message.availableThroughputMibps != null && Object.hasOwnProperty.call(message, "availableThroughputMibps")) + writer.uint32(/* id 31, wireType 1 =*/249).double(message.availableThroughputMibps); + if (message.coldTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "coldTierSizeUsedGib")) + writer.uint32(/* id 33, wireType 0 =*/264).int64(message.coldTierSizeUsedGib); + if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) + writer.uint32(/* id 34, wireType 0 =*/272).int64(message.hotTierSizeUsedGib); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 35, wireType 0 =*/280).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 36, wireType 0 =*/288).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoragePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoragePool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoragePool.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StoragePool(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.serviceLevel = reader.int32(); + break; + } + case 3: { + message.capacityGib = reader.int64(); + break; + } + case 4: { + message.volumeCapacityGib = reader.int64(); + break; + } + case 5: { + message.volumeCount = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.stateDetails = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.description = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 11: { + message.network = reader.string(); + break; + } + case 12: { + message.activeDirectory = reader.string(); + break; + } + case 13: { + message.kmsConfig = reader.string(); + break; + } + case 14: { + message.ldapEnabled = reader.bool(); + break; + } + case 15: { + message.psaRange = reader.string(); + break; + } + case 16: { + message.encryptionType = reader.int32(); + break; + } + case 17: { + message.globalAccessAllowed = reader.bool(); + break; + } + case 18: { + message.allowAutoTiering = reader.bool(); + break; + } + case 20: { + message.replicaZone = reader.string(); + break; + } + case 21: { + message.zone = reader.string(); + break; + } + case 23: { + message.satisfiesPzs = reader.bool(); + break; + } + case 24: { + message.satisfiesPzi = reader.bool(); + break; + } + case 25: { + message.customPerformanceEnabled = reader.bool(); + break; + } + case 26: { + message.totalThroughputMibps = reader.int64(); + break; + } + case 27: { + message.totalIops = reader.int64(); + break; + } + case 28: { + message.hotTierSizeGib = reader.int64(); + break; + } + case 29: { + message.enableHotTierAutoResize = reader.bool(); + break; + } + case 30: { + message.qosType = reader.int32(); + break; + } + case 31: { + message.availableThroughputMibps = reader.double(); + break; + } + case 33: { + message.coldTierSizeUsedGib = reader.int64(); + break; + } + case 34: { + message.hotTierSizeUsedGib = reader.int64(); + break; + } + case 35: { + message.type = reader.int32(); + break; + } + case 36: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StoragePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoragePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoragePool message. + * @function verify + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoragePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) + return "capacityGib: integer|Long expected"; + if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) + if (!$util.isInteger(message.volumeCapacityGib) && !(message.volumeCapacityGib && $util.isInteger(message.volumeCapacityGib.low) && $util.isInteger(message.volumeCapacityGib.high))) + return "volumeCapacityGib: integer|Long expected"; + if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) + if (!$util.isInteger(message.volumeCount)) + return "volumeCount: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + 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 < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + if (!$util.isString(message.activeDirectory)) + return "activeDirectory: string expected"; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + if (!$util.isString(message.kmsConfig)) + return "kmsConfig: string expected"; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + if (typeof message.ldapEnabled !== "boolean") + return "ldapEnabled: boolean expected"; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + if (!$util.isString(message.psaRange)) + return "psaRange: string expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { + properties._globalAccessAllowed = 1; + if (typeof message.globalAccessAllowed !== "boolean") + return "globalAccessAllowed: boolean expected"; + } + if (message.allowAutoTiering != null && message.hasOwnProperty("allowAutoTiering")) + if (typeof message.allowAutoTiering !== "boolean") + return "allowAutoTiering: boolean expected"; + if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) + if (!$util.isString(message.replicaZone)) + return "replicaZone: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + if (message.customPerformanceEnabled != null && message.hasOwnProperty("customPerformanceEnabled")) + if (typeof message.customPerformanceEnabled !== "boolean") + return "customPerformanceEnabled: boolean expected"; + if (message.totalThroughputMibps != null && message.hasOwnProperty("totalThroughputMibps")) + if (!$util.isInteger(message.totalThroughputMibps) && !(message.totalThroughputMibps && $util.isInteger(message.totalThroughputMibps.low) && $util.isInteger(message.totalThroughputMibps.high))) + return "totalThroughputMibps: integer|Long expected"; + if (message.totalIops != null && message.hasOwnProperty("totalIops")) + if (!$util.isInteger(message.totalIops) && !(message.totalIops && $util.isInteger(message.totalIops.low) && $util.isInteger(message.totalIops.high))) + return "totalIops: integer|Long expected"; + if (message.hotTierSizeGib != null && message.hasOwnProperty("hotTierSizeGib")) + if (!$util.isInteger(message.hotTierSizeGib) && !(message.hotTierSizeGib && $util.isInteger(message.hotTierSizeGib.low) && $util.isInteger(message.hotTierSizeGib.high))) + return "hotTierSizeGib: integer|Long expected"; + if (message.enableHotTierAutoResize != null && message.hasOwnProperty("enableHotTierAutoResize")) { + properties._enableHotTierAutoResize = 1; + if (typeof message.enableHotTierAutoResize !== "boolean") + return "enableHotTierAutoResize: boolean expected"; + } + if (message.qosType != null && message.hasOwnProperty("qosType")) + switch (message.qosType) { + default: + return "qosType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.availableThroughputMibps != null && message.hasOwnProperty("availableThroughputMibps")) + if (typeof message.availableThroughputMibps !== "number") + return "availableThroughputMibps: number expected"; + if (message.coldTierSizeUsedGib != null && message.hasOwnProperty("coldTierSizeUsedGib")) + if (!$util.isInteger(message.coldTierSizeUsedGib) && !(message.coldTierSizeUsedGib && $util.isInteger(message.coldTierSizeUsedGib.low) && $util.isInteger(message.coldTierSizeUsedGib.high))) + return "coldTierSizeUsedGib: integer|Long expected"; + if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) + if (!$util.isInteger(message.hotTierSizeUsedGib) && !(message.hotTierSizeUsedGib && $util.isInteger(message.hotTierSizeUsedGib.low) && $util.isInteger(message.hotTierSizeUsedGib.high))) + return "hotTierSizeUsedGib: integer|Long expected"; + 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.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a StoragePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.StoragePool} StoragePool + */ + StoragePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.StoragePool) + return object; + var message = new $root.google.cloud.netapp.v1.StoragePool(); + if (object.name != null) + message.name = String(object.name); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "PREMIUM": + case 1: + message.serviceLevel = 1; + break; + case "EXTREME": + case 2: + message.serviceLevel = 2; + break; + case "STANDARD": + case 3: + message.serviceLevel = 3; + break; + case "FLEX": + case 4: + message.serviceLevel = 4; + break; + } + if (object.capacityGib != null) + if ($util.Long) + (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; + else if (typeof object.capacityGib === "string") + message.capacityGib = parseInt(object.capacityGib, 10); + else if (typeof object.capacityGib === "number") + message.capacityGib = object.capacityGib; + else if (typeof object.capacityGib === "object") + message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); + if (object.volumeCapacityGib != null) + if ($util.Long) + (message.volumeCapacityGib = $util.Long.fromValue(object.volumeCapacityGib)).unsigned = false; + else if (typeof object.volumeCapacityGib === "string") + message.volumeCapacityGib = parseInt(object.volumeCapacityGib, 10); + else if (typeof object.volumeCapacityGib === "number") + message.volumeCapacityGib = object.volumeCapacityGib; + else if (typeof object.volumeCapacityGib === "object") + message.volumeCapacityGib = new $util.LongBits(object.volumeCapacityGib.low >>> 0, object.volumeCapacityGib.high >>> 0).toNumber(); + if (object.volumeCount != null) + message.volumeCount = object.volumeCount | 0; + 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 "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "RESTORING": + case 5: + message.state = 5; + break; + case "DISABLED": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.StoragePool.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.StoragePool.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.network != null) + message.network = String(object.network); + if (object.activeDirectory != null) + message.activeDirectory = String(object.activeDirectory); + if (object.kmsConfig != null) + message.kmsConfig = String(object.kmsConfig); + if (object.ldapEnabled != null) + message.ldapEnabled = Boolean(object.ldapEnabled); + if (object.psaRange != null) + message.psaRange = String(object.psaRange); + switch (object.encryptionType) { + default: + if (typeof object.encryptionType === "number") { + message.encryptionType = object.encryptionType; + break; + } + break; + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "SERVICE_MANAGED": + case 1: + message.encryptionType = 1; + break; + case "CLOUD_KMS": + case 2: + message.encryptionType = 2; + break; + } + if (object.globalAccessAllowed != null) + message.globalAccessAllowed = Boolean(object.globalAccessAllowed); + if (object.allowAutoTiering != null) + message.allowAutoTiering = Boolean(object.allowAutoTiering); + if (object.replicaZone != null) + message.replicaZone = String(object.replicaZone); + if (object.zone != null) + message.zone = String(object.zone); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.customPerformanceEnabled != null) + message.customPerformanceEnabled = Boolean(object.customPerformanceEnabled); + if (object.totalThroughputMibps != null) + if ($util.Long) + (message.totalThroughputMibps = $util.Long.fromValue(object.totalThroughputMibps)).unsigned = false; + else if (typeof object.totalThroughputMibps === "string") + message.totalThroughputMibps = parseInt(object.totalThroughputMibps, 10); + else if (typeof object.totalThroughputMibps === "number") + message.totalThroughputMibps = object.totalThroughputMibps; + else if (typeof object.totalThroughputMibps === "object") + message.totalThroughputMibps = new $util.LongBits(object.totalThroughputMibps.low >>> 0, object.totalThroughputMibps.high >>> 0).toNumber(); + if (object.totalIops != null) + if ($util.Long) + (message.totalIops = $util.Long.fromValue(object.totalIops)).unsigned = false; + else if (typeof object.totalIops === "string") + message.totalIops = parseInt(object.totalIops, 10); + else if (typeof object.totalIops === "number") + message.totalIops = object.totalIops; + else if (typeof object.totalIops === "object") + message.totalIops = new $util.LongBits(object.totalIops.low >>> 0, object.totalIops.high >>> 0).toNumber(); + if (object.hotTierSizeGib != null) + if ($util.Long) + (message.hotTierSizeGib = $util.Long.fromValue(object.hotTierSizeGib)).unsigned = false; + else if (typeof object.hotTierSizeGib === "string") + message.hotTierSizeGib = parseInt(object.hotTierSizeGib, 10); + else if (typeof object.hotTierSizeGib === "number") + message.hotTierSizeGib = object.hotTierSizeGib; + else if (typeof object.hotTierSizeGib === "object") + message.hotTierSizeGib = new $util.LongBits(object.hotTierSizeGib.low >>> 0, object.hotTierSizeGib.high >>> 0).toNumber(); + if (object.enableHotTierAutoResize != null) + message.enableHotTierAutoResize = Boolean(object.enableHotTierAutoResize); + switch (object.qosType) { + default: + if (typeof object.qosType === "number") { + message.qosType = object.qosType; + break; + } + break; + case "QOS_TYPE_UNSPECIFIED": + case 0: + message.qosType = 0; + break; + case "AUTO": + case 1: + message.qosType = 1; + break; + case "MANUAL": + case 2: + message.qosType = 2; + break; + } + if (object.availableThroughputMibps != null) + message.availableThroughputMibps = Number(object.availableThroughputMibps); + if (object.coldTierSizeUsedGib != null) + if ($util.Long) + (message.coldTierSizeUsedGib = $util.Long.fromValue(object.coldTierSizeUsedGib)).unsigned = false; + else if (typeof object.coldTierSizeUsedGib === "string") + message.coldTierSizeUsedGib = parseInt(object.coldTierSizeUsedGib, 10); + else if (typeof object.coldTierSizeUsedGib === "number") + message.coldTierSizeUsedGib = object.coldTierSizeUsedGib; + else if (typeof object.coldTierSizeUsedGib === "object") + message.coldTierSizeUsedGib = new $util.LongBits(object.coldTierSizeUsedGib.low >>> 0, object.coldTierSizeUsedGib.high >>> 0).toNumber(); + if (object.hotTierSizeUsedGib != null) + if ($util.Long) + (message.hotTierSizeUsedGib = $util.Long.fromValue(object.hotTierSizeUsedGib)).unsigned = false; + else if (typeof object.hotTierSizeUsedGib === "string") + message.hotTierSizeUsedGib = parseInt(object.hotTierSizeUsedGib, 10); + else if (typeof object.hotTierSizeUsedGib === "number") + message.hotTierSizeUsedGib = object.hotTierSizeUsedGib; + else if (typeof object.hotTierSizeUsedGib === "object") + message.hotTierSizeUsedGib = new $util.LongBits(object.hotTierSizeUsedGib.low >>> 0, object.hotTierSizeUsedGib.high >>> 0).toNumber(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "STORAGE_POOL_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "FILE": + case 1: + message.type = 1; + break; + case "UNIFIED": + case 2: + message.type = 2; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DEFAULT": + case 1: + message.mode = 1; + break; + case "ONTAP": + case 2: + message.mode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a StoragePool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {google.cloud.netapp.v1.StoragePool} message StoragePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoragePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.capacityGib = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.volumeCapacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.volumeCapacityGib = options.longs === String ? "0" : 0; + object.volumeCount = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; + object.network = ""; + object.activeDirectory = ""; + object.kmsConfig = ""; + object.ldapEnabled = false; + object.psaRange = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.allowAutoTiering = false; + object.replicaZone = ""; + object.zone = ""; + object.satisfiesPzs = false; + object.satisfiesPzi = false; + object.customPerformanceEnabled = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalThroughputMibps = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalThroughputMibps = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalIops = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalIops = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hotTierSizeGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hotTierSizeGib = options.longs === String ? "0" : 0; + object.qosType = options.enums === String ? "QOS_TYPE_UNSPECIFIED" : 0; + object.availableThroughputMibps = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.coldTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.coldTierSizeUsedGib = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hotTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hotTierSizeUsedGib = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) + if (typeof message.capacityGib === "number") + object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; + else + object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; + if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) + if (typeof message.volumeCapacityGib === "number") + object.volumeCapacityGib = options.longs === String ? String(message.volumeCapacityGib) : message.volumeCapacityGib; + else + object.volumeCapacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.volumeCapacityGib) : options.longs === Number ? new $util.LongBits(message.volumeCapacityGib.low >>> 0, message.volumeCapacityGib.high >>> 0).toNumber() : message.volumeCapacityGib; + if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) + object.volumeCount = message.volumeCount; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.StoragePool.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.StoragePool.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) + object.activeDirectory = message.activeDirectory; + if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) + object.kmsConfig = message.kmsConfig; + if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) + object.ldapEnabled = message.ldapEnabled; + if (message.psaRange != null && message.hasOwnProperty("psaRange")) + object.psaRange = message.psaRange; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { + object.globalAccessAllowed = message.globalAccessAllowed; + if (options.oneofs) + object._globalAccessAllowed = "globalAccessAllowed"; + } + if (message.allowAutoTiering != null && message.hasOwnProperty("allowAutoTiering")) + object.allowAutoTiering = message.allowAutoTiering; + if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) + object.replicaZone = message.replicaZone; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + if (message.customPerformanceEnabled != null && message.hasOwnProperty("customPerformanceEnabled")) + object.customPerformanceEnabled = message.customPerformanceEnabled; + if (message.totalThroughputMibps != null && message.hasOwnProperty("totalThroughputMibps")) + if (typeof message.totalThroughputMibps === "number") + object.totalThroughputMibps = options.longs === String ? String(message.totalThroughputMibps) : message.totalThroughputMibps; + else + object.totalThroughputMibps = options.longs === String ? $util.Long.prototype.toString.call(message.totalThroughputMibps) : options.longs === Number ? new $util.LongBits(message.totalThroughputMibps.low >>> 0, message.totalThroughputMibps.high >>> 0).toNumber() : message.totalThroughputMibps; + if (message.totalIops != null && message.hasOwnProperty("totalIops")) + if (typeof message.totalIops === "number") + object.totalIops = options.longs === String ? String(message.totalIops) : message.totalIops; + else + object.totalIops = options.longs === String ? $util.Long.prototype.toString.call(message.totalIops) : options.longs === Number ? new $util.LongBits(message.totalIops.low >>> 0, message.totalIops.high >>> 0).toNumber() : message.totalIops; + if (message.hotTierSizeGib != null && message.hasOwnProperty("hotTierSizeGib")) + if (typeof message.hotTierSizeGib === "number") + object.hotTierSizeGib = options.longs === String ? String(message.hotTierSizeGib) : message.hotTierSizeGib; + else + object.hotTierSizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeGib.low >>> 0, message.hotTierSizeGib.high >>> 0).toNumber() : message.hotTierSizeGib; + if (message.enableHotTierAutoResize != null && message.hasOwnProperty("enableHotTierAutoResize")) { + object.enableHotTierAutoResize = message.enableHotTierAutoResize; + if (options.oneofs) + object._enableHotTierAutoResize = "enableHotTierAutoResize"; + } + if (message.qosType != null && message.hasOwnProperty("qosType")) + object.qosType = options.enums === String ? $root.google.cloud.netapp.v1.QosType[message.qosType] === undefined ? message.qosType : $root.google.cloud.netapp.v1.QosType[message.qosType] : message.qosType; + if (message.availableThroughputMibps != null && message.hasOwnProperty("availableThroughputMibps")) + object.availableThroughputMibps = options.json && !isFinite(message.availableThroughputMibps) ? String(message.availableThroughputMibps) : message.availableThroughputMibps; + if (message.coldTierSizeUsedGib != null && message.hasOwnProperty("coldTierSizeUsedGib")) + if (typeof message.coldTierSizeUsedGib === "number") + object.coldTierSizeUsedGib = options.longs === String ? String(message.coldTierSizeUsedGib) : message.coldTierSizeUsedGib; + else + object.coldTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.coldTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.coldTierSizeUsedGib.low >>> 0, message.coldTierSizeUsedGib.high >>> 0).toNumber() : message.coldTierSizeUsedGib; + if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) + if (typeof message.hotTierSizeUsedGib === "number") + object.hotTierSizeUsedGib = options.longs === String ? String(message.hotTierSizeUsedGib) : message.hotTierSizeUsedGib; + else + object.hotTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeUsedGib.low >>> 0, message.hotTierSizeUsedGib.high >>> 0).toNumber() : message.hotTierSizeUsedGib; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.netapp.v1.StoragePoolType[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.StoragePoolType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.netapp.v1.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.netapp.v1.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + return object; + }; + + /** + * Converts this StoragePool to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + * @returns {Object.} JSON object + */ + StoragePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoragePool + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.StoragePool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoragePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.StoragePool"; + }; + + /** + * State enum. + * @name google.cloud.netapp.v1.StoragePool.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} RESTORING=5 RESTORING value + * @property {number} DISABLED=6 DISABLED value + * @property {number} ERROR=7 ERROR value + */ + StoragePool.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "RESTORING"] = 5; + values[valuesById[6] = "DISABLED"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + return StoragePool; + })(); + + v1.ValidateDirectoryServiceRequest = (function() { + + /** + * Properties of a ValidateDirectoryServiceRequest. + * @memberof google.cloud.netapp.v1 + * @interface IValidateDirectoryServiceRequest + * @property {string|null} [name] ValidateDirectoryServiceRequest name + * @property {google.cloud.netapp.v1.DirectoryServiceType|null} [directoryServiceType] ValidateDirectoryServiceRequest directoryServiceType + */ + + /** + * Constructs a new ValidateDirectoryServiceRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ValidateDirectoryServiceRequest. + * @implements IValidateDirectoryServiceRequest + * @constructor + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest=} [properties] Properties to set + */ + function ValidateDirectoryServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidateDirectoryServiceRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @instance + */ + ValidateDirectoryServiceRequest.prototype.name = ""; + + /** + * ValidateDirectoryServiceRequest directoryServiceType. + * @member {google.cloud.netapp.v1.DirectoryServiceType} directoryServiceType + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @instance + */ + ValidateDirectoryServiceRequest.prototype.directoryServiceType = 0; + + /** + * Creates a new ValidateDirectoryServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest instance + */ + ValidateDirectoryServiceRequest.create = function create(properties) { + return new ValidateDirectoryServiceRequest(properties); + }; + + /** + * Encodes the specified ValidateDirectoryServiceRequest message. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateDirectoryServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.directoryServiceType != null && Object.hasOwnProperty.call(message, "directoryServiceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.directoryServiceType); + return writer; + }; + + /** + * Encodes the specified ValidateDirectoryServiceRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateDirectoryServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateDirectoryServiceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.directoryServiceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateDirectoryServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateDirectoryServiceRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateDirectoryServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.directoryServiceType != null && message.hasOwnProperty("directoryServiceType")) + switch (message.directoryServiceType) { + default: + return "directoryServiceType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a ValidateDirectoryServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest + */ + ValidateDirectoryServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.directoryServiceType) { + default: + if (typeof object.directoryServiceType === "number") { + message.directoryServiceType = object.directoryServiceType; + break; + } + break; + case "DIRECTORY_SERVICE_TYPE_UNSPECIFIED": + case 0: + message.directoryServiceType = 0; + break; + case "ACTIVE_DIRECTORY": + case 1: + message.directoryServiceType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ValidateDirectoryServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateDirectoryServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.directoryServiceType = options.enums === String ? "DIRECTORY_SERVICE_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.directoryServiceType != null && message.hasOwnProperty("directoryServiceType")) + object.directoryServiceType = options.enums === String ? $root.google.cloud.netapp.v1.DirectoryServiceType[message.directoryServiceType] === undefined ? message.directoryServiceType : $root.google.cloud.netapp.v1.DirectoryServiceType[message.directoryServiceType] : message.directoryServiceType; + return object; + }; + + /** + * Converts this ValidateDirectoryServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @instance + * @returns {Object.} JSON object + */ + ValidateDirectoryServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValidateDirectoryServiceRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidateDirectoryServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ValidateDirectoryServiceRequest"; + }; + + return ValidateDirectoryServiceRequest; + })(); + + return v1; + })(); + + return netapp; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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 < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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 < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + 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 < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + 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); + } + 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); + } + 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); + } + 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); + } + 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); + } + 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); + } + 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); + } + 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); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + 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())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + 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 < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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 < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + 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 < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.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; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.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; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.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); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + 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 < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + 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); + } + 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 < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.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; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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 < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + 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); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + 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); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + 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); + } + 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); + } + 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); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + 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; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + 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; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + 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; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + 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 < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["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 < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["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 < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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 < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + 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_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + 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; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + 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; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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 < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + 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; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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 < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + 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; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + 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() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + 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); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + 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; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + 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() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + 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 < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + 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; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + 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 < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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); + 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; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + 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); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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 < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + 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 < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + 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; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + 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_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + 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; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + 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); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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())); + 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); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + 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); + } + 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 < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + 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); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + 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 < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 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; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 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; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + 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; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + 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; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + } + 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; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + 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; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + 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; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + 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; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + 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; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + 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; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + 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; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + 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 < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + 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_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + 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() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + 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 < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + 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 < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + 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 < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + 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 < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + 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 < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + 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; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + 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; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + 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); + 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); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + 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); + } + 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); + } + 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); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.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"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + 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); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + 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; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + 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 < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + 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; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + 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 < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.json b/owl-bot-staging/google-cloud-netapp/protos/protos.json new file mode 100644 index 00000000000..f5efdb48005 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/protos/protos.json @@ -0,0 +1,8651 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "netapp": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.NetApp.V1", + "go_package": "cloud.google.com/go/netapp/apiv1/netapppb;netapppb", + "java_multiple_files": true, + "java_outer_classname": "StoragePoolProto", + "java_package": "com.google.cloud.netapp.v1", + "php_namespace": "Google\\Cloud\\NetApp\\V1", + "ruby_package": "Google::Cloud::NetApp::V1", + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" + }, + "nested": { + "ListActiveDirectoriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListActiveDirectoriesResponse": { + "fields": { + "activeDirectories": { + "rule": "repeated", + "type": "ActiveDirectory", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetActiveDirectoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + } + } + }, + "CreateActiveDirectoryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "activeDirectory": { + "type": "ActiveDirectory", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDirectoryId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateActiveDirectoryRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "activeDirectory": { + "type": "ActiveDirectory", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteActiveDirectoryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + } + } + }, + "ActiveDirectory": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/ActiveDirectory", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/activeDirectories/{active_directory}", + "(google.api.resource).plural": "activeDirectories", + "(google.api.resource).singular": "activeDirectory" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "domain": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "site": { + "type": "string", + "id": 5 + }, + "dns": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "netBiosPrefix": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "organizationalUnit": { + "type": "string", + "id": 8 + }, + "aesEncryption": { + "type": "bool", + "id": 9 + }, + "username": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupOperators": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "administrators": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "securityOperators": { + "rule": "repeated", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kdcHostname": { + "type": "string", + "id": 14 + }, + "kdcIp": { + "type": "string", + "id": 15 + }, + "nfsUsersWithLdap": { + "type": "bool", + "id": 16 + }, + "description": { + "type": "string", + "id": 17 + }, + "ldapSigning": { + "type": "bool", + "id": 18 + }, + "encryptDcConnections": { + "type": "bool", + "id": 19 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 20 + }, + "stateDetails": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "IN_USE": 4, + "DELETING": 5, + "ERROR": 6, + "DIAGNOSING": 7 + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "_sourceSnapshot": { + "oneof": [ + "sourceSnapshot" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "volumeUsageBytes": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceVolume": { + "type": "string", + "id": 6, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "sourceSnapshot": { + "type": "string", + "id": 7, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9 + }, + "chainStorageBytes": { + "type": "int64", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "volumeRegion": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "backupRegion": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "UPLOADING": 2, + "READY": 3, + "DELETING": 4, + "ERROR": 5, + "UPDATING": 6 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "MANUAL": 1, + "SCHEDULED": 2 + } + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "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": "netapp.googleapis.com/Backup" + } + } + } + }, + "CreateBackupRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Backup" + } + }, + "backupId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" + } + } + } + }, + "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" + } + } + } + }, + "BackupPolicy": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/BackupPolicy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPolicies/{backup_policy}", + "(google.api.resource).plural": "backupPolicies", + "(google.api.resource).singular": "backupPolicy" + }, + "oneofs": { + "_dailyBackupLimit": { + "oneof": [ + "dailyBackupLimit" + ] + }, + "_weeklyBackupLimit": { + "oneof": [ + "weeklyBackupLimit" + ] + }, + "_monthlyBackupLimit": { + "oneof": [ + "monthlyBackupLimit" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_enabled": { + "oneof": [ + "enabled" + ] + }, + "_assignedVolumeCount": { + "oneof": [ + "assignedVolumeCount" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "dailyBackupLimit": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "weeklyBackupLimit": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "monthlyBackupLimit": { + "type": "int32", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "enabled": { + "type": "bool", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "assignedVolumeCount": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9 + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "ERROR": 4, + "UPDATING": 5 + } + } + } + }, + "CreateBackupPolicyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupPolicy" + } + }, + "backupPolicy": { + "type": "BackupPolicy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPolicyId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetBackupPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" + } + } + } + }, + "ListBackupPoliciesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupPolicy" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListBackupPoliciesResponse": { + "fields": { + "backupPolicies": { + "rule": "repeated", + "type": "BackupPolicy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateBackupPolicyRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPolicy": { + "type": "BackupPolicy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteBackupPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" + } + } + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backup_vault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "backupVaultType": { + "type": "BackupVaultType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sourceRegion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "backupRegion": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "sourceBackupVault": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" + } + }, + "destinationBackupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" + } + }, + "backupRetentionPolicy": { + "type": "BackupRetentionPolicy", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsConfig": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + }, + "encryptionState": { + "type": "EncryptionState", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupsCryptoKeyVersion": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "BackupRetentionPolicy": { + "fields": { + "backupMinimumEnforcedRetentionDays": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dailyBackupImmutable": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weeklyBackupImmutable": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "monthlyBackupImmutable": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "manualBackupImmutable": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "ERROR": 4, + "UPDATING": 5 + } + }, + "BackupVaultType": { + "values": { + "BACKUP_VAULT_TYPE_UNSPECIFIED": 0, + "IN_REGION": 1, + "CROSS_REGION": 2 + } + }, + "EncryptionState": { + "values": { + "ENCRYPTION_STATE_UNSPECIFIED": 0, + "ENCRYPTION_STATE_PENDING": 1, + "ENCRYPTION_STATE_COMPLETED": 2, + "ENCRYPTION_STATE_IN_PROGRESS": 3, + "ENCRYPTION_STATE_FAILED": 4 + } + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.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" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" + } + } + } + }, + "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" + } + } + } + }, + "NetApp": { + "options": { + "(google.api.default_host)": "netapp.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListStoragePools": { + "requestType": "ListStoragePoolsRequest", + "responseType": "ListStoragePoolsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/storagePools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/storagePools" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateStoragePool": { + "requestType": "CreateStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/storagePools", + "(google.api.http).body": "storage_pool", + "(google.api.method_signature)": "parent,storage_pool,storage_pool_id", + "(google.longrunning.operation_info).response_type": "StoragePool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/storagePools", + "body": "storage_pool" + } + }, + { + "(google.api.method_signature)": "parent,storage_pool,storage_pool_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StoragePool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetStoragePool": { + "requestType": "GetStoragePoolRequest", + "responseType": "StoragePool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/storagePools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/storagePools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateStoragePool": { + "requestType": "UpdateStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", + "(google.api.http).body": "storage_pool", + "(google.api.method_signature)": "storage_pool,update_mask", + "(google.longrunning.operation_info).response_type": "StoragePool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", + "body": "storage_pool" + } + }, + { + "(google.api.method_signature)": "storage_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StoragePool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteStoragePool": { + "requestType": "DeleteStoragePoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/storagePools/*}", + "(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": "/v1/{name=projects/*/locations/*/storagePools/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ValidateDirectoryService": { + "requestType": "ValidateDirectoryServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SwitchActiveReplicaZone": { + "requestType": "SwitchActiveReplicaZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/storagePools/*}:switch", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "StoragePool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/storagePools/*}:switch", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "StoragePool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListVolumes": { + "requestType": "ListVolumesRequest", + "responseType": "ListVolumesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/volumes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/volumes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVolume": { + "requestType": "GetVolumeRequest", + "responseType": "Volume", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateVolume": { + "requestType": "CreateVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/volumes", + "(google.api.http).body": "volume", + "(google.api.method_signature)": "parent,volume,volume_id", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/volumes", + "body": "volume" + } + }, + { + "(google.api.method_signature)": "parent,volume,volume_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateVolume": { + "requestType": "UpdateVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", + "(google.api.http).body": "volume", + "(google.api.method_signature)": "volume,update_mask", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", + "body": "volume" + } + }, + { + "(google.api.method_signature)": "volume,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteVolume": { + "requestType": "DeleteVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*}", + "(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": "/v1/{name=projects/*/locations/*/volumes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RevertVolume": { + "requestType": "RevertVolumeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "EstablishVolumePeering": { + "requestType": "EstablishVolumePeeringRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListSnapshots": { + "requestType": "ListSnapshotsRequest", + "responseType": "ListSnapshotsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetSnapshot": { + "requestType": "GetSnapshotRequest", + "responseType": "Snapshot", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateSnapshot": { + "requestType": "CreateSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "(google.api.http).body": "snapshot", + "(google.api.method_signature)": "parent,snapshot,snapshot_id", + "(google.longrunning.operation_info).response_type": "Snapshot", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", + "body": "snapshot" + } + }, + { + "(google.api.method_signature)": "parent,snapshot,snapshot_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteSnapshot": { + "requestType": "DeleteSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", + "(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": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateSnapshot": { + "requestType": "UpdateSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", + "(google.api.http).body": "snapshot", + "(google.api.method_signature)": "snapshot,update_mask", + "(google.longrunning.operation_info).response_type": "Snapshot", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", + "body": "snapshot" + } + }, + { + "(google.api.method_signature)": "snapshot,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListActiveDirectories": { + "requestType": "ListActiveDirectoriesRequest", + "responseType": "ListActiveDirectoriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/activeDirectories" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetActiveDirectory": { + "requestType": "GetActiveDirectoryRequest", + "responseType": "ActiveDirectory", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/activeDirectories/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/activeDirectories/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateActiveDirectory": { + "requestType": "CreateActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "(google.api.http).body": "active_directory", + "(google.api.method_signature)": "parent,active_directory,active_directory_id", + "(google.longrunning.operation_info).response_type": "ActiveDirectory", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/activeDirectories", + "body": "active_directory" + } + }, + { + "(google.api.method_signature)": "parent,active_directory,active_directory_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ActiveDirectory", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateActiveDirectory": { + "requestType": "UpdateActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", + "(google.api.http).body": "active_directory", + "(google.api.method_signature)": "active_directory,update_mask", + "(google.longrunning.operation_info).response_type": "ActiveDirectory", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", + "body": "active_directory" + } + }, + { + "(google.api.method_signature)": "active_directory,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ActiveDirectory", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteActiveDirectory": { + "requestType": "DeleteActiveDirectoryRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/activeDirectories/*}", + "(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": "/v1/{name=projects/*/locations/*/activeDirectories/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListKmsConfigs": { + "requestType": "ListKmsConfigsRequest", + "responseType": "ListKmsConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/kmsConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateKmsConfig": { + "requestType": "CreateKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "(google.api.http).body": "kms_config", + "(google.api.method_signature)": "parent,kms_config,kms_config_id", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", + "body": "kms_config" + } + }, + { + "(google.api.method_signature)": "parent,kms_config,kms_config_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetKmsConfig": { + "requestType": "GetKmsConfigRequest", + "responseType": "KmsConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateKmsConfig": { + "requestType": "UpdateKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", + "(google.api.http).body": "kms_config", + "(google.api.method_signature)": "kms_config,update_mask", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", + "body": "kms_config" + } + }, + { + "(google.api.method_signature)": "kms_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "EncryptVolumes": { + "requestType": "EncryptVolumesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "KmsConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "KmsConfig", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "VerifyKmsConfig": { + "requestType": "VerifyKmsConfigRequest", + "responseType": "VerifyKmsConfigResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", + "body": "*" + } + } + ] + }, + "DeleteKmsConfig": { + "requestType": "DeleteKmsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", + "(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": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListReplications": { + "requestType": "ListReplicationsRequest", + "responseType": "ListReplicationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetReplication": { + "requestType": "GetReplicationRequest", + "responseType": "Replication", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReplication": { + "requestType": "CreateReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "(google.api.http).body": "replication", + "(google.api.method_signature)": "parent,replication,replication_id", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", + "body": "replication" + } + }, + { + "(google.api.method_signature)": "parent,replication,replication_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteReplication": { + "requestType": "DeleteReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", + "(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": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateReplication": { + "requestType": "UpdateReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", + "(google.api.http).body": "replication", + "(google.api.method_signature)": "replication,update_mask", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", + "body": "replication" + } + }, + { + "(google.api.method_signature)": "replication,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "StopReplication": { + "requestType": "StopReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ResumeReplication": { + "requestType": "ResumeReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ReverseReplicationDirection": { + "requestType": "ReverseReplicationDirectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "EstablishPeering": { + "requestType": "EstablishPeeringRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SyncReplication": { + "requestType": "SyncReplicationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Replication", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Replication", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{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": "/v1/{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" + } + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{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": "/v1/{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": "/v1/{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": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackup": { + "requestType": "CreateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "parent,backup,backup_id", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "parent,backup,backup_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", + "(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": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/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": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPolicy": { + "requestType": "CreateBackupPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPolicies", + "(google.api.http).body": "backup_policy", + "(google.api.method_signature)": "parent,backup_policy,backup_policy_id", + "(google.longrunning.operation_info).response_type": "BackupPolicy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPolicies", + "body": "backup_policy" + } + }, + { + "(google.api.method_signature)": "parent,backup_policy,backup_policy_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPolicy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPolicy": { + "requestType": "GetBackupPolicyRequest", + "responseType": "BackupPolicy", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPolicies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPolicies": { + "requestType": "ListBackupPoliciesRequest", + "responseType": "ListBackupPoliciesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPolicies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPolicies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateBackupPolicy": { + "requestType": "UpdateBackupPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}", + "(google.api.http).body": "backup_policy", + "(google.api.method_signature)": "backup_policy,update_mask", + "(google.longrunning.operation_info).response_type": "BackupPolicy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}", + "body": "backup_policy" + } + }, + { + "(google.api.method_signature)": "backup_policy,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPolicy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupPolicy": { + "requestType": "DeleteBackupPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPolicies/*}", + "(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": "/v1/{name=projects/*/locations/*/backupPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListQuotaRules": { + "requestType": "ListQuotaRulesRequest", + "responseType": "ListQuotaRulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetQuotaRule": { + "requestType": "GetQuotaRuleRequest", + "responseType": "QuotaRule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateQuotaRule": { + "requestType": "CreateQuotaRuleRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", + "(google.api.http).body": "quota_rule", + "(google.api.method_signature)": "parent,quota_rule,quota_rule_id", + "(google.longrunning.operation_info).response_type": "QuotaRule", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", + "body": "quota_rule" + } + }, + { + "(google.api.method_signature)": "parent,quota_rule,quota_rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "QuotaRule", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateQuotaRule": { + "requestType": "UpdateQuotaRuleRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}", + "(google.api.http).body": "quota_rule", + "(google.api.method_signature)": "quota_rule,update_mask", + "(google.longrunning.operation_info).response_type": "QuotaRule", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}", + "body": "quota_rule" + } + }, + { + "(google.api.method_signature)": "quota_rule,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "QuotaRule", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteQuotaRule": { + "requestType": "DeleteQuotaRuleRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}", + "(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": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackupFiles": { + "requestType": "RestoreBackupFilesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:restore", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "RestoreBackupFilesResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*}:restore", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupFilesResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListHostGroups": { + "requestType": "ListHostGroupsRequest", + "responseType": "ListHostGroupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/hostGroups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/hostGroups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetHostGroup": { + "requestType": "GetHostGroupRequest", + "responseType": "HostGroup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/hostGroups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/hostGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateHostGroup": { + "requestType": "CreateHostGroupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/hostGroups", + "(google.api.http).body": "host_group", + "(google.api.method_signature)": "parent,host_group,host_group_id", + "(google.longrunning.operation_info).response_type": "HostGroup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/hostGroups", + "body": "host_group" + } + }, + { + "(google.api.method_signature)": "parent,host_group,host_group_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "HostGroup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateHostGroup": { + "requestType": "UpdateHostGroupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}", + "(google.api.http).body": "host_group", + "(google.api.method_signature)": "host_group,update_mask", + "(google.longrunning.operation_info).response_type": "HostGroup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}", + "body": "host_group" + } + }, + { + "(google.api.method_signature)": "host_group,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "HostGroup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteHostGroup": { + "requestType": "DeleteHostGroupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/hostGroups/*}", + "(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": "/v1/{name=projects/*/locations/*/hostGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ExecuteOntapPost": { + "requestType": "ExecuteOntapPostRequest", + "responseType": "ExecuteOntapPostResponse", + "options": { + "(google.api.http).post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "body": "*" + } + } + ] + }, + "ExecuteOntapGet": { + "requestType": "ExecuteOntapGetRequest", + "responseType": "ExecuteOntapGetResponse", + "options": { + "(google.api.http).get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + } + } + ] + }, + "ExecuteOntapDelete": { + "requestType": "ExecuteOntapDeleteRequest", + "responseType": "ExecuteOntapDeleteResponse", + "options": { + "(google.api.http).delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + } + } + ] + }, + "ExecuteOntapPatch": { + "requestType": "ExecuteOntapPatchRequest", + "responseType": "ExecuteOntapPatchResponse", + "options": { + "(google.api.http).patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "body": "*" + } + } + ] + } + } + }, + "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" + } + } + } + }, + "ListHostGroupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/HostGroup" + } + }, + "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" + } + } + } + }, + "ListHostGroupsResponse": { + "fields": { + "hostGroups": { + "rule": "repeated", + "type": "HostGroup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetHostGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" + } + } + } + }, + "CreateHostGroupRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/HostGroup" + } + }, + "hostGroup": { + "type": "HostGroup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hostGroupId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateHostGroupRequest": { + "fields": { + "hostGroup": { + "type": "HostGroup", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteHostGroupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" + } + } + } + }, + "HostGroup": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/HostGroup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/hostGroups/{host_group}", + "(google.api.resource).plural": "hostGroups", + "(google.api.resource).singular": "hostGroup" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hosts": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "osType": { + "type": "OsType", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ISCSI_INITIATOR": 1 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "DISABLED": 5 + } + } + } + }, + "ServiceLevel": { + "values": { + "SERVICE_LEVEL_UNSPECIFIED": 0, + "PREMIUM": 1, + "EXTREME": 2, + "STANDARD": 3, + "FLEX": 4 + } + }, + "FlexPerformance": { + "values": { + "FLEX_PERFORMANCE_UNSPECIFIED": 0, + "FLEX_PERFORMANCE_DEFAULT": 1, + "FLEX_PERFORMANCE_CUSTOM": 2 + } + }, + "EncryptionType": { + "values": { + "ENCRYPTION_TYPE_UNSPECIFIED": 0, + "SERVICE_MANAGED": 1, + "CLOUD_KMS": 2 + } + }, + "DirectoryServiceType": { + "values": { + "DIRECTORY_SERVICE_TYPE_UNSPECIFIED": 0, + "ACTIVE_DIRECTORY": 1 + } + }, + "StoragePoolType": { + "values": { + "STORAGE_POOL_TYPE_UNSPECIFIED": 0, + "FILE": 1, + "UNIFIED": 2 + } + }, + "HybridReplicationSchedule": { + "values": { + "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED": 0, + "EVERY_10_MINUTES": 1, + "HOURLY": 2, + "DAILY": 3 + } + }, + "QosType": { + "values": { + "QOS_TYPE_UNSPECIFIED": 0, + "AUTO": 1, + "MANUAL": 2 + } + }, + "OsType": { + "values": { + "OS_TYPE_UNSPECIFIED": 0, + "LINUX": 1, + "WINDOWS": 2, + "ESXI": 3 + } + }, + "LocationMetadata": { + "fields": { + "supportedServiceLevels": { + "rule": "repeated", + "type": "ServiceLevel", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportedFlexPerformance": { + "rule": "repeated", + "type": "FlexPerformance", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hasVcp": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hasOntapProxy": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserCommands": { + "fields": { + "commands": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "ListKmsConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListKmsConfigsResponse": { + "fields": { + "kmsConfigs": { + "rule": "repeated", + "type": "KmsConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateKmsConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" + } + }, + "kmsConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kmsConfig": { + "type": "KmsConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateKmsConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "kmsConfig": { + "type": "KmsConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "EncryptVolumesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "VerifyKmsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + } + } + }, + "VerifyKmsConfigResponse": { + "fields": { + "healthy": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "healthError": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instructions": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KmsConfig": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/KmsConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/kmsConfigs/{kms_config}", + "(google.api.resource).plural": "kmsConfigs", + "(google.api.resource).singular": "kmsConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "cryptoKeyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "instructions": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "IN_USE": 5, + "ERROR": 6, + "KEY_CHECK_PENDING": 7, + "KEY_NOT_REACHABLE": 8, + "DISABLING": 9, + "DISABLED": 10, + "MIGRATING": 11 + } + } + } + }, + "ExecuteOntapPostRequest": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ontapPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapPostResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapGetRequest": { + "fields": { + "ontapPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapGetResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapDeleteRequest": { + "fields": { + "ontapPath": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapDeleteResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapPatchRequest": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ontapPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapPatchResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ListQuotaRulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/QuotaRule" + } + }, + "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" + } + } + } + }, + "ListQuotaRulesResponse": { + "fields": { + "quotaRules": { + "rule": "repeated", + "type": "QuotaRule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetQuotaRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/QuotaRule" + } + } + } + }, + "CreateQuotaRuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/QuotaRule" + } + }, + "quotaRule": { + "type": "QuotaRule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "quotaRuleId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateQuotaRuleRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quotaRule": { + "type": "QuotaRule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteQuotaRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/QuotaRule" + } + } + } + }, + "QuotaRule": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/QuotaRule", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}", + "(google.api.resource).plural": "quotaRules", + "(google.api.resource).singular": "quotaRule" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "target": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "diskLimitMib": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INDIVIDUAL_USER_QUOTA": 1, + "INDIVIDUAL_GROUP_QUOTA": 2, + "DEFAULT_USER_QUOTA": 3, + "DEFAULT_GROUP_QUOTA": 4 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "UPDATING": 2, + "DELETING": 3, + "READY": 4, + "ERROR": 5 + } + } + } + }, + "TransferStats": { + "oneofs": { + "_transferBytes": { + "oneof": [ + "transferBytes" + ] + }, + "_totalTransferDuration": { + "oneof": [ + "totalTransferDuration" + ] + }, + "_lastTransferBytes": { + "oneof": [ + "lastTransferBytes" + ] + }, + "_lastTransferDuration": { + "oneof": [ + "lastTransferDuration" + ] + }, + "_lagDuration": { + "oneof": [ + "lagDuration" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_lastTransferEndTime": { + "oneof": [ + "lastTransferEndTime" + ] + }, + "_lastTransferError": { + "oneof": [ + "lastTransferError" + ] + } + }, + "fields": { + "transferBytes": { + "type": "int64", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "totalTransferDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "lastTransferBytes": { + "type": "int64", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "lastTransferDuration": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "lagDuration": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "lastTransferEndTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "lastTransferError": { + "type": "string", + "id": 8, + "options": { + "proto3_optional": true + } + } + } + }, + "Replication": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Replication", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}", + "(google.api.resource).plural": "replications", + "(google.api.resource).singular": "replication" + }, + "oneofs": { + "_healthy": { + "oneof": [ + "healthy" + ] + }, + "_description": { + "oneof": [ + "description" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "role": { + "type": "ReplicationRole", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "replicationSchedule": { + "type": "ReplicationSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mirrorState": { + "type": "MirrorState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "healthy": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destinationVolume": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "transferStats": { + "type": "TransferStats", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 12 + }, + "description": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "destinationVolumeParameters": { + "type": "DestinationVolumeParameters", + "id": 14, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceVolume": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "hybridPeeringDetails": { + "type": "HybridPeeringDetails", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clusterLocation": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hybridReplicationType": { + "type": "HybridReplicationType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hybridReplicationUserCommands": { + "type": "UserCommands", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 5, + "ERROR": 6, + "PENDING_CLUSTER_PEERING": 8, + "PENDING_SVM_PEERING": 9, + "PENDING_REMOTE_RESYNC": 10, + "EXTERNALLY_MANAGED_REPLICATION": 11 + } + }, + "ReplicationRole": { + "values": { + "REPLICATION_ROLE_UNSPECIFIED": 0, + "SOURCE": 1, + "DESTINATION": 2 + } + }, + "ReplicationSchedule": { + "values": { + "REPLICATION_SCHEDULE_UNSPECIFIED": 0, + "EVERY_10_MINUTES": 1, + "HOURLY": 2, + "DAILY": 3 + } + }, + "MirrorState": { + "values": { + "MIRROR_STATE_UNSPECIFIED": 0, + "PREPARING": 1, + "MIRRORED": 2, + "STOPPED": 3, + "TRANSFERRING": 4, + "BASELINE_TRANSFERRING": 5, + "ABORTED": 6, + "EXTERNALLY_MANAGED": 7, + "PENDING_PEERING": 8 + } + }, + "HybridReplicationType": { + "values": { + "HYBRID_REPLICATION_TYPE_UNSPECIFIED": 0, + "MIGRATION": 1, + "CONTINUOUS_REPLICATION": 2, + "ONPREM_REPLICATION": 3, + "REVERSE_ONPREM_REPLICATION": 4 + } + } + } + }, + "HybridPeeringDetails": { + "fields": { + "subnetIp": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "command": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "commandExpiryTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "passphrase": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peerVolumeName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peerClusterName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peerSvmName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListReplicationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListReplicationsResponse": { + "fields": { + "replications": { + "rule": "repeated", + "type": "Replication", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "DestinationVolumeParameters": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tieringPolicy": { + "oneof": [ + "tieringPolicy" + ] + } + }, + "fields": { + "storagePool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + }, + "volumeId": { + "type": "string", + "id": 2 + }, + "shareName": { + "type": "string", + "id": 3 + }, + "description": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "tieringPolicy": { + "type": "TieringPolicy", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CreateReplicationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" + } + }, + "replication": { + "type": "Replication", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "replicationId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "UpdateReplicationRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "replication": { + "type": "Replication", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StopReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "ResumeReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "ReverseReplicationDirectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "EstablishPeeringRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + }, + "peerClusterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerSvmName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerIpAddresses": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peerVolumeName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SyncReplicationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + } + } + }, + "Protocols": { + "values": { + "PROTOCOLS_UNSPECIFIED": 0, + "NFSV3": 1, + "NFSV4": 2, + "SMB": 3, + "ISCSI": 4 + } + }, + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + "READ_NONE": 3 + } + }, + "SMBSettings": { + "values": { + "SMB_SETTINGS_UNSPECIFIED": 0, + "ENCRYPT_DATA": 1, + "BROWSABLE": 2, + "CHANGE_NOTIFY": 3, + "NON_BROWSABLE": 4, + "OPLOCKS": 5, + "SHOW_SNAPSHOT": 6, + "SHOW_PREVIOUS_VERSIONS": 7, + "ACCESS_BASED_ENUMERATION": 8, + "CONTINUOUSLY_AVAILABLE": 9 + } + }, + "SecurityStyle": { + "values": { + "SECURITY_STYLE_UNSPECIFIED": 0, + "NTFS": 1, + "UNIX": 2 + } + }, + "RestrictedAction": { + "values": { + "RESTRICTED_ACTION_UNSPECIFIED": 0, + "DELETE": 1 + } + }, + "ListVolumesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListVolumesResponse": { + "fields": { + "volumes": { + "rule": "repeated", + "type": "Volume", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + } + } + }, + "CreateVolumeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" + } + }, + "volumeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volume": { + "type": "Volume", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateVolumeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volume": { + "type": "Volume", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "RevertVolumeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "snapshotId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Volume": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Volume", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}", + "(google.api.resource).plural": "volumes", + "(google.api.resource).singular": "volume" + }, + "oneofs": { + "_backupConfig": { + "oneof": [ + "backupConfig" + ] + }, + "_tieringPolicy": { + "oneof": [ + "tieringPolicy" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "shareName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "psaRange": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storagePool": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + }, + "network": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "capacityGib": { + "type": "int64", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "exportPolicy": { + "type": "ExportPolicy", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "protocols": { + "rule": "repeated", + "type": "Protocols", + "id": 12, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "smbSettings": { + "rule": "repeated", + "type": "SMBSettings", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mountOptions": { + "rule": "repeated", + "type": "MountOption", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unixPermissions": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotPolicy": { + "type": "SnapshotPolicy", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapReserve": { + "type": "double", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotDirectory": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "usedGib": { + "type": "int64", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "securityStyle": { + "type": "SecurityStyle", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kerberosEnabled": { + "type": "bool", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ldapEnabled": { + "type": "bool", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "activeDirectory": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "restoreParameters": { + "type": "RestoreParameters", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsConfig": { + "type": "string", + "id": 27, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + }, + "encryptionType": { + "type": "EncryptionType", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hasReplication": { + "type": "bool", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfig": { + "type": "BackupConfig", + "id": 30, + "options": { + "proto3_optional": true + } + }, + "restrictedActions": { + "rule": "repeated", + "type": "RestrictedAction", + "id": 31, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "largeCapacity": { + "type": "bool", + "id": 32, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "multipleEndpoints": { + "type": "bool", + "id": 33, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tieringPolicy": { + "type": "TieringPolicy", + "id": 34, + "options": { + "proto3_optional": true + } + }, + "replicaZone": { + "type": "string", + "id": 36, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "zone": { + "type": "string", + "id": 37, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "coldTierSizeGib": { + "type": "int64", + "id": 39, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hybridReplicationParameters": { + "type": "HybridReplicationParameters", + "id": 40, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "throughputMibps": { + "type": "double", + "id": 41, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cacheParameters": { + "type": "CacheParameters", + "id": 42, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hotTierSizeUsedGib": { + "type": "int64", + "id": 44, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "blockDevices": { + "rule": "repeated", + "type": "BlockDevice", + "id": 45, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloneDetails": { + "type": "CloneDetails", + "id": 47, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CloneDetails": { + "fields": { + "sourceSnapshot": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + }, + "sourceVolume": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "sharedSpaceGib": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "RESTORING": 5, + "DISABLED": 6, + "ERROR": 7, + "PREPARING": 8, + "READ_ONLY": 9 + } + } + } + }, + "ExportPolicy": { + "fields": { + "rules": { + "rule": "repeated", + "type": "SimpleExportPolicyRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SimpleExportPolicyRule": { + "oneofs": { + "_allowedClients": { + "oneof": [ + "allowedClients" + ] + }, + "_hasRootAccess": { + "oneof": [ + "hasRootAccess" + ] + }, + "_accessType": { + "oneof": [ + "accessType" + ] + }, + "_nfsv3": { + "oneof": [ + "nfsv3" + ] + }, + "_nfsv4": { + "oneof": [ + "nfsv4" + ] + }, + "_kerberos_5ReadOnly": { + "oneof": [ + "kerberos_5ReadOnly" + ] + }, + "_kerberos_5ReadWrite": { + "oneof": [ + "kerberos_5ReadWrite" + ] + }, + "_kerberos_5iReadOnly": { + "oneof": [ + "kerberos_5iReadOnly" + ] + }, + "_kerberos_5iReadWrite": { + "oneof": [ + "kerberos_5iReadWrite" + ] + }, + "_kerberos_5pReadOnly": { + "oneof": [ + "kerberos_5pReadOnly" + ] + }, + "_kerberos_5pReadWrite": { + "oneof": [ + "kerberos_5pReadWrite" + ] + }, + "_squashMode": { + "oneof": [ + "squashMode" + ] + }, + "_anonUid": { + "oneof": [ + "anonUid" + ] + } + }, + "fields": { + "allowedClients": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hasRootAccess": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "accessType": { + "type": "AccessType", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "nfsv3": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "nfsv4": { + "type": "bool", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "kerberos_5ReadOnly": { + "type": "bool", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "kerberos_5ReadWrite": { + "type": "bool", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "kerberos_5iReadOnly": { + "type": "bool", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "kerberos_5iReadWrite": { + "type": "bool", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "kerberos_5pReadOnly": { + "type": "bool", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "kerberos_5pReadWrite": { + "type": "bool", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "squashMode": { + "type": "SquashMode", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "anonUid": { + "type": "int64", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "SquashMode": { + "values": { + "SQUASH_MODE_UNSPECIFIED": 0, + "NO_ROOT_SQUASH": 1, + "ROOT_SQUASH": 2, + "ALL_SQUASH": 3 + } + } + } + }, + "SnapshotPolicy": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + }, + "_hourlySchedule": { + "oneof": [ + "hourlySchedule" + ] + }, + "_dailySchedule": { + "oneof": [ + "dailySchedule" + ] + }, + "_weeklySchedule": { + "oneof": [ + "weeklySchedule" + ] + }, + "_monthlySchedule": { + "oneof": [ + "monthlySchedule" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hourlySchedule": { + "type": "HourlySchedule", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "dailySchedule": { + "type": "DailySchedule", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "weeklySchedule": { + "type": "WeeklySchedule", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "monthlySchedule": { + "type": "MonthlySchedule", + "id": 5, + "options": { + "proto3_optional": true + } + } + } + }, + "HourlySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "DailySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "WeeklySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_day": { + "oneof": [ + "day" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "day": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "MonthlySchedule": { + "oneofs": { + "_snapshotsToKeep": { + "oneof": [ + "snapshotsToKeep" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_daysOfMonth": { + "oneof": [ + "daysOfMonth" + ] + } + }, + "fields": { + "snapshotsToKeep": { + "type": "double", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "daysOfMonth": { + "type": "string", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "MountOption": { + "fields": { + "export": { + "type": "string", + "id": 1 + }, + "exportFull": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "Protocols", + "id": 3 + }, + "instructions": { + "type": "string", + "id": 4 + }, + "ipAddress": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RestoreParameters": { + "oneofs": { + "source": { + "oneof": [ + "sourceSnapshot", + "sourceBackup" + ] + } + }, + "fields": { + "sourceSnapshot": { + "type": "string", + "id": 1 + }, + "sourceBackup": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" + } + } + } + }, + "BackupConfig": { + "oneofs": { + "_scheduledBackupEnabled": { + "oneof": [ + "scheduledBackupEnabled" + ] + }, + "_backupChainBytes": { + "oneof": [ + "backupChainBytes" + ] + } + }, + "fields": { + "backupPolicies": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" + } + }, + "backupVault": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" + } + }, + "scheduledBackupEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupChainBytes": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "TieringPolicy": { + "oneofs": { + "_tierAction": { + "oneof": [ + "tierAction" + ] + }, + "_coolingThresholdDays": { + "oneof": [ + "coolingThresholdDays" + ] + }, + "_hotTierBypassModeEnabled": { + "oneof": [ + "hotTierBypassModeEnabled" + ] + } + }, + "fields": { + "tierAction": { + "type": "TierAction", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "coolingThresholdDays": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "hotTierBypassModeEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "TierAction": { + "values": { + "TIER_ACTION_UNSPECIFIED": 0, + "ENABLED": 1, + "PAUSED": 2 + } + } + } + }, + "HybridReplicationParameters": { + "fields": { + "replication": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" + } + }, + "peerVolumeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerClusterName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerSvmName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerIpAddresses": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterLocation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "replicationSchedule": { + "type": "HybridReplicationSchedule", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hybridReplicationType": { + "type": "VolumeHybridReplicationType", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "largeVolumeConstituentCount": { + "type": "int32", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "VolumeHybridReplicationType": { + "values": { + "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED": 0, + "MIGRATION": 1, + "CONTINUOUS_REPLICATION": 2, + "ONPREM_REPLICATION": 3, + "REVERSE_ONPREM_REPLICATION": 4 + } + } + } + }, + "CacheParameters": { + "oneofs": { + "_enableGlobalFileLock": { + "oneof": [ + "enableGlobalFileLock" + ] + } + }, + "fields": { + "peerVolumeName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerClusterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerSvmName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerIpAddresses": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enableGlobalFileLock": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "cacheConfig": { + "type": "CacheConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cacheState": { + "type": "CacheState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "command": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "peeringCommandExpiryTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "passphrase": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CacheState": { + "values": { + "CACHE_STATE_UNSPECIFIED": 0, + "PENDING_CLUSTER_PEERING": 1, + "PENDING_SVM_PEERING": 2, + "PEERED": 3, + "ERROR": 4 + } + } + } + }, + "CacheConfig": { + "oneofs": { + "_writebackEnabled": { + "oneof": [ + "writebackEnabled" + ] + }, + "_cifsChangeNotifyEnabled": { + "oneof": [ + "cifsChangeNotifyEnabled" + ] + } + }, + "fields": { + "cachePrePopulate": { + "type": "CachePrePopulate", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "writebackEnabled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "cifsChangeNotifyEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "cachePrePopulateState": { + "type": "CachePrePopulateState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "CachePrePopulateState": { + "values": { + "CACHE_PRE_POPULATE_STATE_UNSPECIFIED": 0, + "NOT_NEEDED": 1, + "IN_PROGRESS": 2, + "COMPLETE": 3, + "ERROR": 4 + } + } + } + }, + "CachePrePopulate": { + "oneofs": { + "_recursion": { + "oneof": [ + "recursion" + ] + } + }, + "fields": { + "pathList": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "excludePathList": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "recursion": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "BlockDevice": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_sizeGib": { + "oneof": [ + "sizeGib" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "hostGroups": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" + } + }, + "identifier": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sizeGib": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "osType": { + "type": "OsType", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "RestoreBackupFilesRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "backup": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" + } + }, + "fileList": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "restoreDestinationPath": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupFilesResponse": { + "fields": {} + }, + "EstablishVolumePeeringRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "peerClusterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerSvmName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerIpAddresses": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peerVolumeName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListSnapshotsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListSnapshotsResponse": { + "fields": { + "snapshots": { + "rule": "repeated", + "type": "Snapshot", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + } + } + }, + "CreateSnapshotRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" + } + }, + "snapshot": { + "type": "Snapshot", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "snapshotId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSnapshotRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + } + } + }, + "UpdateSnapshotRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "snapshot": { + "type": "Snapshot", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Snapshot": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/Snapshot", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}", + "(google.api.resource).plural": "snapshots", + "(google.api.resource).singular": "snapshot" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4 + }, + "usedBytes": { + "type": "double", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "DISABLED": 5, + "ERROR": 6 + } + } + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DEFAULT": 1, + "ONTAP": 2 + } + }, + "GetStoragePoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + } + } + }, + "ListStoragePoolsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListStoragePoolsResponse": { + "fields": { + "storagePools": { + "rule": "repeated", + "type": "StoragePool", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateStoragePoolRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" + } + }, + "storagePoolId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "storagePool": { + "type": "StoragePool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateStoragePoolRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "storagePool": { + "type": "StoragePool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteStoragePoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + } + } + }, + "SwitchActiveReplicaZoneRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + } + } + }, + "StoragePool": { + "options": { + "(google.api.resource).type": "netapp.googleapis.com/StoragePool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/storagePools/{storage_pool}", + "(google.api.resource).plural": "storagePools", + "(google.api.resource).singular": "storagePool" + }, + "oneofs": { + "_globalAccessAllowed": { + "oneof": [ + "globalAccessAllowed" + ] + }, + "_enableHotTierAutoResize": { + "oneof": [ + "enableHotTierAutoResize" + ] + }, + "_type": { + "oneof": [ + "type" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "capacityGib": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "volumeCapacityGib": { + "type": "int64", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "volumeCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDetails": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "network": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "activeDirectory": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" + } + }, + "kmsConfig": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" + } + }, + "ldapEnabled": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "psaRange": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionType": { + "type": "EncryptionType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "globalAccessAllowed": { + "type": "bool", + "id": 17, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "allowAutoTiering": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "replicaZone": { + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "zone": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customPerformanceEnabled": { + "type": "bool", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "totalThroughputMibps": { + "type": "int64", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "totalIops": { + "type": "int64", + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hotTierSizeGib": { + "type": "int64", + "id": 28, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableHotTierAutoResize": { + "type": "bool", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "qosType": { + "type": "QosType", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "availableThroughputMibps": { + "type": "double", + "id": 31, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "coldTierSizeUsedGib": { + "type": "int64", + "id": 33, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "hotTierSizeUsedGib": { + "type": "int64", + "id": 34, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "StoragePoolType", + "id": 35, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "mode": { + "type": "Mode", + "id": 36, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "READY": 1, + "CREATING": 2, + "DELETING": 3, + "UPDATING": 4, + "RESTORING": 5, + "DISABLED": 6, + "ERROR": 7 + } + } + } + }, + "ValidateDirectoryServiceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" + } + }, + "directoryServiceType": { + "type": "DirectoryServiceType", + "id": 2 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldInfoProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js new file mode 100644 index 00000000000..31b378e5049 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.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, activeDirectory, activeDirectoryId) { + // [START netapp_v1_generated_NetApp_CreateActiveDirectory_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. Fields of the to be created active directory. + */ + // const activeDirectory = {} + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + */ + // const activeDirectoryId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateActiveDirectory() { + // Construct request + const request = { + parent, + activeDirectory, + activeDirectoryId, + }; + + // Run request + const [operation] = await netappClient.createActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateActiveDirectory(); + // [END netapp_v1_generated_NetApp_CreateActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js new file mode 100644 index 00000000000..458e0441e99 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.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(parent, backupId, backup) { + // [START netapp_v1_generated_NetApp_CreateBackup_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 NetApp backupVault to create the backups of, in the format + * `projects/* /locations/* /backupVaults/{backup_vault_id}` + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const backupId = 'abc123' + /** + * Required. A backup resource + */ + // const backup = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateBackup() { + // Construct request + const request = { + parent, + backupId, + backup, + }; + + // Run request + const [operation] = await netappClient.createBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackup(); + // [END netapp_v1_generated_NetApp_CreateBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js new file mode 100644 index 00000000000..39e6e62f5af --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.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(parent, backupPolicy, backupPolicyId) { + // [START netapp_v1_generated_NetApp_CreateBackupPolicy_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 location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. A backupPolicy resource + */ + // const backupPolicy = {} + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const backupPolicyId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateBackupPolicy() { + // Construct request + const request = { + parent, + backupPolicy, + backupPolicyId, + }; + + // Run request + const [operation] = await netappClient.createBackupPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPolicy(); + // [END netapp_v1_generated_NetApp_CreateBackupPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js new file mode 100644 index 00000000000..d4ecdbe122b --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.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(parent, backupVaultId, backupVault) { + // [START netapp_v1_generated_NetApp_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. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const backupVaultId = 'abc123' + /** + * Required. A backupVault resource + */ + // const backupVault = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateBackupVault() { + // Construct request + const request = { + parent, + backupVaultId, + backupVault, + }; + + // Run request + const [operation] = await netappClient.createBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupVault(); + // [END netapp_v1_generated_NetApp_CreateBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js new file mode 100644 index 00000000000..6235728719e --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.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, hostGroup, hostGroupId) { + // [START netapp_v1_generated_NetApp_CreateHostGroup_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. Parent value for CreateHostGroupRequest + */ + // const parent = 'abc123' + /** + * Required. Fields of the host group to create. + */ + // const hostGroup = {} + /** + * Required. ID of the host group to create. Must be unique within the parent + * resource. Must contain only letters, numbers, and hyphen, with + * the first character a letter or underscore, the last a letter or underscore + * or a number, and a 63 character maximum. + */ + // const hostGroupId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateHostGroup() { + // Construct request + const request = { + parent, + hostGroup, + hostGroupId, + }; + + // Run request + const [operation] = await netappClient.createHostGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateHostGroup(); + // [END netapp_v1_generated_NetApp_CreateHostGroup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js new file mode 100644 index 00000000000..3179e6f3acc --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.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, kmsConfigId, kmsConfig) { + // [START netapp_v1_generated_NetApp_CreateKmsConfig_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 KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const kmsConfigId = 'abc123' + /** + * Required. The required parameters to create a new KmsConfig. + */ + // const kmsConfig = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateKmsConfig() { + // Construct request + const request = { + parent, + kmsConfigId, + kmsConfig, + }; + + // Run request + const [operation] = await netappClient.createKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateKmsConfig(); + // [END netapp_v1_generated_NetApp_CreateKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js new file mode 100644 index 00000000000..8a2fcbc803a --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.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, quotaRule, quotaRuleId) { + // [START netapp_v1_generated_NetApp_CreateQuotaRule_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. Parent value for CreateQuotaRuleRequest + */ + // const parent = 'abc123' + /** + * Required. Fields of the to be created quota rule. + */ + // const quotaRule = {} + /** + * Required. ID of the quota rule to create. Must be unique within the parent + * resource. Must contain only letters, numbers, underscore and hyphen, with + * the first character a letter or underscore, the last a letter or underscore + * or a number, and a 63 character maximum. + */ + // const quotaRuleId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateQuotaRule() { + // Construct request + const request = { + parent, + quotaRule, + quotaRuleId, + }; + + // Run request + const [operation] = await netappClient.createQuotaRule(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateQuotaRule(); + // [END netapp_v1_generated_NetApp_CreateQuotaRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js new file mode 100644 index 00000000000..4d464edbcb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.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(parent, replication, replicationId) { + // [START netapp_v1_generated_NetApp_CreateReplication_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 NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const parent = 'abc123' + /** + * Required. A replication resource + */ + // const replication = {} + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const replicationId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateReplication() { + // Construct request + const request = { + parent, + replication, + replicationId, + }; + + // Run request + const [operation] = await netappClient.createReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReplication(); + // [END netapp_v1_generated_NetApp_CreateReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js new file mode 100644 index 00000000000..d163e256b51 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.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(parent, snapshot, snapshotId) { + // [START netapp_v1_generated_NetApp_CreateSnapshot_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 NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const parent = 'abc123' + /** + * Required. A snapshot resource + */ + // const snapshot = {} + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + */ + // const snapshotId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateSnapshot() { + // Construct request + const request = { + parent, + snapshot, + snapshotId, + }; + + // Run request + const [operation] = await netappClient.createSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateSnapshot(); + // [END netapp_v1_generated_NetApp_CreateSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js new file mode 100644 index 00000000000..1ed7da5d9c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.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, storagePoolId, storagePool) { + // [START netapp_v1_generated_NetApp_CreateStoragePool_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 storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + */ + // const storagePoolId = 'abc123' + /** + * Required. The required parameters to create a new storage pool. + */ + // const storagePool = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateStoragePool() { + // Construct request + const request = { + parent, + storagePoolId, + storagePool, + }; + + // Run request + const [operation] = await netappClient.createStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateStoragePool(); + // [END netapp_v1_generated_NetApp_CreateStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js new file mode 100644 index 00000000000..bf1f3730f97 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.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, volumeId, volume) { + // [START netapp_v1_generated_NetApp_CreateVolume_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 volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + */ + // const volumeId = 'abc123' + /** + * Required. The volume being created. + */ + // const volume = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callCreateVolume() { + // Construct request + const request = { + parent, + volumeId, + volume, + }; + + // Run request + const [operation] = await netappClient.createVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateVolume(); + // [END netapp_v1_generated_NetApp_CreateVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js new file mode 100644 index 00000000000..026fd08a065 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.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 netapp_v1_generated_NetApp_DeleteActiveDirectory_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 active directory. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteActiveDirectory() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteActiveDirectory(); + // [END netapp_v1_generated_NetApp_DeleteActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js new file mode 100644 index 00000000000..56b108461d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.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 netapp_v1_generated_NetApp_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. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackup(); + // [END netapp_v1_generated_NetApp_DeleteBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js new file mode 100644 index 00000000000..f481f2ae0d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_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 netapp_v1_generated_NetApp_DeleteBackupPolicy_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 policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteBackupPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteBackupPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPolicy(); + // [END netapp_v1_generated_NetApp_DeleteBackupPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js new file mode 100644 index 00000000000..71ab3f2f35a --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.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 netapp_v1_generated_NetApp_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. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupVault(); + // [END netapp_v1_generated_NetApp_DeleteBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js new file mode 100644 index 00000000000..556e9af3831 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.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 netapp_v1_generated_NetApp_DeleteHostGroup_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 host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteHostGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteHostGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteHostGroup(); + // [END netapp_v1_generated_NetApp_DeleteHostGroup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js new file mode 100644 index 00000000000..d731aa65b1c --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.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 netapp_v1_generated_NetApp_DeleteKmsConfig_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 KmsConfig. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteKmsConfig(); + // [END netapp_v1_generated_NetApp_DeleteKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js new file mode 100644 index 00000000000..69966182a7d --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.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 netapp_v1_generated_NetApp_DeleteQuotaRule_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 quota rule. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteQuotaRule() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteQuotaRule(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteQuotaRule(); + // [END netapp_v1_generated_NetApp_DeleteQuotaRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js new file mode 100644 index 00000000000..aaac2d37bb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.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 netapp_v1_generated_NetApp_DeleteReplication_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 replication resource name, in the format + * `projects/* /locations/* /volumes/* /replications/{replication_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteReplication(); + // [END netapp_v1_generated_NetApp_DeleteReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js new file mode 100644 index 00000000000..cf8ad05fe76 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.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 netapp_v1_generated_NetApp_DeleteSnapshot_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 snapshot resource name, in the format + * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteSnapshot(); + // [END netapp_v1_generated_NetApp_DeleteSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js new file mode 100644 index 00000000000..afc3830ff1c --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.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 netapp_v1_generated_NetApp_DeleteStoragePool_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 storage pool + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteStoragePool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteStoragePool(); + // [END netapp_v1_generated_NetApp_DeleteStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js new file mode 100644 index 00000000000..8481dbc64f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js @@ -0,0 +1,68 @@ +// 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 netapp_v1_generated_NetApp_DeleteVolume_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 volume + */ + // const name = 'abc123' + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + */ + // const force = true + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callDeleteVolume() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.deleteVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVolume(); + // [END netapp_v1_generated_NetApp_DeleteVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js new file mode 100644 index 00000000000..f796cd89097 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.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 netapp_v1_generated_NetApp_EncryptVolumes_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 KmsConfig. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callEncryptVolumes() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.encryptVolumes(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEncryptVolumes(); + // [END netapp_v1_generated_NetApp_EncryptVolumes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js new file mode 100644 index 00000000000..5efbe9f51bf --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.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, peerClusterName, peerSvmName, peerVolumeName) { + // [START netapp_v1_generated_NetApp_EstablishPeering_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 replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + */ + // const peerClusterName = 'abc123' + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + */ + // const peerSvmName = 'abc123' + /** + * Optional. List of IPv4 ip addresses to be used for peering. + */ + // const peerIpAddresses = ['abc','def'] + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + */ + // const peerVolumeName = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callEstablishPeering() { + // Construct request + const request = { + name, + peerClusterName, + peerSvmName, + peerVolumeName, + }; + + // Run request + const [operation] = await netappClient.establishPeering(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEstablishPeering(); + // [END netapp_v1_generated_NetApp_EstablishPeering_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js new file mode 100644 index 00000000000..4ede778cc35 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.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, peerClusterName, peerSvmName, peerVolumeName) { + // [START netapp_v1_generated_NetApp_EstablishVolumePeering_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 volume resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const name = 'abc123' + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + */ + // const peerClusterName = 'abc123' + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + */ + // const peerSvmName = 'abc123' + /** + * Optional. List of IPv4 ip addresses to be used for peering. + */ + // const peerIpAddresses = ['abc','def'] + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + */ + // const peerVolumeName = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callEstablishVolumePeering() { + // Construct request + const request = { + name, + peerClusterName, + peerSvmName, + peerVolumeName, + }; + + // Run request + const [operation] = await netappClient.establishVolumePeering(request); + const [response] = await operation.promise(); + console.log(response); + } + + callEstablishVolumePeering(); + // [END netapp_v1_generated_NetApp_EstablishVolumePeering_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js new file mode 100644 index 00000000000..f7c47f1aac8 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js @@ -0,0 +1,65 @@ +// 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(ontapPath) { + // [START netapp_v1_generated_NetApp_ExecuteOntapDelete_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 path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + */ + // const ontapPath = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callExecuteOntapDelete() { + // Construct request + const request = { + ontapPath, + }; + + // Run request + const response = await netappClient.executeOntapDelete(request); + console.log(response); + } + + callExecuteOntapDelete(); + // [END netapp_v1_generated_NetApp_ExecuteOntapDelete_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js new file mode 100644 index 00000000000..423b113c3dc --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js @@ -0,0 +1,65 @@ +// 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(ontapPath) { + // [START netapp_v1_generated_NetApp_ExecuteOntapGet_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 path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + */ + // const ontapPath = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callExecuteOntapGet() { + // Construct request + const request = { + ontapPath, + }; + + // Run request + const response = await netappClient.executeOntapGet(request); + console.log(response); + } + + callExecuteOntapGet(); + // [END netapp_v1_generated_NetApp_ExecuteOntapGet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js new file mode 100644 index 00000000000..8f779182fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js @@ -0,0 +1,80 @@ +// 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(body, ontapPath) { + // [START netapp_v1_generated_NetApp_ExecuteOntapPatch_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 raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + */ + // const body = {} + /** + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + */ + // const ontapPath = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callExecuteOntapPatch() { + // Construct request + const request = { + body, + ontapPath, + }; + + // Run request + const response = await netappClient.executeOntapPatch(request); + console.log(response); + } + + callExecuteOntapPatch(); + // [END netapp_v1_generated_NetApp_ExecuteOntapPatch_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js new file mode 100644 index 00000000000..8afa52b6cd0 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js @@ -0,0 +1,80 @@ +// 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(body, ontapPath) { + // [START netapp_v1_generated_NetApp_ExecuteOntapPost_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 raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + */ + // const body = {} + /** + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + */ + // const ontapPath = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callExecuteOntapPost() { + // Construct request + const request = { + body, + ontapPath, + }; + + // Run request + const response = await netappClient.executeOntapPost(request); + console.log(response); + } + + callExecuteOntapPost(); + // [END netapp_v1_generated_NetApp_ExecuteOntapPost_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js new file mode 100644 index 00000000000..ed07a5a18da --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_GetActiveDirectory_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 active directory. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetActiveDirectory() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getActiveDirectory(request); + console.log(response); + } + + callGetActiveDirectory(); + // [END netapp_v1_generated_NetApp_GetActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js new file mode 100644 index 00000000000..1df7b977650 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.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 netapp_v1_generated_NetApp_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. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getBackup(request); + console.log(response); + } + + callGetBackup(); + // [END netapp_v1_generated_NetApp_GetBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js new file mode 100644 index 00000000000..6f793387d6e --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.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 netapp_v1_generated_NetApp_GetBackupPolicy_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 backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetBackupPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getBackupPolicy(request); + console.log(response); + } + + callGetBackupPolicy(); + // [END netapp_v1_generated_NetApp_GetBackupPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js new file mode 100644 index 00000000000..f1ae1d89ccb --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.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 netapp_v1_generated_NetApp_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. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getBackupVault(request); + console.log(response); + } + + callGetBackupVault(); + // [END netapp_v1_generated_NetApp_GetBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js new file mode 100644 index 00000000000..c62fdf4462c --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.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 netapp_v1_generated_NetApp_GetHostGroup_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 host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetHostGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getHostGroup(request); + console.log(response); + } + + callGetHostGroup(); + // [END netapp_v1_generated_NetApp_GetHostGroup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js new file mode 100644 index 00000000000..5c73e47c56e --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_GetKmsConfig_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 KmsConfig + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getKmsConfig(request); + console.log(response); + } + + callGetKmsConfig(); + // [END netapp_v1_generated_NetApp_GetKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js new file mode 100644 index 00000000000..da422de8eac --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_GetQuotaRule_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 quota rule + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetQuotaRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getQuotaRule(request); + console.log(response); + } + + callGetQuotaRule(); + // [END netapp_v1_generated_NetApp_GetQuotaRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js new file mode 100644 index 00000000000..c361cc95339 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.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 netapp_v1_generated_NetApp_GetReplication_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 replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getReplication(request); + console.log(response); + } + + callGetReplication(); + // [END netapp_v1_generated_NetApp_GetReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js new file mode 100644 index 00000000000..e245487ab72 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.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 netapp_v1_generated_NetApp_GetSnapshot_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 snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetSnapshot() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getSnapshot(request); + console.log(response); + } + + callGetSnapshot(); + // [END netapp_v1_generated_NetApp_GetSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js new file mode 100644 index 00000000000..0230baccdba --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_GetStoragePool_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 storage pool + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetStoragePool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getStoragePool(request); + console.log(response); + } + + callGetStoragePool(); + // [END netapp_v1_generated_NetApp_GetStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js new file mode 100644 index 00000000000..1cb55342a02 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_GetVolume_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 volume + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callGetVolume() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.getVolume(request); + console.log(response); + } + + callGetVolume(); + // [END netapp_v1_generated_NetApp_GetVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js new file mode 100644 index 00000000000..0484db94a8a --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListActiveDirectories_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. Parent value for ListActiveDirectoriesRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListActiveDirectories() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listActiveDirectoriesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListActiveDirectories(); + // [END netapp_v1_generated_NetApp_ListActiveDirectories_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js new file mode 100644 index 00000000000..227fb6101e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListBackupPolicies_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. Parent value for ListBackupPoliciesRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListBackupPolicies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listBackupPoliciesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPolicies(); + // [END netapp_v1_generated_NetApp_ListBackupPolicies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js new file mode 100644 index 00000000000..aaf31aa628d --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js @@ -0,0 +1,82 @@ +// 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 netapp_v1_generated_NetApp_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 location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupVaults(); + // [END netapp_v1_generated_NetApp_ListBackupVaults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js new file mode 100644 index 00000000000..c8c1cc0884b --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.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 netapp_v1_generated_NetApp_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 backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListBackups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listBackupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackups(); + // [END netapp_v1_generated_NetApp_ListBackups_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js new file mode 100644 index 00000000000..21481365263 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListHostGroups_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. Parent value for ListHostGroupsRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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. Filter to apply to the request. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListHostGroups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listHostGroupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListHostGroups(); + // [END netapp_v1_generated_NetApp_ListHostGroups_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js new file mode 100644 index 00000000000..d945c624a76 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListKmsConfigs_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. Parent value + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListKmsConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listKmsConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListKmsConfigs(); + // [END netapp_v1_generated_NetApp_ListKmsConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js new file mode 100644 index 00000000000..d8126a8ca4b --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListQuotaRules_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. Parent value for ListQuotaRulesRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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 Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListQuotaRules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listQuotaRulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListQuotaRules(); + // [END netapp_v1_generated_NetApp_ListQuotaRules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js new file mode 100644 index 00000000000..b6594f636a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js @@ -0,0 +1,82 @@ +// 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 netapp_v1_generated_NetApp_ListReplications_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 volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListReplications() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listReplicationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReplications(); + // [END netapp_v1_generated_NetApp_ListReplications_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js new file mode 100644 index 00000000000..fbd5af4d086 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js @@ -0,0 +1,82 @@ +// 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 netapp_v1_generated_NetApp_ListSnapshots_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 volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + */ + // const orderBy = 'abc123' + /** + * List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListSnapshots() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listSnapshotsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSnapshots(); + // [END netapp_v1_generated_NetApp_ListSnapshots_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js new file mode 100644 index 00000000000..800fafad8c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.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 netapp_v1_generated_NetApp_ListStoragePools_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. Parent value + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + */ + // const pageToken = 'abc123' + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + */ + // const orderBy = 'abc123' + /** + * Optional. List filter. + */ + // const filter = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListStoragePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listStoragePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListStoragePools(); + // [END netapp_v1_generated_NetApp_ListStoragePools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js new file mode 100644 index 00000000000..28920d390bd --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js @@ -0,0 +1,80 @@ +// 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 netapp_v1_generated_NetApp_ListVolumes_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. Parent value for ListVolumesRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callListVolumes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = netappClient.listVolumesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVolumes(); + // [END netapp_v1_generated_NetApp_ListVolumes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js new file mode 100644 index 00000000000..86ccb4f42e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js @@ -0,0 +1,80 @@ +// 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, backup, fileList) { + // [START netapp_v1_generated_NetApp_RestoreBackupFiles_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 volume resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + */ + // const name = 'abc123' + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + */ + // const backup = 'abc123' + /** + * Required. List of files to be restored, specified by their absolute path in + * the source volume. + */ + // const fileList = ['abc','def'] + /** + * Optional. Absolute directory path in the destination volume. This is + * required if the `file_list` is provided. + */ + // const restoreDestinationPath = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callRestoreBackupFiles() { + // Construct request + const request = { + name, + backup, + fileList, + }; + + // Run request + const [operation] = await netappClient.restoreBackupFiles(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestoreBackupFiles(); + // [END netapp_v1_generated_NetApp_RestoreBackupFiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js new file mode 100644 index 00000000000..c22c829ec70 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.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 netapp_v1_generated_NetApp_ResumeReplication_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 replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callResumeReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.resumeReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callResumeReplication(); + // [END netapp_v1_generated_NetApp_ResumeReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js new file mode 100644 index 00000000000..3315b725171 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.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 netapp_v1_generated_NetApp_ReverseReplicationDirection_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 replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callReverseReplicationDirection() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.reverseReplicationDirection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReverseReplicationDirection(); + // [END netapp_v1_generated_NetApp_ReverseReplicationDirection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js new file mode 100644 index 00000000000..25a14933085 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.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, snapshotId) { + // [START netapp_v1_generated_NetApp_RevertVolume_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 volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + */ + // const name = 'abc123' + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + */ + // const snapshotId = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callRevertVolume() { + // Construct request + const request = { + name, + snapshotId, + }; + + // Run request + const [operation] = await netappClient.revertVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRevertVolume(); + // [END netapp_v1_generated_NetApp_RevertVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js new file mode 100644 index 00000000000..082c4ef16f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js @@ -0,0 +1,72 @@ +// 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 netapp_v1_generated_NetApp_StopReplication_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 replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + */ + // const force = true + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callStopReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.stopReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callStopReplication(); + // [END netapp_v1_generated_NetApp_StopReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js new file mode 100644 index 00000000000..4e0012e739f --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.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 netapp_v1_generated_NetApp_SwitchActiveReplicaZone_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 storage pool + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callSwitchActiveReplicaZone() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.switchActiveReplicaZone(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSwitchActiveReplicaZone(); + // [END netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js new file mode 100644 index 00000000000..052fe2f3a20 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.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 netapp_v1_generated_NetApp_SyncReplication_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 replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callSyncReplication() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.syncReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSyncReplication(); + // [END netapp_v1_generated_NetApp_SyncReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js new file mode 100644 index 00000000000..406d7c67ee8 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.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(updateMask, activeDirectory) { + // [START netapp_v1_generated_NetApp_UpdateActiveDirectory_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 + * Active Directory 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 = {} + /** + * Required. The volume being updated + */ + // const activeDirectory = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateActiveDirectory() { + // Construct request + const request = { + updateMask, + activeDirectory, + }; + + // Run request + const [operation] = await netappClient.updateActiveDirectory(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateActiveDirectory(); + // [END netapp_v1_generated_NetApp_UpdateActiveDirectory_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js new file mode 100644 index 00000000000..df0f16f95be --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.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(updateMask, backup) { + // [START netapp_v1_generated_NetApp_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 to be updated. + * 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 = {} + /** + * Required. The backup being updated + */ + // const backup = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateBackup() { + // Construct request + const request = { + updateMask, + backup, + }; + + // Run request + const [operation] = await netappClient.updateBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackup(); + // [END netapp_v1_generated_NetApp_UpdateBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js new file mode 100644 index 00000000000..12f9961ff23 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_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(updateMask, backupPolicy) { + // [START netapp_v1_generated_NetApp_UpdateBackupPolicy_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 Policy 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 = {} + /** + * Required. The backup policy being updated + */ + // const backupPolicy = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateBackupPolicy() { + // Construct request + const request = { + updateMask, + backupPolicy, + }; + + // Run request + const [operation] = await netappClient.updateBackupPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupPolicy(); + // [END netapp_v1_generated_NetApp_UpdateBackupPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js new file mode 100644 index 00000000000..8e259da98b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.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(updateMask, backupVault) { + // [START netapp_v1_generated_NetApp_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 + * Backup resource to be updated. + * 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 = {} + /** + * Required. The backupVault being updated + */ + // const backupVault = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateBackupVault() { + // Construct request + const request = { + updateMask, + backupVault, + }; + + // Run request + const [operation] = await netappClient.updateBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupVault(); + // [END netapp_v1_generated_NetApp_UpdateBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js new file mode 100644 index 00000000000..5a5999afcd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js @@ -0,0 +1,69 @@ +// 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(hostGroup) { + // [START netapp_v1_generated_NetApp_UpdateHostGroup_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 host group to update. + * The host group's `name` field is used to identify the host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + */ + // const hostGroup = {} + /** + * Optional. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateHostGroup() { + // Construct request + const request = { + hostGroup, + }; + + // Run request + const [operation] = await netappClient.updateHostGroup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateHostGroup(); + // [END netapp_v1_generated_NetApp_UpdateHostGroup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js new file mode 100644 index 00000000000..0d66a76ec28 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.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(updateMask, kmsConfig) { + // [START netapp_v1_generated_NetApp_UpdateKmsConfig_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 + * KmsConfig 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 = {} + /** + * Required. The KmsConfig being updated + */ + // const kmsConfig = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateKmsConfig() { + // Construct request + const request = { + updateMask, + kmsConfig, + }; + + // Run request + const [operation] = await netappClient.updateKmsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateKmsConfig(); + // [END netapp_v1_generated_NetApp_UpdateKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js new file mode 100644 index 00000000000..319588346dc --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.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(quotaRule) { + // [START netapp_v1_generated_NetApp_UpdateQuotaRule_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. Field mask is used to specify the fields to be overwritten in the + * Quota Rule 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 = {} + /** + * Required. The quota rule being updated + */ + // const quotaRule = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateQuotaRule() { + // Construct request + const request = { + quotaRule, + }; + + // Run request + const [operation] = await netappClient.updateQuotaRule(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateQuotaRule(); + // [END netapp_v1_generated_NetApp_UpdateQuotaRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js new file mode 100644 index 00000000000..284b283aa62 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js @@ -0,0 +1,68 @@ +// 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, replication) { + // [START netapp_v1_generated_NetApp_UpdateReplication_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. A replication resource + */ + // const replication = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateReplication() { + // Construct request + const request = { + updateMask, + replication, + }; + + // Run request + const [operation] = await netappClient.updateReplication(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateReplication(); + // [END netapp_v1_generated_NetApp_UpdateReplication_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js new file mode 100644 index 00000000000..75e061925db --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js @@ -0,0 +1,68 @@ +// 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, snapshot) { + // [START netapp_v1_generated_NetApp_UpdateSnapshot_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. A snapshot resource + */ + // const snapshot = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateSnapshot() { + // Construct request + const request = { + updateMask, + snapshot, + }; + + // Run request + const [operation] = await netappClient.updateSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateSnapshot(); + // [END netapp_v1_generated_NetApp_UpdateSnapshot_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js new file mode 100644 index 00000000000..b660c800b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.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(updateMask, storagePool) { + // [START netapp_v1_generated_NetApp_UpdateStoragePool_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 + * StoragePool 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 = {} + /** + * Required. The pool being updated + */ + // const storagePool = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateStoragePool() { + // Construct request + const request = { + updateMask, + storagePool, + }; + + // Run request + const [operation] = await netappClient.updateStoragePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateStoragePool(); + // [END netapp_v1_generated_NetApp_UpdateStoragePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js new file mode 100644 index 00000000000..77dcc920375 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.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(updateMask, volume) { + // [START netapp_v1_generated_NetApp_UpdateVolume_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 + * Volume 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 = {} + /** + * Required. The volume being updated + */ + // const volume = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callUpdateVolume() { + // Construct request + const request = { + updateMask, + volume, + }; + + // Run request + const [operation] = await netappClient.updateVolume(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateVolume(); + // [END netapp_v1_generated_NetApp_UpdateVolume_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js new file mode 100644 index 00000000000..716d084a7e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js @@ -0,0 +1,66 @@ +// 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 netapp_v1_generated_NetApp_ValidateDirectoryService_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 storage pool + */ + // const name = 'abc123' + /** + * Type of directory service policy attached to the storage pool. + */ + // const directoryServiceType = {} + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callValidateDirectoryService() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await netappClient.validateDirectoryService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callValidateDirectoryService(); + // [END netapp_v1_generated_NetApp_ValidateDirectoryService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js new file mode 100644 index 00000000000..0c6efa97c71 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js @@ -0,0 +1,61 @@ +// 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 netapp_v1_generated_NetApp_VerifyKmsConfig_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 KMS Config to be verified. + */ + // const name = 'abc123' + + // Imports the Netapp library + const {NetAppClient} = require('@google-cloud/netapp').v1; + + // Instantiates a client + const netappClient = new NetAppClient(); + + async function callVerifyKmsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await netappClient.verifyKmsConfig(request); + console.log(response); + } + + callVerifyKmsConfig(); + // [END netapp_v1_generated_NetApp_VerifyKmsConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json new file mode 100644 index 00000000000..64d94420465 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json @@ -0,0 +1,3231 @@ +{ + "clientLibrary": { + "name": "nodejs-netapp", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.netapp.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "netapp_v1_generated_NetApp_ListStoragePools_async", + "title": "NetApp listStoragePools Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all storage pools owned by the caller.", + "canonical": true, + "file": "net_app.list_storage_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListStoragePools", + "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListStoragePoolsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListStoragePools", + "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateStoragePool_async", + "title": "NetApp createStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a new storage pool.", + "canonical": true, + "file": "net_app.create_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "storage_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "storage_pool", + "type": ".google.cloud.netapp.v1.StoragePool" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetStoragePool_async", + "title": "NetApp getStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified storage pool by poolId.", + "canonical": true, + "file": "net_app.get_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.StoragePool", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateStoragePool_async", + "title": "NetApp updateStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the storage pool properties with the full spec", + "canonical": true, + "file": "net_app.update_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "storage_pool", + "type": ".google.cloud.netapp.v1.StoragePool" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteStoragePool_async", + "title": "NetApp deleteStoragePool Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the storage pool.", + "canonical": true, + "file": "net_app.delete_storage_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteStoragePool", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ValidateDirectoryService_async", + "title": "NetApp validateDirectoryService Sample", + "origin": "API_DEFINITION", + "description": " ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.", + "canonical": true, + "file": "net_app.validate_directory_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ValidateDirectoryService", + "fullName": "google.cloud.netapp.v1.NetApp.ValidateDirectoryService", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "directory_service_type", + "type": ".google.cloud.netapp.v1.DirectoryServiceType" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ValidateDirectoryService", + "fullName": "google.cloud.netapp.v1.NetApp.ValidateDirectoryService", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async", + "title": "NetApp switchActiveReplicaZone Sample", + "origin": "API_DEFINITION", + "description": " This operation will switch the active/replica zone for a regional storagePool.", + "canonical": true, + "file": "net_app.switch_active_replica_zone.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SwitchActiveReplicaZone", + "fullName": "google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZone", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "SwitchActiveReplicaZone", + "fullName": "google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZone", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListVolumes_async", + "title": "NetApp listVolumes Sample", + "origin": "API_DEFINITION", + "description": " Lists Volumes in a given project.", + "canonical": true, + "file": "net_app.list_volumes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListVolumesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetVolume_async", + "title": "NetApp getVolume Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Volume.", + "canonical": true, + "file": "net_app.get_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVolume", + "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Volume", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetVolume", + "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateVolume_async", + "title": "NetApp createVolume Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Volume in a given project and location.", + "canonical": true, + "file": "net_app.create_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "volume_id", + "type": "TYPE_STRING" + }, + { + "name": "volume", + "type": ".google.cloud.netapp.v1.Volume" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateVolume_async", + "title": "NetApp updateVolume Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Volume.", + "canonical": true, + "file": "net_app.update_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "volume", + "type": ".google.cloud.netapp.v1.Volume" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateVolume", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteVolume_async", + "title": "NetApp deleteVolume Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Volume.", + "canonical": true, + "file": "net_app.delete_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVolume", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteVolume", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_RevertVolume_async", + "title": "NetApp revertVolume Sample", + "origin": "API_DEFINITION", + "description": " Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.", + "canonical": true, + "file": "net_app.revert_volume.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevertVolume", + "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "RevertVolume", + "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_EstablishVolumePeering_async", + "title": "NetApp establishVolumePeering Sample", + "origin": "API_DEFINITION", + "description": " Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.", + "canonical": true, + "file": "net_app.establish_volume_peering.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EstablishVolumePeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "peer_cluster_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_svm_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_ip_addresses", + "type": "TYPE_STRING[]" + }, + { + "name": "peer_volume_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "EstablishVolumePeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListSnapshots_async", + "title": "NetApp listSnapshots Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all snapshots for a volume.", + "canonical": true, + "file": "net_app.list_snapshots.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSnapshots", + "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListSnapshotsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListSnapshots", + "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetSnapshot_async", + "title": "NetApp getSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Describe a snapshot for a volume.", + "canonical": true, + "file": "net_app.get_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Snapshot", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateSnapshot_async", + "title": "NetApp createSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Create a new snapshot for a volume.", + "canonical": true, + "file": "net_app.create_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "snapshot", + "type": ".google.cloud.netapp.v1.Snapshot" + }, + { + "name": "snapshot_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteSnapshot_async", + "title": "NetApp deleteSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Deletes a snapshot.", + "canonical": true, + "file": "net_app.delete_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateSnapshot_async", + "title": "NetApp updateSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific snapshot.", + "canonical": true, + "file": "net_app.update_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "snapshot", + "type": ".google.cloud.netapp.v1.Snapshot" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateSnapshot", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListActiveDirectories_async", + "title": "NetApp listActiveDirectories Sample", + "origin": "API_DEFINITION", + "description": " Lists active directories.", + "canonical": true, + "file": "net_app.list_active_directories.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListActiveDirectories", + "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListActiveDirectoriesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListActiveDirectories", + "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetActiveDirectory_async", + "title": "NetApp getActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Describes a specified active directory.", + "canonical": true, + "file": "net_app.get_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ActiveDirectory", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateActiveDirectory_async", + "title": "NetApp createActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " CreateActiveDirectory Creates the active directory specified in the request.", + "canonical": true, + "file": "net_app.create_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "active_directory", + "type": ".google.cloud.netapp.v1.ActiveDirectory" + }, + { + "name": "active_directory_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateActiveDirectory_async", + "title": "NetApp updateActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Update the parameters of an active directories.", + "canonical": true, + "file": "net_app.update_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "active_directory", + "type": ".google.cloud.netapp.v1.ActiveDirectory" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteActiveDirectory_async", + "title": "NetApp deleteActiveDirectory Sample", + "origin": "API_DEFINITION", + "description": " Delete the active directory specified in the request.", + "canonical": true, + "file": "net_app.delete_active_directory.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteActiveDirectory", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListKmsConfigs_async", + "title": "NetApp listKmsConfigs Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all KMS configs owned by the caller.", + "canonical": true, + "file": "net_app.list_kms_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListKmsConfigs", + "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListKmsConfigsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListKmsConfigs", + "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateKmsConfig_async", + "title": "NetApp createKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new KMS config.", + "canonical": true, + "file": "net_app.create_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "kms_config_id", + "type": "TYPE_STRING" + }, + { + "name": "kms_config", + "type": ".google.cloud.netapp.v1.KmsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetKmsConfig_async", + "title": "NetApp getKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified KMS config by kms_config_id.", + "canonical": true, + "file": "net_app.get_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.KmsConfig", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateKmsConfig_async", + "title": "NetApp updateKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the Kms config properties with the full spec", + "canonical": true, + "file": "net_app.update_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "kms_config", + "type": ".google.cloud.netapp.v1.KmsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_EncryptVolumes_async", + "title": "NetApp encryptVolumes Sample", + "origin": "API_DEFINITION", + "description": " Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.", + "canonical": true, + "file": "net_app.encrypt_volumes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EncryptVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "EncryptVolumes", + "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_VerifyKmsConfig_async", + "title": "NetApp verifyKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Verifies KMS config reachability.", + "canonical": true, + "file": "net_app.verify_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "VerifyKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.VerifyKmsConfigResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "VerifyKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteKmsConfig_async", + "title": "NetApp deleteKmsConfig Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the Kms config.", + "canonical": true, + "file": "net_app.delete_kms_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteKmsConfig", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListReplications_async", + "title": "NetApp listReplications Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all replications for a volume.", + "canonical": true, + "file": "net_app.list_replications.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReplications", + "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListReplicationsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListReplications", + "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetReplication_async", + "title": "NetApp getReplication Sample", + "origin": "API_DEFINITION", + "description": " Describe a replication for a volume.", + "canonical": true, + "file": "net_app.get_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReplication", + "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Replication", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetReplication", + "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateReplication_async", + "title": "NetApp createReplication Sample", + "origin": "API_DEFINITION", + "description": " Create a new replication for a volume.", + "canonical": true, + "file": "net_app.create_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "replication", + "type": ".google.cloud.netapp.v1.Replication" + }, + { + "name": "replication_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteReplication_async", + "title": "NetApp deleteReplication Sample", + "origin": "API_DEFINITION", + "description": " Deletes a replication.", + "canonical": true, + "file": "net_app.delete_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReplication", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteReplication", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateReplication_async", + "title": "NetApp updateReplication Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific replication.", + "canonical": true, + "file": "net_app.update_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "replication", + "type": ".google.cloud.netapp.v1.Replication" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateReplication", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_StopReplication_async", + "title": "NetApp stopReplication Sample", + "origin": "API_DEFINITION", + "description": " Stop Cross Region Replication.", + "canonical": true, + "file": "net_app.stop_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StopReplication", + "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "StopReplication", + "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ResumeReplication_async", + "title": "NetApp resumeReplication Sample", + "origin": "API_DEFINITION", + "description": " Resume Cross Region Replication.", + "canonical": true, + "file": "net_app.resume_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ResumeReplication", + "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ResumeReplication", + "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ReverseReplicationDirection_async", + "title": "NetApp reverseReplicationDirection Sample", + "origin": "API_DEFINITION", + "description": " Reverses direction of replication. Source becomes destination and destination becomes source.", + "canonical": true, + "file": "net_app.reverse_replication_direction.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReverseReplicationDirection", + "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ReverseReplicationDirection", + "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_EstablishPeering_async", + "title": "NetApp establishPeering Sample", + "origin": "API_DEFINITION", + "description": " Establish replication peering.", + "canonical": true, + "file": "net_app.establish_peering.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EstablishPeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishPeering", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "peer_cluster_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_svm_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_ip_addresses", + "type": "TYPE_STRING[]" + }, + { + "name": "peer_volume_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "EstablishPeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishPeering", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_SyncReplication_async", + "title": "NetApp syncReplication Sample", + "origin": "API_DEFINITION", + "description": " Syncs the replication. This will invoke one time volume data transfer from source to destination.", + "canonical": true, + "file": "net_app.sync_replication.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SyncReplication", + "fullName": "google.cloud.netapp.v1.NetApp.SyncReplication", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "SyncReplication", + "fullName": "google.cloud.netapp.v1.NetApp.SyncReplication", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateBackupVault_async", + "title": "NetApp createBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Creates new backup vault", + "canonical": true, + "file": "net_app.create_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupVault", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault", + "type": ".google.cloud.netapp.v1.BackupVault" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupVault", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetBackupVault_async", + "title": "NetApp getBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified backup vault", + "canonical": true, + "file": "net_app.get_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.BackupVault", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackupVault", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListBackupVaults_async", + "title": "NetApp listBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " Returns list of all available backup vaults.", + "canonical": true, + "file": "net_app.list_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackupVaults", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListBackupVaultsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackupVaults", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateBackupVault_async", + "title": "NetApp updateBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a specific backup vault.", + "canonical": true, + "file": "net_app.update_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupVault", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_vault", + "type": ".google.cloud.netapp.v1.BackupVault" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupVault", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteBackupVault_async", + "title": "NetApp deleteBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the backup vault.", + "canonical": true, + "file": "net_app.delete_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupVault", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateBackup_async", + "title": "NetApp createBackup Sample", + "origin": "API_DEFINITION", + "description": " Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.", + "canonical": true, + "file": "net_app.create_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackup", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "backup", + "type": ".google.cloud.netapp.v1.Backup" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateBackup", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetBackup_async", + "title": "NetApp getBackup Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified backup", + "canonical": true, + "file": "net_app.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.Backup", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListBackups_async", + "title": "NetApp listBackups Sample", + "origin": "API_DEFINITION", + "description": " Returns descriptions of all backups for a backupVault.", + "canonical": true, + "file": "net_app.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackups", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListBackupsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackups", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteBackup_async", + "title": "NetApp deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the backup.", + "canonical": true, + "file": "net_app.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateBackup_async", + "title": "NetApp updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Update backup with full spec.", + "canonical": true, + "file": "net_app.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup", + "type": ".google.cloud.netapp.v1.Backup" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateBackupPolicy_async", + "title": "NetApp createBackupPolicy Sample", + "origin": "API_DEFINITION", + "description": " Creates new backup policy", + "canonical": true, + "file": "net_app.create_backup_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupPolicy", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_policy", + "type": ".google.cloud.netapp.v1.BackupPolicy" + }, + { + "name": "backup_policy_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupPolicy", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetBackupPolicy_async", + "title": "NetApp getBackupPolicy Sample", + "origin": "API_DEFINITION", + "description": " Returns the description of the specified backup policy by backup_policy_id.", + "canonical": true, + "file": "net_app.get_backup_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackupPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.BackupPolicy", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.GetBackupPolicy", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListBackupPolicies_async", + "title": "NetApp listBackupPolicies Sample", + "origin": "API_DEFINITION", + "description": " Returns list of all available backup policies.", + "canonical": true, + "file": "net_app.list_backup_policies.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPolicies", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackupPolicies", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListBackupPoliciesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListBackupPolicies", + "fullName": "google.cloud.netapp.v1.NetApp.ListBackupPolicies", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateBackupPolicy_async", + "title": "NetApp updateBackupPolicy Sample", + "origin": "API_DEFINITION", + "description": " Updates settings of a specific backup policy.", + "canonical": true, + "file": "net_app.update_backup_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupPolicy", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_policy", + "type": ".google.cloud.netapp.v1.BackupPolicy" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupPolicy", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteBackupPolicy_async", + "title": "NetApp deleteBackupPolicy Sample", + "origin": "API_DEFINITION", + "description": " Warning! This operation will permanently delete the backup policy.", + "canonical": true, + "file": "net_app.delete_backup_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteBackupPolicy", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupPolicy", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListQuotaRules_async", + "title": "NetApp listQuotaRules Sample", + "origin": "API_DEFINITION", + "description": " Returns list of all quota rules in a location.", + "canonical": true, + "file": "net_app.list_quota_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListQuotaRules", + "fullName": "google.cloud.netapp.v1.NetApp.ListQuotaRules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListQuotaRulesResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListQuotaRules", + "fullName": "google.cloud.netapp.v1.NetApp.ListQuotaRules", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetQuotaRule_async", + "title": "NetApp getQuotaRule Sample", + "origin": "API_DEFINITION", + "description": " Returns details of the specified quota rule.", + "canonical": true, + "file": "net_app.get_quota_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.GetQuotaRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.QuotaRule", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.GetQuotaRule", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateQuotaRule_async", + "title": "NetApp createQuotaRule Sample", + "origin": "API_DEFINITION", + "description": " Creates a new quota rule.", + "canonical": true, + "file": "net_app.create_quota_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.CreateQuotaRule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "quota_rule", + "type": ".google.cloud.netapp.v1.QuotaRule" + }, + { + "name": "quota_rule_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.CreateQuotaRule", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateQuotaRule_async", + "title": "NetApp updateQuotaRule Sample", + "origin": "API_DEFINITION", + "description": " Updates a quota rule.", + "canonical": true, + "file": "net_app.update_quota_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateQuotaRule", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "quota_rule", + "type": ".google.cloud.netapp.v1.QuotaRule" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateQuotaRule", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteQuotaRule_async", + "title": "NetApp deleteQuotaRule Sample", + "origin": "API_DEFINITION", + "description": " Deletes a quota rule.", + "canonical": true, + "file": "net_app.delete_quota_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteQuotaRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteQuotaRule", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteQuotaRule", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_RestoreBackupFiles_async", + "title": "NetApp restoreBackupFiles Sample", + "origin": "API_DEFINITION", + "description": " Restore files from a backup to a volume.", + "canonical": true, + "file": "net_app.restore_backup_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreBackupFiles", + "fullName": "google.cloud.netapp.v1.NetApp.RestoreBackupFiles", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "backup", + "type": "TYPE_STRING" + }, + { + "name": "file_list", + "type": "TYPE_STRING[]" + }, + { + "name": "restore_destination_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "RestoreBackupFiles", + "fullName": "google.cloud.netapp.v1.NetApp.RestoreBackupFiles", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ListHostGroups_async", + "title": "NetApp listHostGroups Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.", + "canonical": true, + "file": "net_app.list_host_groups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListHostGroups", + "fullName": "google.cloud.netapp.v1.NetApp.ListHostGroups", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ListHostGroupsResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ListHostGroups", + "fullName": "google.cloud.netapp.v1.NetApp.ListHostGroups", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_GetHostGroup_async", + "title": "NetApp getHostGroup Sample", + "origin": "API_DEFINITION", + "description": " Returns details of the specified host group.", + "canonical": true, + "file": "net_app.get_host_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.GetHostGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.HostGroup", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "GetHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.GetHostGroup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_CreateHostGroup_async", + "title": "NetApp createHostGroup Sample", + "origin": "API_DEFINITION", + "description": " Creates a new host group.", + "canonical": true, + "file": "net_app.create_host_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.CreateHostGroup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "host_group", + "type": ".google.cloud.netapp.v1.HostGroup" + }, + { + "name": "host_group_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "CreateHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.CreateHostGroup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_UpdateHostGroup_async", + "title": "NetApp updateHostGroup Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing host group.", + "canonical": true, + "file": "net_app.update_host_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateHostGroup", + "async": true, + "parameters": [ + { + "name": "host_group", + "type": ".google.cloud.netapp.v1.HostGroup" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "UpdateHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.UpdateHostGroup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_DeleteHostGroup_async", + "title": "NetApp deleteHostGroup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a host group.", + "canonical": true, + "file": "net_app.delete_host_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteHostGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "DeleteHostGroup", + "fullName": "google.cloud.netapp.v1.NetApp.DeleteHostGroup", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPost_async", + "title": "NetApp executeOntapPost Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_post.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapPost", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", + "async": true, + "parameters": [ + { + "name": "body", + "type": ".google.protobuf.Struct" + }, + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapPostResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapPost", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapGet_async", + "title": "NetApp executeOntapGet Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_get.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapGet", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", + "async": true, + "parameters": [ + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapGetResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapGet", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapDelete_async", + "title": "NetApp executeOntapDelete Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_delete.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapDelete", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", + "async": true, + "parameters": [ + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapDeleteResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapDelete", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPatch_async", + "title": "NetApp executeOntapPatch Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_patch.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapPatch", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", + "async": true, + "parameters": [ + { + "name": "body", + "type": ".google.protobuf.Struct" + }, + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapPatchResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapPatch", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-netapp/src/index.ts b/owl-bot-staging/google-cloud-netapp/src/index.ts new file mode 100644 index 00000000000..b6da2e85a4b --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2025 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const NetAppClient = v1.NetAppClient; +type NetAppClient = v1.NetAppClient; + +export {v1, NetAppClient}; +export default {v1, NetAppClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..b605c7194aa --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json @@ -0,0 +1,777 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.netapp.v1", + "libraryPackage": "@google-cloud/netapp", + "services": { + "NetApp": { + "clients": { + "grpc": { + "libraryClient": "NetAppClient", + "rpcs": { + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPolicy": { + "methods": [ + "getBackupPolicy" + ] + }, + "GetQuotaRule": { + "methods": [ + "getQuotaRule" + ] + }, + "GetHostGroup": { + "methods": [ + "getHostGroup" + ] + }, + "ExecuteOntapPost": { + "methods": [ + "executeOntapPost" + ] + }, + "ExecuteOntapGet": { + "methods": [ + "executeOntapGet" + ] + }, + "ExecuteOntapDelete": { + "methods": [ + "executeOntapDelete" + ] + }, + "ExecuteOntapPatch": { + "methods": [ + "executeOntapPatch" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "ValidateDirectoryService": { + "methods": [ + "validateDirectoryService" + ] + }, + "SwitchActiveReplicaZone": { + "methods": [ + "switchActiveReplicaZone" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "EstablishVolumePeering": { + "methods": [ + "establishVolumePeering" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "EstablishPeering": { + "methods": [ + "establishPeering" + ] + }, + "SyncReplication": { + "methods": [ + "syncReplication" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "CreateBackupPolicy": { + "methods": [ + "createBackupPolicy" + ] + }, + "UpdateBackupPolicy": { + "methods": [ + "updateBackupPolicy" + ] + }, + "DeleteBackupPolicy": { + "methods": [ + "deleteBackupPolicy" + ] + }, + "CreateQuotaRule": { + "methods": [ + "createQuotaRule" + ] + }, + "UpdateQuotaRule": { + "methods": [ + "updateQuotaRule" + ] + }, + "DeleteQuotaRule": { + "methods": [ + "deleteQuotaRule" + ] + }, + "RestoreBackupFiles": { + "methods": [ + "restoreBackupFiles" + ] + }, + "CreateHostGroup": { + "methods": [ + "createHostGroup" + ] + }, + "UpdateHostGroup": { + "methods": [ + "updateHostGroup" + ] + }, + "DeleteHostGroup": { + "methods": [ + "deleteHostGroup" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools", + "listStoragePoolsStream", + "listStoragePoolsAsync" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes", + "listVolumesStream", + "listVolumesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories", + "listActiveDirectoriesStream", + "listActiveDirectoriesAsync" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs", + "listKmsConfigsStream", + "listKmsConfigsAsync" + ] + }, + "ListReplications": { + "methods": [ + "listReplications", + "listReplicationsStream", + "listReplicationsAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPolicies": { + "methods": [ + "listBackupPolicies", + "listBackupPoliciesStream", + "listBackupPoliciesAsync" + ] + }, + "ListQuotaRules": { + "methods": [ + "listQuotaRules", + "listQuotaRulesStream", + "listQuotaRulesAsync" + ] + }, + "ListHostGroups": { + "methods": [ + "listHostGroups", + "listHostGroupsStream", + "listHostGroupsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "NetAppClient", + "rpcs": { + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPolicy": { + "methods": [ + "getBackupPolicy" + ] + }, + "GetQuotaRule": { + "methods": [ + "getQuotaRule" + ] + }, + "GetHostGroup": { + "methods": [ + "getHostGroup" + ] + }, + "ExecuteOntapPost": { + "methods": [ + "executeOntapPost" + ] + }, + "ExecuteOntapGet": { + "methods": [ + "executeOntapGet" + ] + }, + "ExecuteOntapDelete": { + "methods": [ + "executeOntapDelete" + ] + }, + "ExecuteOntapPatch": { + "methods": [ + "executeOntapPatch" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "ValidateDirectoryService": { + "methods": [ + "validateDirectoryService" + ] + }, + "SwitchActiveReplicaZone": { + "methods": [ + "switchActiveReplicaZone" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "EstablishVolumePeering": { + "methods": [ + "establishVolumePeering" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "EstablishPeering": { + "methods": [ + "establishPeering" + ] + }, + "SyncReplication": { + "methods": [ + "syncReplication" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "CreateBackupPolicy": { + "methods": [ + "createBackupPolicy" + ] + }, + "UpdateBackupPolicy": { + "methods": [ + "updateBackupPolicy" + ] + }, + "DeleteBackupPolicy": { + "methods": [ + "deleteBackupPolicy" + ] + }, + "CreateQuotaRule": { + "methods": [ + "createQuotaRule" + ] + }, + "UpdateQuotaRule": { + "methods": [ + "updateQuotaRule" + ] + }, + "DeleteQuotaRule": { + "methods": [ + "deleteQuotaRule" + ] + }, + "RestoreBackupFiles": { + "methods": [ + "restoreBackupFiles" + ] + }, + "CreateHostGroup": { + "methods": [ + "createHostGroup" + ] + }, + "UpdateHostGroup": { + "methods": [ + "updateHostGroup" + ] + }, + "DeleteHostGroup": { + "methods": [ + "deleteHostGroup" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools", + "listStoragePoolsStream", + "listStoragePoolsAsync" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes", + "listVolumesStream", + "listVolumesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories", + "listActiveDirectoriesStream", + "listActiveDirectoriesAsync" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs", + "listKmsConfigsStream", + "listKmsConfigsAsync" + ] + }, + "ListReplications": { + "methods": [ + "listReplications", + "listReplicationsStream", + "listReplicationsAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPolicies": { + "methods": [ + "listBackupPolicies", + "listBackupPoliciesStream", + "listBackupPoliciesAsync" + ] + }, + "ListQuotaRules": { + "methods": [ + "listQuotaRules", + "listQuotaRulesStream", + "listQuotaRulesAsync" + ] + }, + "ListHostGroups": { + "methods": [ + "listHostGroups", + "listHostGroupsStream", + "listHostGroupsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/index.ts b/owl-bot-staging/google-cloud-netapp/src/v1/index.ts new file mode 100644 index 00000000000..562b20e9c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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 {NetAppClient} from './net_app_client'; diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts new file mode 100644 index 00000000000..75a26dd4819 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts @@ -0,0 +1,10491 @@ +// 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, 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/v1/net_app_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './net_app_client_config.json'; +const version = require('../../../package.json').version; + +/** + * NetApp Files Google Cloud Service + * @class + * @memberof v1 + */ +export class NetAppClient { + 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('netapp'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + netAppStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of NetAppClient. + * + * @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 NetAppClient({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 NetAppClient; + 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 = 'netapp.' + 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.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 = { + activeDirectoryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/activeDirectories/{active_directory}' + ), + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}' + ), + backupPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPolicies/{backup_policy}' + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backup_vault}' + ), + hostGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/hostGroups/{host_group}' + ), + kmsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}' + ), + quotaRulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}' + ), + replicationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}' + ), + snapshotPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}' + ), + storagePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/storagePools/{storage_pool}' + ), + volumePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/volumes/{volume}' + ), + }; + + // 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 = { + listStoragePools: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'storagePools'), + listVolumes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'volumes'), + listSnapshots: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'snapshots'), + listActiveDirectories: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'activeDirectories'), + listKmsConfigs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'kmsConfigs'), + listReplications: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'replications'), + listBackupVaults: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), + listBackups: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), + listBackupPolicies: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPolicies'), + listQuotaRules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'quotaRules'), + listHostGroups: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'hostGroups') + }; + + 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: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createStoragePoolResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; + const createStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateStoragePoolResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; + const updateStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteStoragePoolResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteStoragePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const validateDirectoryServiceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const validateDirectoryServiceMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const switchActiveReplicaZoneResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; + const switchActiveReplicaZoneMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; + const createVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; + const updateVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteVolumeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const revertVolumeResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; + const revertVolumeMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const establishVolumePeeringResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; + const establishVolumePeeringMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Snapshot') as gax.protobuf.Type; + const createSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteSnapshotResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Snapshot') as gax.protobuf.Type; + const updateSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.ActiveDirectory') as gax.protobuf.Type; + const createActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.ActiveDirectory') as gax.protobuf.Type; + const updateActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteActiveDirectoryResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteActiveDirectoryMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createKmsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; + const createKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateKmsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; + const updateKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const encryptVolumesResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; + const encryptVolumesMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteKmsConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteKmsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const createReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteReplicationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const updateReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const stopReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const stopReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const resumeReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const resumeReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const reverseReplicationDirectionResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const reverseReplicationDirectionMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const establishPeeringResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const establishPeeringMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const syncReplicationResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; + const syncReplicationMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.BackupVault') as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.BackupVault') as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Backup') as gax.protobuf.Type; + const createBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Backup') as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.BackupPolicy') as gax.protobuf.Type; + const createBackupPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.BackupPolicy') as gax.protobuf.Type; + const updateBackupPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupPolicyResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createQuotaRuleResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.QuotaRule') as gax.protobuf.Type; + const createQuotaRuleMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateQuotaRuleResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.QuotaRule') as gax.protobuf.Type; + const updateQuotaRuleMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteQuotaRuleResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteQuotaRuleMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const restoreBackupFilesResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.RestoreBackupFilesResponse') as gax.protobuf.Type; + const restoreBackupFilesMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const createHostGroupResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.HostGroup') as gax.protobuf.Type; + const createHostGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const updateHostGroupResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.HostGroup') as gax.protobuf.Type; + const updateHostGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const deleteHostGroupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteHostGroupMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createStoragePoolResponse.decode.bind(createStoragePoolResponse), + createStoragePoolMetadata.decode.bind(createStoragePoolMetadata)), + updateStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateStoragePoolResponse.decode.bind(updateStoragePoolResponse), + updateStoragePoolMetadata.decode.bind(updateStoragePoolMetadata)), + deleteStoragePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteStoragePoolResponse.decode.bind(deleteStoragePoolResponse), + deleteStoragePoolMetadata.decode.bind(deleteStoragePoolMetadata)), + validateDirectoryService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + validateDirectoryServiceResponse.decode.bind(validateDirectoryServiceResponse), + validateDirectoryServiceMetadata.decode.bind(validateDirectoryServiceMetadata)), + switchActiveReplicaZone: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + switchActiveReplicaZoneResponse.decode.bind(switchActiveReplicaZoneResponse), + switchActiveReplicaZoneMetadata.decode.bind(switchActiveReplicaZoneMetadata)), + createVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createVolumeResponse.decode.bind(createVolumeResponse), + createVolumeMetadata.decode.bind(createVolumeMetadata)), + updateVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateVolumeResponse.decode.bind(updateVolumeResponse), + updateVolumeMetadata.decode.bind(updateVolumeMetadata)), + deleteVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVolumeResponse.decode.bind(deleteVolumeResponse), + deleteVolumeMetadata.decode.bind(deleteVolumeMetadata)), + revertVolume: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + revertVolumeResponse.decode.bind(revertVolumeResponse), + revertVolumeMetadata.decode.bind(revertVolumeMetadata)), + establishVolumePeering: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + establishVolumePeeringResponse.decode.bind(establishVolumePeeringResponse), + establishVolumePeeringMetadata.decode.bind(establishVolumePeeringMetadata)), + createSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createSnapshotResponse.decode.bind(createSnapshotResponse), + createSnapshotMetadata.decode.bind(createSnapshotMetadata)), + deleteSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSnapshotResponse.decode.bind(deleteSnapshotResponse), + deleteSnapshotMetadata.decode.bind(deleteSnapshotMetadata)), + updateSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateSnapshotResponse.decode.bind(updateSnapshotResponse), + updateSnapshotMetadata.decode.bind(updateSnapshotMetadata)), + createActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createActiveDirectoryResponse.decode.bind(createActiveDirectoryResponse), + createActiveDirectoryMetadata.decode.bind(createActiveDirectoryMetadata)), + updateActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateActiveDirectoryResponse.decode.bind(updateActiveDirectoryResponse), + updateActiveDirectoryMetadata.decode.bind(updateActiveDirectoryMetadata)), + deleteActiveDirectory: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteActiveDirectoryResponse.decode.bind(deleteActiveDirectoryResponse), + deleteActiveDirectoryMetadata.decode.bind(deleteActiveDirectoryMetadata)), + createKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createKmsConfigResponse.decode.bind(createKmsConfigResponse), + createKmsConfigMetadata.decode.bind(createKmsConfigMetadata)), + updateKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateKmsConfigResponse.decode.bind(updateKmsConfigResponse), + updateKmsConfigMetadata.decode.bind(updateKmsConfigMetadata)), + encryptVolumes: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + encryptVolumesResponse.decode.bind(encryptVolumesResponse), + encryptVolumesMetadata.decode.bind(encryptVolumesMetadata)), + deleteKmsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteKmsConfigResponse.decode.bind(deleteKmsConfigResponse), + deleteKmsConfigMetadata.decode.bind(deleteKmsConfigMetadata)), + createReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReplicationResponse.decode.bind(createReplicationResponse), + createReplicationMetadata.decode.bind(createReplicationMetadata)), + deleteReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteReplicationResponse.decode.bind(deleteReplicationResponse), + deleteReplicationMetadata.decode.bind(deleteReplicationMetadata)), + updateReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateReplicationResponse.decode.bind(updateReplicationResponse), + updateReplicationMetadata.decode.bind(updateReplicationMetadata)), + stopReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + stopReplicationResponse.decode.bind(stopReplicationResponse), + stopReplicationMetadata.decode.bind(stopReplicationMetadata)), + resumeReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + resumeReplicationResponse.decode.bind(resumeReplicationResponse), + resumeReplicationMetadata.decode.bind(resumeReplicationMetadata)), + reverseReplicationDirection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + reverseReplicationDirectionResponse.decode.bind(reverseReplicationDirectionResponse), + reverseReplicationDirectionMetadata.decode.bind(reverseReplicationDirectionMetadata)), + establishPeering: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + establishPeeringResponse.decode.bind(establishPeeringResponse), + establishPeeringMetadata.decode.bind(establishPeeringMetadata)), + syncReplication: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + syncReplicationResponse.decode.bind(syncReplicationResponse), + syncReplicationMetadata.decode.bind(syncReplicationMetadata)), + 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)), + createBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupResponse.decode.bind(createBackupResponse), + createBackupMetadata.decode.bind(createBackupMetadata)), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata)), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata)), + createBackupPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPolicyResponse.decode.bind(createBackupPolicyResponse), + createBackupPolicyMetadata.decode.bind(createBackupPolicyMetadata)), + updateBackupPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupPolicyResponse.decode.bind(updateBackupPolicyResponse), + updateBackupPolicyMetadata.decode.bind(updateBackupPolicyMetadata)), + deleteBackupPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPolicyResponse.decode.bind(deleteBackupPolicyResponse), + deleteBackupPolicyMetadata.decode.bind(deleteBackupPolicyMetadata)), + createQuotaRule: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createQuotaRuleResponse.decode.bind(createQuotaRuleResponse), + createQuotaRuleMetadata.decode.bind(createQuotaRuleMetadata)), + updateQuotaRule: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateQuotaRuleResponse.decode.bind(updateQuotaRuleResponse), + updateQuotaRuleMetadata.decode.bind(updateQuotaRuleMetadata)), + deleteQuotaRule: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteQuotaRuleResponse.decode.bind(deleteQuotaRuleResponse), + deleteQuotaRuleMetadata.decode.bind(deleteQuotaRuleMetadata)), + restoreBackupFiles: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupFilesResponse.decode.bind(restoreBackupFilesResponse), + restoreBackupFilesMetadata.decode.bind(restoreBackupFilesMetadata)), + createHostGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createHostGroupResponse.decode.bind(createHostGroupResponse), + createHostGroupMetadata.decode.bind(createHostGroupMetadata)), + updateHostGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateHostGroupResponse.decode.bind(updateHostGroupResponse), + updateHostGroupMetadata.decode.bind(updateHostGroupMetadata)), + deleteHostGroup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteHostGroupResponse.decode.bind(deleteHostGroupResponse), + deleteHostGroupMetadata.decode.bind(deleteHostGroupMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.netapp.v1.NetApp', 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.netAppStub) { + return this.netAppStub; + } + + // Put together the "service stub" for + // google.cloud.netapp.v1.NetApp. + this.netAppStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.netapp.v1.NetApp') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.netapp.v1.NetApp, + 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 netAppStubMethods = + ['listStoragePools', 'createStoragePool', 'getStoragePool', 'updateStoragePool', 'deleteStoragePool', 'validateDirectoryService', 'switchActiveReplicaZone', 'listVolumes', 'getVolume', 'createVolume', 'updateVolume', 'deleteVolume', 'revertVolume', 'establishVolumePeering', 'listSnapshots', 'getSnapshot', 'createSnapshot', 'deleteSnapshot', 'updateSnapshot', 'listActiveDirectories', 'getActiveDirectory', 'createActiveDirectory', 'updateActiveDirectory', 'deleteActiveDirectory', 'listKmsConfigs', 'createKmsConfig', 'getKmsConfig', 'updateKmsConfig', 'encryptVolumes', 'verifyKmsConfig', 'deleteKmsConfig', 'listReplications', 'getReplication', 'createReplication', 'deleteReplication', 'updateReplication', 'stopReplication', 'resumeReplication', 'reverseReplicationDirection', 'establishPeering', 'syncReplication', 'createBackupVault', 'getBackupVault', 'listBackupVaults', 'updateBackupVault', 'deleteBackupVault', 'createBackup', 'getBackup', 'listBackups', 'deleteBackup', 'updateBackup', 'createBackupPolicy', 'getBackupPolicy', 'listBackupPolicies', 'updateBackupPolicy', 'deleteBackupPolicy', 'listQuotaRules', 'getQuotaRule', 'createQuotaRule', 'updateQuotaRule', 'deleteQuotaRule', 'restoreBackupFiles', 'listHostGroups', 'getHostGroup', 'createHostGroup', 'updateHostGroup', 'deleteHostGroup', 'executeOntapPost', 'executeOntapGet', 'executeOntapDelete', 'executeOntapPatch']; + for (const methodName of netAppStubMethods) { + const callPromise = this.netAppStub.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.netAppStub; + } + + /** + * 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 'netapp.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 'netapp.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-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 -- + // ------------------- +/** + * Returns the description of the specified storage pool by poolId. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @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.netapp.v1.StoragePool|StoragePool}. + * 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/v1/net_app.get_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_GetStoragePool_async + */ + getStoragePool( + request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|undefined, {}|undefined + ]>; + getStoragePool( + request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, + {}|null|undefined>): void; + getStoragePool( + request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, + {}|null|undefined>): void; + getStoragePool( + request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|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('getStoragePool request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getStoragePool response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getStoragePool(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IStoragePool, + protos.google.cloud.netapp.v1.IGetStoragePoolRequest|undefined, + {}|undefined + ]) => { + this._log.info('getStoragePool 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 Volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the volume + * @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.netapp.v1.Volume|Volume}. + * 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/v1/net_app.get_volume.js + * region_tag:netapp_v1_generated_NetApp_GetVolume_async + */ + getVolume( + request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|undefined, {}|undefined + ]>; + getVolume( + request: protos.google.cloud.netapp.v1.IGetVolumeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, + {}|null|undefined>): void; + getVolume( + request: protos.google.cloud.netapp.v1.IGetVolumeRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, + {}|null|undefined>): void; + getVolume( + request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|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('getVolume request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getVolume response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getVolume(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IVolume, + protos.google.cloud.netapp.v1.IGetVolumeRequest|undefined, + {}|undefined + ]) => { + this._log.info('getVolume 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; + }); + } +/** + * Describe a snapshot for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * @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.netapp.v1.Snapshot|Snapshot}. + * 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/v1/net_app.get_snapshot.js + * region_tag:netapp_v1_generated_NetApp_GetSnapshot_async + */ + getSnapshot( + request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|undefined, {}|undefined + ]>; + getSnapshot( + request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getSnapshot( + request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + callback: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, + {}|null|undefined>): void; + getSnapshot( + request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|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('getSnapshot request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSnapshot response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSnapshot(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.ISnapshot, + protos.google.cloud.netapp.v1.IGetSnapshotRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSnapshot 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; + }); + } +/** + * Describes a specified active directory. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the active directory. + * @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.netapp.v1.ActiveDirectory|ActiveDirectory}. + * 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/v1/net_app.get_active_directory.js + * region_tag:netapp_v1_generated_NetApp_GetActiveDirectory_async + */ + getActiveDirectory( + request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|undefined, {}|undefined + ]>; + getActiveDirectory( + request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, + {}|null|undefined>): void; + getActiveDirectory( + request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, + {}|null|undefined>): void; + getActiveDirectory( + request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|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('getActiveDirectory request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getActiveDirectory response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getActiveDirectory(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IActiveDirectory, + protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|undefined, + {}|undefined + ]) => { + this._log.info('getActiveDirectory 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 description of the specified KMS config by kms_config_id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig + * @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.netapp.v1.KmsConfig|KmsConfig}. + * 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/v1/net_app.get_kms_config.js + * region_tag:netapp_v1_generated_NetApp_GetKmsConfig_async + */ + getKmsConfig( + request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|undefined, {}|undefined + ]>; + getKmsConfig( + request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, + {}|null|undefined>): void; + getKmsConfig( + request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, + {}|null|undefined>): void; + getKmsConfig( + request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|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('getKmsConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getKmsConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getKmsConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IKmsConfig, + protos.google.cloud.netapp.v1.IGetKmsConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('getKmsConfig 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; + }); + } +/** + * Verifies KMS config reachability. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KMS Config to be verified. + * @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.netapp.v1.VerifyKmsConfigResponse|VerifyKmsConfigResponse}. + * 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/v1/net_app.verify_kms_config.js + * region_tag:netapp_v1_generated_NetApp_VerifyKmsConfig_async + */ + verifyKmsConfig( + request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|undefined, {}|undefined + ]>; + verifyKmsConfig( + request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, + {}|null|undefined>): void; + verifyKmsConfig( + request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, + {}|null|undefined>): void; + verifyKmsConfig( + request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|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('verifyKmsConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('verifyKmsConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.verifyKmsConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, + protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('verifyKmsConfig 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; + }); + } +/** + * Describe a replication for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * @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.netapp.v1.Replication|Replication}. + * 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/v1/net_app.get_replication.js + * region_tag:netapp_v1_generated_NetApp_GetReplication_async + */ + getReplication( + request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|undefined, {}|undefined + ]>; + getReplication( + request: protos.google.cloud.netapp.v1.IGetReplicationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, + {}|null|undefined>): void; + getReplication( + request: protos.google.cloud.netapp.v1.IGetReplicationRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, + {}|null|undefined>): void; + getReplication( + request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|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('getReplication request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getReplication response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getReplication(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IReplication, + protos.google.cloud.netapp.v1.IGetReplicationRequest|undefined, + {}|undefined + ]) => { + this._log.info('getReplication 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 description of the specified backup vault + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @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.netapp.v1.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/v1/net_app.get_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_GetBackupVault_async + */ + getBackupVault( + request?: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.IGetBackupVaultRequest|undefined, {}|undefined + ]>; + getBackupVault( + request: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request?: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault, + protos.google.cloud.netapp.v1.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; + }); + } +/** + * Returns the description of the specified backup + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * @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.netapp.v1.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/v1/net_app.get_backup.js + * region_tag:netapp_v1_generated_NetApp_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.netapp.v1.IGetBackupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.IGetBackupRequest|undefined, {}|undefined + ]>; + getBackup( + request: protos.google.cloud.netapp.v1.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request: protos.google.cloud.netapp.v1.IGetBackupRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request?: protos.google.cloud.netapp.v1.IGetBackupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackup, + protos.google.cloud.netapp.v1.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; + }); + } +/** + * Returns the description of the specified backup policy by backup_policy_id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @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.netapp.v1.BackupPolicy|BackupPolicy}. + * 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/v1/net_app.get_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_GetBackupPolicy_async + */ + getBackupPolicy( + request?: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|undefined, {}|undefined + ]>; + getBackupPolicy( + request: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, + {}|null|undefined>): void; + getBackupPolicy( + request: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, + {}|null|undefined>): void; + getBackupPolicy( + request?: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|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('getBackupPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackupPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getBackupPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IBackupPolicy, + protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getBackupPolicy 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 details of the specified quota rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the quota rule + * @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.netapp.v1.QuotaRule|QuotaRule}. + * 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/v1/net_app.get_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_GetQuotaRule_async + */ + getQuotaRule( + request?: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|undefined, {}|undefined + ]>; + getQuotaRule( + request: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, + {}|null|undefined>): void; + getQuotaRule( + request: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, + {}|null|undefined>): void; + getQuotaRule( + request?: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|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('getQuotaRule request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getQuotaRule response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getQuotaRule(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IQuotaRule, + protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|undefined, + {}|undefined + ]) => { + this._log.info('getQuotaRule 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 details of the specified host group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + * @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.netapp.v1.HostGroup|HostGroup}. + * 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/v1/net_app.get_host_group.js + * region_tag:netapp_v1_generated_NetApp_GetHostGroup_async + */ + getHostGroup( + request?: protos.google.cloud.netapp.v1.IGetHostGroupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|undefined, {}|undefined + ]>; + getHostGroup( + request: protos.google.cloud.netapp.v1.IGetHostGroupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, + {}|null|undefined>): void; + getHostGroup( + request: protos.google.cloud.netapp.v1.IGetHostGroupRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, + {}|null|undefined>): void; + getHostGroup( + request?: protos.google.cloud.netapp.v1.IGetHostGroupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|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('getHostGroup request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getHostGroup response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getHostGroup(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IHostGroup, + protos.google.cloud.netapp.v1.IGetHostGroupRequest|undefined, + {}|undefined + ]) => { + this._log.info('getHostGroup 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; + }); + } +/** + * `ExecuteOntapPost` dispatches the ONTAP `POST` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.Struct} request.body + * Required. The raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapPostResponse|ExecuteOntapPostResponse}. + * 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/v1/net_app.execute_ontap_post.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPost_async + */ + executeOntapPost( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, {}|undefined + ]>; + executeOntapPost( + request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPost( + request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPost( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapPost request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapPost response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapPost(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapPost 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; + }); + } +/** + * `ExecuteOntapGet` dispatches the ONTAP `GET` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapGetResponse|ExecuteOntapGetResponse}. + * 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/v1/net_app.execute_ontap_get.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapGet_async + */ + executeOntapGet( + request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, {}|undefined + ]>; + executeOntapGet( + request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): void; + executeOntapGet( + request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): void; + executeOntapGet( + request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapGet request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapGet response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapGet(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapGet 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; + }); + } +/** + * `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapDeleteResponse|ExecuteOntapDeleteResponse}. + * 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/v1/net_app.execute_ontap_delete.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapDelete_async + */ + executeOntapDelete( + request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, {}|undefined + ]>; + executeOntapDelete( + request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): void; + executeOntapDelete( + request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): void; + executeOntapDelete( + request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapDelete request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapDelete response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapDelete(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapDelete 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; + }); + } +/** + * `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.Struct} request.body + * Required. The raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapPatchResponse|ExecuteOntapPatchResponse}. + * 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/v1/net_app.execute_ontap_patch.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPatch_async + */ + executeOntapPatch( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, {}|undefined + ]>; + executeOntapPatch( + request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPatch( + request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPatch( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapPatch request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapPatch response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapPatch(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapPatch 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 storage pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.storagePoolId + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * @param {google.cloud.netapp.v1.StoragePool} request.storagePool + * Required. The required parameters to create a new storage pool. + * @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/v1/net_app.create_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async + */ + createStoragePool( + request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createStoragePool( + request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createStoragePool( + request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createStoragePool( + request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createStoragePool response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createStoragePool request %j', request); + return this.innerApiCalls.createStoragePool(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createStoragePool response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createStoragePool()`. + * @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/v1/net_app.create_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async + */ + async checkCreateStoragePoolProgress(name: string): Promise>{ + this._log.info('createStoragePool 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.createStoragePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the storage pool properties with the full spec + * + * @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 + * StoragePool 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 {google.cloud.netapp.v1.StoragePool} request.storagePool + * Required. The pool being updated + * @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/v1/net_app.update_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async + */ + updateStoragePool( + request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateStoragePool( + request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateStoragePool( + request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateStoragePool( + request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'storage_pool.name': request.storagePool!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateStoragePool response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateStoragePool request %j', request); + return this.innerApiCalls.updateStoragePool(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateStoragePool response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateStoragePool()`. + * @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/v1/net_app.update_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async + */ + async checkUpdateStoragePoolProgress(name: string): Promise>{ + this._log.info('updateStoragePool 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.updateStoragePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Warning! This operation will permanently delete the storage pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @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/v1/net_app.delete_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async + */ + deleteStoragePool( + request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteStoragePool( + request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteStoragePool( + request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteStoragePool( + request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteStoragePool response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteStoragePool request %j', request); + return this.innerApiCalls.deleteStoragePool(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteStoragePool response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteStoragePool()`. + * @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/v1/net_app.delete_storage_pool.js + * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async + */ + async checkDeleteStoragePoolProgress(name: string): Promise>{ + this._log.info('deleteStoragePool 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.deleteStoragePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * ValidateDirectoryService does a connectivity check for a directory service + * policy attached to the storage pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @param {google.cloud.netapp.v1.DirectoryServiceType} request.directoryServiceType + * Type of directory service policy attached to the storage pool. + * @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/v1/net_app.validate_directory_service.js + * region_tag:netapp_v1_generated_NetApp_ValidateDirectoryService_async + */ + validateDirectoryService( + request?: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + validateDirectoryService( + request: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + validateDirectoryService( + request: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + validateDirectoryService( + request?: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('validateDirectoryService response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('validateDirectoryService request %j', request); + return this.innerApiCalls.validateDirectoryService(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('validateDirectoryService response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `validateDirectoryService()`. + * @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/v1/net_app.validate_directory_service.js + * region_tag:netapp_v1_generated_NetApp_ValidateDirectoryService_async + */ + async checkValidateDirectoryServiceProgress(name: string): Promise>{ + this._log.info('validateDirectoryService 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.validateDirectoryService, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * This operation will switch the active/replica zone for a regional + * storagePool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the storage pool + * @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/v1/net_app.switch_active_replica_zone.js + * region_tag:netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async + */ + switchActiveReplicaZone( + request?: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + switchActiveReplicaZone( + request: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + switchActiveReplicaZone( + request: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + switchActiveReplicaZone( + request?: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('switchActiveReplicaZone response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('switchActiveReplicaZone request %j', request); + return this.innerApiCalls.switchActiveReplicaZone(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('switchActiveReplicaZone response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `switchActiveReplicaZone()`. + * @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/v1/net_app.switch_active_replica_zone.js + * region_tag:netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async + */ + async checkSwitchActiveReplicaZoneProgress(name: string): Promise>{ + this._log.info('switchActiveReplicaZone 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.switchActiveReplicaZone, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new Volume 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.volumeId + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * @param {google.cloud.netapp.v1.Volume} request.volume + * Required. The volume being created. + * @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/v1/net_app.create_volume.js + * region_tag:netapp_v1_generated_NetApp_CreateVolume_async + */ + createVolume( + request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createVolume( + request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVolume( + request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVolume( + request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createVolume response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createVolume request %j', request); + return this.innerApiCalls.createVolume(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createVolume response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createVolume()`. + * @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/v1/net_app.create_volume.js + * region_tag:netapp_v1_generated_NetApp_CreateVolume_async + */ + async checkCreateVolumeProgress(name: string): Promise>{ + this._log.info('createVolume 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.createVolume, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single Volume. + * + * @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 + * Volume 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 {google.cloud.netapp.v1.Volume} request.volume + * Required. The volume being updated + * @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/v1/net_app.update_volume.js + * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async + */ + updateVolume( + request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateVolume( + request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVolume( + request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVolume( + request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'volume.name': request.volume!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateVolume response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateVolume request %j', request); + return this.innerApiCalls.updateVolume(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateVolume response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateVolume()`. + * @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/v1/net_app.update_volume.js + * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async + */ + async checkUpdateVolumeProgress(name: string): Promise>{ + this._log.info('updateVolume 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.updateVolume, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single Volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the volume + * @param {boolean} request.force + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * @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/v1/net_app.delete_volume.js + * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async + */ + deleteVolume( + request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteVolume( + request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVolume( + request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVolume( + request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteVolume response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteVolume request %j', request); + return this.innerApiCalls.deleteVolume(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteVolume response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteVolume()`. + * @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/v1/net_app.delete_volume.js + * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async + */ + async checkDeleteVolumeProgress(name: string): Promise>{ + this._log.info('deleteVolume 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.deleteVolume, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Revert an existing volume to a specified snapshot. + * Warning! This operation will permanently revert all changes made after the + * snapshot was created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * @param {string} request.snapshotId + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * @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/v1/net_app.revert_volume.js + * region_tag:netapp_v1_generated_NetApp_RevertVolume_async + */ + revertVolume( + request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + revertVolume( + request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + revertVolume( + request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + revertVolume( + request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('revertVolume response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('revertVolume request %j', request); + return this.innerApiCalls.revertVolume(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('revertVolume response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `revertVolume()`. + * @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/v1/net_app.revert_volume.js + * region_tag:netapp_v1_generated_NetApp_RevertVolume_async + */ + async checkRevertVolumeProgress(name: string): Promise>{ + this._log.info('revertVolume 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.revertVolume, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Establish volume peering. This is used to establish cluster and svm + * peerings between the GCNV and OnPrem clusters. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The volume resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {string} request.peerClusterName + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @param {string} request.peerSvmName + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @param {string[]} [request.peerIpAddresses] + * Optional. List of IPv4 ip addresses to be used for peering. + * @param {string} request.peerVolumeName + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * @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/v1/net_app.establish_volume_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async + */ + establishVolumePeering( + request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + establishVolumePeering( + request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishVolumePeering( + request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishVolumePeering( + request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('establishVolumePeering response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('establishVolumePeering request %j', request); + return this.innerApiCalls.establishVolumePeering(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('establishVolumePeering response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `establishVolumePeering()`. + * @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/v1/net_app.establish_volume_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async + */ + async checkEstablishVolumePeeringProgress(name: string): Promise>{ + this._log.info('establishVolumePeering 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.establishVolumePeering, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a new snapshot for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {google.cloud.netapp.v1.Snapshot} request.snapshot + * Required. A snapshot resource + * @param {string} request.snapshotId + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @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/v1/net_app.create_snapshot.js + * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async + */ + createSnapshot( + request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createSnapshot( + request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createSnapshot( + request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createSnapshot( + request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createSnapshot response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createSnapshot request %j', request); + return this.innerApiCalls.createSnapshot(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createSnapshot response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createSnapshot()`. + * @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/v1/net_app.create_snapshot.js + * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async + */ + async checkCreateSnapshotProgress(name: string): Promise>{ + this._log.info('createSnapshot 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.createSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a snapshot. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The snapshot resource name, in the format + * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` + * @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/v1/net_app.delete_snapshot.js + * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async + */ + deleteSnapshot( + request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteSnapshot( + request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteSnapshot( + request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteSnapshot( + request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteSnapshot response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteSnapshot request %j', request); + return this.innerApiCalls.deleteSnapshot(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteSnapshot response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteSnapshot()`. + * @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/v1/net_app.delete_snapshot.js + * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async + */ + async checkDeleteSnapshotProgress(name: string): Promise>{ + this._log.info('deleteSnapshot 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.deleteSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a specific snapshot. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.netapp.v1.Snapshot} request.snapshot + * Required. A snapshot 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 + * 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/v1/net_app.update_snapshot.js + * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async + */ + updateSnapshot( + request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateSnapshot( + request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateSnapshot( + request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateSnapshot( + request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'snapshot.name': request.snapshot!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateSnapshot response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateSnapshot request %j', request); + return this.innerApiCalls.updateSnapshot(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateSnapshot response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateSnapshot()`. + * @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/v1/net_app.update_snapshot.js + * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async + */ + async checkUpdateSnapshotProgress(name: string): Promise>{ + this._log.info('updateSnapshot 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.updateSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * CreateActiveDirectory + * Creates the active directory specified in the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory + * Required. Fields of the to be created active directory. + * @param {string} request.activeDirectoryId + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * @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/v1/net_app.create_active_directory.js + * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async + */ + createActiveDirectory( + request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createActiveDirectory( + request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createActiveDirectory( + request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createActiveDirectory( + request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createActiveDirectory response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createActiveDirectory request %j', request); + return this.innerApiCalls.createActiveDirectory(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createActiveDirectory response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createActiveDirectory()`. + * @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/v1/net_app.create_active_directory.js + * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async + */ + async checkCreateActiveDirectoryProgress(name: string): Promise>{ + this._log.info('createActiveDirectory 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.createActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Update the parameters of an active directories. + * + * @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 + * Active Directory 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 {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory + * Required. The volume being updated + * @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/v1/net_app.update_active_directory.js + * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async + */ + updateActiveDirectory( + request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateActiveDirectory( + request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateActiveDirectory( + request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateActiveDirectory( + request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'active_directory.name': request.activeDirectory!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateActiveDirectory response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateActiveDirectory request %j', request); + return this.innerApiCalls.updateActiveDirectory(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateActiveDirectory response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateActiveDirectory()`. + * @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/v1/net_app.update_active_directory.js + * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async + */ + async checkUpdateActiveDirectoryProgress(name: string): Promise>{ + this._log.info('updateActiveDirectory 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.updateActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Delete the active directory specified in the request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the active directory. + * @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/v1/net_app.delete_active_directory.js + * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async + */ + deleteActiveDirectory( + request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteActiveDirectory( + request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteActiveDirectory( + request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteActiveDirectory( + request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteActiveDirectory response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteActiveDirectory request %j', request); + return this.innerApiCalls.deleteActiveDirectory(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteActiveDirectory response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteActiveDirectory()`. + * @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/v1/net_app.delete_active_directory.js + * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async + */ + async checkDeleteActiveDirectoryProgress(name: string): Promise>{ + this._log.info('deleteActiveDirectory 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.deleteActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new KMS config. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.kmsConfigId + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @param {google.cloud.netapp.v1.KmsConfig} request.kmsConfig + * Required. The required parameters to create a new KmsConfig. + * @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/v1/net_app.create_kms_config.js + * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async + */ + createKmsConfig( + request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createKmsConfig( + request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createKmsConfig( + request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createKmsConfig( + request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createKmsConfig response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createKmsConfig request %j', request); + return this.innerApiCalls.createKmsConfig(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createKmsConfig response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createKmsConfig()`. + * @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/v1/net_app.create_kms_config.js + * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async + */ + async checkCreateKmsConfigProgress(name: string): Promise>{ + this._log.info('createKmsConfig 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.createKmsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the Kms config properties with the full spec + * + * @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 + * KmsConfig 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 {google.cloud.netapp.v1.KmsConfig} request.kmsConfig + * Required. The KmsConfig being updated + * @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/v1/net_app.update_kms_config.js + * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async + */ + updateKmsConfig( + request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateKmsConfig( + request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateKmsConfig( + request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateKmsConfig( + request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'kms_config.name': request.kmsConfig!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateKmsConfig response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateKmsConfig request %j', request); + return this.innerApiCalls.updateKmsConfig(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateKmsConfig response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateKmsConfig()`. + * @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/v1/net_app.update_kms_config.js + * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async + */ + async checkUpdateKmsConfigProgress(name: string): Promise>{ + this._log.info('updateKmsConfig 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.updateKmsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Encrypt the existing volumes without CMEK encryption with the desired the + * KMS config for the whole region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig. + * @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/v1/net_app.encrypt_volumes.js + * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async + */ + encryptVolumes( + request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + encryptVolumes( + request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + encryptVolumes( + request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + encryptVolumes( + request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('encryptVolumes response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('encryptVolumes request %j', request); + return this.innerApiCalls.encryptVolumes(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('encryptVolumes response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `encryptVolumes()`. + * @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/v1/net_app.encrypt_volumes.js + * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async + */ + async checkEncryptVolumesProgress(name: string): Promise>{ + this._log.info('encryptVolumes 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.encryptVolumes, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Warning! This operation will permanently delete the Kms config. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the KmsConfig. + * @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/v1/net_app.delete_kms_config.js + * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async + */ + deleteKmsConfig( + request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteKmsConfig( + request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteKmsConfig( + request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteKmsConfig( + request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteKmsConfig response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteKmsConfig request %j', request); + return this.innerApiCalls.deleteKmsConfig(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteKmsConfig response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteKmsConfig()`. + * @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/v1/net_app.delete_kms_config.js + * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async + */ + async checkDeleteKmsConfigProgress(name: string): Promise>{ + this._log.info('deleteKmsConfig 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.deleteKmsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a new replication for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {google.cloud.netapp.v1.Replication} request.replication + * Required. A replication resource + * @param {string} request.replicationId + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @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/v1/net_app.create_replication.js + * region_tag:netapp_v1_generated_NetApp_CreateReplication_async + */ + createReplication( + request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createReplication( + request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReplication( + request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createReplication( + request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createReplication request %j', request); + return this.innerApiCalls.createReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createReplication()`. + * @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/v1/net_app.create_replication.js + * region_tag:netapp_v1_generated_NetApp_CreateReplication_async + */ + async checkCreateReplicationProgress(name: string): Promise>{ + this._log.info('createReplication 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.createReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The replication resource name, in the format + * `projects/* /locations/* /volumes/* /replications/{replication_id}` + * @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/v1/net_app.delete_replication.js + * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async + */ + deleteReplication( + request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteReplication( + request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteReplication( + request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteReplication( + request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteReplication request %j', request); + return this.innerApiCalls.deleteReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteReplication()`. + * @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/v1/net_app.delete_replication.js + * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async + */ + async checkDeleteReplicationProgress(name: string): Promise>{ + this._log.info('deleteReplication 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.deleteReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a specific replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.netapp.v1.Replication} request.replication + * Required. A replication 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 + * 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/v1/net_app.update_replication.js + * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async + */ + updateReplication( + request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateReplication( + request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateReplication( + request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateReplication( + request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'replication.name': request.replication!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateReplication request %j', request); + return this.innerApiCalls.updateReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateReplication()`. + * @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/v1/net_app.update_replication.js + * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async + */ + async checkUpdateReplicationProgress(name: string): Promise>{ + this._log.info('updateReplication 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.updateReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Stop Cross Region Replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @param {boolean} request.force + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * @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/v1/net_app.stop_replication.js + * region_tag:netapp_v1_generated_NetApp_StopReplication_async + */ + stopReplication( + request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + stopReplication( + request: protos.google.cloud.netapp.v1.IStopReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + stopReplication( + request: protos.google.cloud.netapp.v1.IStopReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + stopReplication( + request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('stopReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('stopReplication request %j', request); + return this.innerApiCalls.stopReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('stopReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `stopReplication()`. + * @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/v1/net_app.stop_replication.js + * region_tag:netapp_v1_generated_NetApp_StopReplication_async + */ + async checkStopReplicationProgress(name: string): Promise>{ + this._log.info('stopReplication 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.stopReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Resume Cross Region Replication. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @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/v1/net_app.resume_replication.js + * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async + */ + resumeReplication( + request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + resumeReplication( + request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + resumeReplication( + request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + resumeReplication( + request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('resumeReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('resumeReplication request %j', request); + return this.innerApiCalls.resumeReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('resumeReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `resumeReplication()`. + * @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/v1/net_app.resume_replication.js + * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async + */ + async checkResumeReplicationProgress(name: string): Promise>{ + this._log.info('resumeReplication 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.resumeReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Reverses direction of replication. Source becomes destination and + * destination becomes source. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @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/v1/net_app.reverse_replication_direction.js + * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async + */ + reverseReplicationDirection( + request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + reverseReplicationDirection( + request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reverseReplicationDirection( + request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reverseReplicationDirection( + request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('reverseReplicationDirection response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('reverseReplicationDirection request %j', request); + return this.innerApiCalls.reverseReplicationDirection(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('reverseReplicationDirection response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `reverseReplicationDirection()`. + * @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/v1/net_app.reverse_replication_direction.js + * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async + */ + async checkReverseReplicationDirectionProgress(name: string): Promise>{ + this._log.info('reverseReplicationDirection 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.reverseReplicationDirection, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Establish replication peering. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @param {string} request.peerClusterName + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @param {string} request.peerSvmName + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @param {string[]} [request.peerIpAddresses] + * Optional. List of IPv4 ip addresses to be used for peering. + * @param {string} request.peerVolumeName + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * @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/v1/net_app.establish_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishPeering_async + */ + establishPeering( + request?: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + establishPeering( + request: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishPeering( + request: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishPeering( + request?: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('establishPeering response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('establishPeering request %j', request); + return this.innerApiCalls.establishPeering(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('establishPeering response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `establishPeering()`. + * @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/v1/net_app.establish_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishPeering_async + */ + async checkEstablishPeeringProgress(name: string): Promise>{ + this._log.info('establishPeering 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.establishPeering, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Syncs the replication. This will invoke one time volume data transfer from + * source to destination. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @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/v1/net_app.sync_replication.js + * region_tag:netapp_v1_generated_NetApp_SyncReplication_async + */ + syncReplication( + request?: protos.google.cloud.netapp.v1.ISyncReplicationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + syncReplication( + request: protos.google.cloud.netapp.v1.ISyncReplicationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + syncReplication( + request: protos.google.cloud.netapp.v1.ISyncReplicationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + syncReplication( + request?: protos.google.cloud.netapp.v1.ISyncReplicationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('syncReplication response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('syncReplication request %j', request); + return this.innerApiCalls.syncReplication(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('syncReplication response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `syncReplication()`. + * @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/v1/net_app.sync_replication.js + * region_tag:netapp_v1_generated_NetApp_SyncReplication_async + */ + async checkSyncReplicationProgress(name: string): Promise>{ + this._log.info('syncReplication 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.syncReplication, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates new backup vault + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * @param {string} request.backupVaultId + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @param {google.cloud.netapp.v1.BackupVault} request.backupVault + * Required. A backupVault 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 + * 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/v1/net_app.create_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupVault( + request: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request?: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.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.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/v1/net_app.create_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress(name: string): Promise>{ + 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; + } +/** + * Updates the settings of a specific backup vault. + * + * @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 to be updated. + * 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 {google.cloud.netapp.v1.BackupVault} request.backupVault + * Required. The backupVault being updated + * @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/v1/net_app.update_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackupVault( + request: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request?: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.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.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/v1/net_app.update_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress(name: string): Promise>{ + 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; + } +/** + * Warning! This operation will permanently delete the backup vault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @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/v1/net_app.delete_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupVault( + request: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request?: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.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.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/v1/net_app.delete_backup_vault.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress(name: string): Promise>{ + 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; + } +/** + * Creates a backup from the volume specified in the request + * The backup can be created from the given snapshot if specified in the + * request. If no snapshot specified, there'll be a new snapshot taken to + * initiate the backup creation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/* /locations/* /backupVaults/{backup_vault_id}` + * @param {string} request.backupId + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @param {google.cloud.netapp.v1.Backup} request.backup + * Required. A 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 + * 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/v1/net_app.create_backup.js + * region_tag:netapp_v1_generated_NetApp_CreateBackup_async + */ + createBackup( + request?: protos.google.cloud.netapp.v1.ICreateBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackup( + request: protos.google.cloud.netapp.v1.ICreateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackup( + request: protos.google.cloud.netapp.v1.ICreateBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackup( + request?: protos.google.cloud.netapp.v1.ICreateBackupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackup request %j', request); + return this.innerApiCalls.createBackup(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createBackup response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createBackup()`. + * @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/v1/net_app.create_backup.js + * region_tag:netapp_v1_generated_NetApp_CreateBackup_async + */ + async checkCreateBackupProgress(name: string): Promise>{ + this._log.info('createBackup 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.createBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Warning! This operation will permanently delete the backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * @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/v1/net_app.delete_backup.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.netapp.v1.IDeleteBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackup( + request: protos.google.cloud.netapp.v1.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request: protos.google.cloud.netapp.v1.IDeleteBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request?: protos.google.cloud.netapp.v1.IDeleteBackupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.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.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/v1/net_app.delete_backup.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackup_async + */ + async checkDeleteBackupProgress(name: string): Promise>{ + 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; + } +/** + * Update backup with full spec. + * + * @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 to be updated. + * 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 {google.cloud.netapp.v1.Backup} request.backup + * Required. The backup being updated + * @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/v1/net_app.update_backup.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.netapp.v1.IUpdateBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackup( + request: protos.google.cloud.netapp.v1.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request: protos.google.cloud.netapp.v1.IUpdateBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request?: protos.google.cloud.netapp.v1.IUpdateBackupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.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.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/v1/net_app.update_backup.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackup_async + */ + async checkUpdateBackupProgress(name: string): Promise>{ + 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; + } +/** + * Creates new backup policy + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * @param {google.cloud.netapp.v1.BackupPolicy} request.backupPolicy + * Required. A backupPolicy resource + * @param {string} request.backupPolicyId + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @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/v1/net_app.create_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_CreateBackupPolicy_async + */ + createBackupPolicy( + request?: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupPolicy( + request: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPolicy( + request: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPolicy( + request?: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createBackupPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackupPolicy request %j', request); + return this.innerApiCalls.createBackupPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createBackupPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createBackupPolicy()`. + * @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/v1/net_app.create_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_CreateBackupPolicy_async + */ + async checkCreateBackupPolicyProgress(name: string): Promise>{ + this._log.info('createBackupPolicy 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.createBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates settings of a specific backup policy. + * + * @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 Policy 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 {google.cloud.netapp.v1.BackupPolicy} request.backupPolicy + * Required. The backup policy being updated + * @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/v1/net_app.update_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackupPolicy_async + */ + updateBackupPolicy( + request?: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackupPolicy( + request: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupPolicy( + request: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupPolicy( + request?: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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_policy.name': request.backupPolicy!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateBackupPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateBackupPolicy request %j', request); + return this.innerApiCalls.updateBackupPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateBackupPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateBackupPolicy()`. + * @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/v1/net_app.update_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_UpdateBackupPolicy_async + */ + async checkUpdateBackupPolicyProgress(name: string): Promise>{ + this._log.info('updateBackupPolicy 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.updateBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Warning! This operation will permanently delete the backup policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @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/v1/net_app.delete_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackupPolicy_async + */ + deleteBackupPolicy( + request?: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupPolicy( + request: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPolicy( + request: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPolicy( + request?: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteBackupPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteBackupPolicy request %j', request); + return this.innerApiCalls.deleteBackupPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteBackupPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteBackupPolicy()`. + * @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/v1/net_app.delete_backup_policy.js + * region_tag:netapp_v1_generated_NetApp_DeleteBackupPolicy_async + */ + async checkDeleteBackupPolicyProgress(name: string): Promise>{ + this._log.info('deleteBackupPolicy 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.deleteBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new quota rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for CreateQuotaRuleRequest + * @param {google.cloud.netapp.v1.QuotaRule} request.quotaRule + * Required. Fields of the to be created quota rule. + * @param {string} request.quotaRuleId + * Required. ID of the quota rule to create. Must be unique within the parent + * resource. Must contain only letters, numbers, underscore and hyphen, with + * the first character a letter or underscore, the last a letter or underscore + * or a number, and a 63 character maximum. + * @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/v1/net_app.create_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_CreateQuotaRule_async + */ + createQuotaRule( + request?: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createQuotaRule( + request: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createQuotaRule( + request: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createQuotaRule( + request?: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createQuotaRule response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createQuotaRule request %j', request); + return this.innerApiCalls.createQuotaRule(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createQuotaRule response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createQuotaRule()`. + * @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/v1/net_app.create_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_CreateQuotaRule_async + */ + async checkCreateQuotaRuleProgress(name: string): Promise>{ + this._log.info('createQuotaRule 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.createQuotaRule, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a quota rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask is used to specify the fields to be overwritten in the + * Quota Rule 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 {google.cloud.netapp.v1.QuotaRule} request.quotaRule + * Required. The quota rule being updated + * @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/v1/net_app.update_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_UpdateQuotaRule_async + */ + updateQuotaRule( + request?: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateQuotaRule( + request: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateQuotaRule( + request: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateQuotaRule( + request?: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'quota_rule.name': request.quotaRule!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateQuotaRule response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateQuotaRule request %j', request); + return this.innerApiCalls.updateQuotaRule(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateQuotaRule response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateQuotaRule()`. + * @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/v1/net_app.update_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_UpdateQuotaRule_async + */ + async checkUpdateQuotaRuleProgress(name: string): Promise>{ + this._log.info('updateQuotaRule 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.updateQuotaRule, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a quota rule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the quota rule. + * @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/v1/net_app.delete_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_DeleteQuotaRule_async + */ + deleteQuotaRule( + request?: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteQuotaRule( + request: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteQuotaRule( + request: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteQuotaRule( + request?: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteQuotaRule response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteQuotaRule request %j', request); + return this.innerApiCalls.deleteQuotaRule(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteQuotaRule response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteQuotaRule()`. + * @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/v1/net_app.delete_quota_rule.js + * region_tag:netapp_v1_generated_NetApp_DeleteQuotaRule_async + */ + async checkDeleteQuotaRuleProgress(name: string): Promise>{ + this._log.info('deleteQuotaRule 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.deleteQuotaRule, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Restore files from a backup to a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The volume resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {string} request.backup + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * @param {string[]} request.fileList + * Required. List of files to be restored, specified by their absolute path in + * the source volume. + * @param {string} [request.restoreDestinationPath] + * Optional. Absolute directory path in the destination volume. This is + * required if the `file_list` is provided. + * @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/v1/net_app.restore_backup_files.js + * region_tag:netapp_v1_generated_NetApp_RestoreBackupFiles_async + */ + restoreBackupFiles( + request?: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + restoreBackupFiles( + request: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackupFiles( + request: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackupFiles( + request?: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('restoreBackupFiles response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('restoreBackupFiles request %j', request); + return this.innerApiCalls.restoreBackupFiles(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('restoreBackupFiles response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `restoreBackupFiles()`. + * @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/v1/net_app.restore_backup_files.js + * region_tag:netapp_v1_generated_NetApp_RestoreBackupFiles_async + */ + async checkRestoreBackupFilesProgress(name: string): Promise>{ + this._log.info('restoreBackupFiles 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.restoreBackupFiles, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new host group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for CreateHostGroupRequest + * @param {google.cloud.netapp.v1.HostGroup} request.hostGroup + * Required. Fields of the host group to create. + * @param {string} request.hostGroupId + * Required. ID of the host group to create. Must be unique within the parent + * resource. Must contain only letters, numbers, and hyphen, with + * the first character a letter or underscore, the last a letter or underscore + * or a number, and a 63 character maximum. + * @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/v1/net_app.create_host_group.js + * region_tag:netapp_v1_generated_NetApp_CreateHostGroup_async + */ + createHostGroup( + request?: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createHostGroup( + request: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createHostGroup( + request: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createHostGroup( + request?: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createHostGroup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createHostGroup request %j', request); + return this.innerApiCalls.createHostGroup(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createHostGroup response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createHostGroup()`. + * @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/v1/net_app.create_host_group.js + * region_tag:netapp_v1_generated_NetApp_CreateHostGroup_async + */ + async checkCreateHostGroupProgress(name: string): Promise>{ + this._log.info('createHostGroup 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.createHostGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an existing host group. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.netapp.v1.HostGroup} request.hostGroup + * Required. The host group to update. + * The host group's `name` field is used to identify the host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. + * @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/v1/net_app.update_host_group.js + * region_tag:netapp_v1_generated_NetApp_UpdateHostGroup_async + */ + updateHostGroup( + request?: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateHostGroup( + request: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateHostGroup( + request: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateHostGroup( + request?: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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({ + 'host_group.name': request.hostGroup!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateHostGroup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateHostGroup request %j', request); + return this.innerApiCalls.updateHostGroup(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateHostGroup response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateHostGroup()`. + * @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/v1/net_app.update_host_group.js + * region_tag:netapp_v1_generated_NetApp_UpdateHostGroup_async + */ + async checkUpdateHostGroupProgress(name: string): Promise>{ + this._log.info('updateHostGroup 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.updateHostGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a host group. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the host group. + * Format: + * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. + * @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/v1/net_app.delete_host_group.js + * region_tag:netapp_v1_generated_NetApp_DeleteHostGroup_async + */ + deleteHostGroup( + request?: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteHostGroup( + request: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteHostGroup( + request: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteHostGroup( + request?: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteHostGroup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteHostGroup request %j', request); + return this.innerApiCalls.deleteHostGroup(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteHostGroup response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteHostGroup()`. + * @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/v1/net_app.delete_host_group.js + * region_tag:netapp_v1_generated_NetApp_DeleteHostGroup_async + */ + async checkDeleteHostGroupProgress(name: string): Promise>{ + this._log.info('deleteHostGroup 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.deleteHostGroup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Returns descriptions of all storage pools owned by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} [request.orderBy] + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @param {string} [request.filter] + * Optional. List filter. + * @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.netapp.v1.StoragePool|StoragePool}. + * 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 `listStoragePoolsAsync()` + * 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. + */ + listStoragePools( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IStoragePool[], + protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse + ]>; + listStoragePools( + request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, + protos.google.cloud.netapp.v1.IStoragePool>): void; + listStoragePools( + request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, + protos.google.cloud.netapp.v1.IStoragePool>): void; + listStoragePools( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, + protos.google.cloud.netapp.v1.IStoragePool>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, + protos.google.cloud.netapp.v1.IStoragePool>): + Promise<[ + protos.google.cloud.netapp.v1.IStoragePool[], + protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse + ]>|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.netapp.v1.IListStoragePoolsRequest, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, + protos.google.cloud.netapp.v1.IStoragePool>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listStoragePools values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listStoragePools request %j', request); + return this.innerApiCalls + .listStoragePools(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IStoragePool[], + protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, + protos.google.cloud.netapp.v1.IListStoragePoolsResponse + ]) => { + this._log.info('listStoragePools values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listStoragePools`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} [request.orderBy] + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @param {string} [request.filter] + * Optional. List filter. + * @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.netapp.v1.StoragePool|StoragePool} 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 `listStoragePoolsAsync()` + * 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. + */ + listStoragePoolsStream( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + 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['listStoragePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listStoragePools stream %j', request); + return this.descriptors.page.listStoragePools.createStream( + this.innerApiCalls.listStoragePools as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listStoragePools`, 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. Parent value + * @param {number} [request.pageSize] + * Optional. The maximum number of items to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} [request.orderBy] + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @param {string} [request.filter] + * Optional. List filter. + * @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.netapp.v1.StoragePool|StoragePool}. 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/v1/net_app.list_storage_pools.js + * region_tag:netapp_v1_generated_NetApp_ListStoragePools_async + */ + listStoragePoolsAsync( + request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, + 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['listStoragePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listStoragePools iterate %j', request); + return this.descriptors.page.listStoragePools.asyncIterate( + this.innerApiCalls['listStoragePools'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Volumes in a given project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.Volume|Volume}. + * 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 `listVolumesAsync()` + * 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. + */ + listVolumes( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IVolume[], + protos.google.cloud.netapp.v1.IListVolumesRequest|null, + protos.google.cloud.netapp.v1.IListVolumesResponse + ]>; + listVolumes( + request: protos.google.cloud.netapp.v1.IListVolumesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, + protos.google.cloud.netapp.v1.IVolume>): void; + listVolumes( + request: protos.google.cloud.netapp.v1.IListVolumesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, + protos.google.cloud.netapp.v1.IVolume>): void; + listVolumes( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, + protos.google.cloud.netapp.v1.IVolume>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, + protos.google.cloud.netapp.v1.IVolume>): + Promise<[ + protos.google.cloud.netapp.v1.IVolume[], + protos.google.cloud.netapp.v1.IListVolumesRequest|null, + protos.google.cloud.netapp.v1.IListVolumesResponse + ]>|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.netapp.v1.IListVolumesRequest, + protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, + protos.google.cloud.netapp.v1.IVolume>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listVolumes values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listVolumes request %j', request); + return this.innerApiCalls + .listVolumes(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IVolume[], + protos.google.cloud.netapp.v1.IListVolumesRequest|null, + protos.google.cloud.netapp.v1.IListVolumesResponse + ]) => { + this._log.info('listVolumes values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listVolumes`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.Volume|Volume} 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 `listVolumesAsync()` + * 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. + */ + listVolumesStream( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + 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['listVolumes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVolumes stream %j', request); + return this.descriptors.page.listVolumes.createStream( + this.innerApiCalls.listVolumes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listVolumes`, 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. Parent value for ListVolumesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.Volume|Volume}. 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/v1/net_app.list_volumes.js + * region_tag:netapp_v1_generated_NetApp_ListVolumes_async + */ + listVolumesAsync( + request?: protos.google.cloud.netapp.v1.IListVolumesRequest, + 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['listVolumes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listVolumes iterate %j', request); + return this.descriptors.page.listVolumes.asyncIterate( + this.innerApiCalls['listVolumes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all snapshots for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Snapshot|Snapshot}. + * 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 `listSnapshotsAsync()` + * 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. + */ + listSnapshots( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.ISnapshot[], + protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, + protos.google.cloud.netapp.v1.IListSnapshotsResponse + ]>; + listSnapshots( + request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, + protos.google.cloud.netapp.v1.ISnapshot>): void; + listSnapshots( + request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, + protos.google.cloud.netapp.v1.ISnapshot>): void; + listSnapshots( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, + protos.google.cloud.netapp.v1.ISnapshot>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, + protos.google.cloud.netapp.v1.ISnapshot>): + Promise<[ + protos.google.cloud.netapp.v1.ISnapshot[], + protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, + protos.google.cloud.netapp.v1.IListSnapshotsResponse + ]>|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.netapp.v1.IListSnapshotsRequest, + protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, + protos.google.cloud.netapp.v1.ISnapshot>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listSnapshots values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listSnapshots request %j', request); + return this.innerApiCalls + .listSnapshots(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.ISnapshot[], + protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, + protos.google.cloud.netapp.v1.IListSnapshotsResponse + ]) => { + this._log.info('listSnapshots values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listSnapshots`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Snapshot|Snapshot} 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 `listSnapshotsAsync()` + * 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. + */ + listSnapshotsStream( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + 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['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listSnapshots stream %j', request); + return this.descriptors.page.listSnapshots.createStream( + this.innerApiCalls.listSnapshots as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listSnapshots`, 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 volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Snapshot|Snapshot}. 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/v1/net_app.list_snapshots.js + * region_tag:netapp_v1_generated_NetApp_ListSnapshots_async + */ + listSnapshotsAsync( + request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, + 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['listSnapshots']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listSnapshots iterate %j', request); + return this.descriptors.page.listSnapshots.asyncIterate( + this.innerApiCalls['listSnapshots'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists active directories. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.ActiveDirectory|ActiveDirectory}. + * 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 `listActiveDirectoriesAsync()` + * 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. + */ + listActiveDirectories( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IActiveDirectory[], + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + ]>; + listActiveDirectories( + request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, + protos.google.cloud.netapp.v1.IActiveDirectory>): void; + listActiveDirectories( + request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, + protos.google.cloud.netapp.v1.IActiveDirectory>): void; + listActiveDirectories( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, + protos.google.cloud.netapp.v1.IActiveDirectory>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, + protos.google.cloud.netapp.v1.IActiveDirectory>): + Promise<[ + protos.google.cloud.netapp.v1.IActiveDirectory[], + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + ]>|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.netapp.v1.IListActiveDirectoriesRequest, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, + protos.google.cloud.netapp.v1.IActiveDirectory>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listActiveDirectories values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listActiveDirectories request %j', request); + return this.innerApiCalls + .listActiveDirectories(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IActiveDirectory[], + protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, + protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse + ]) => { + this._log.info('listActiveDirectories values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listActiveDirectories`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.ActiveDirectory|ActiveDirectory} 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 `listActiveDirectoriesAsync()` + * 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. + */ + listActiveDirectoriesStream( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + 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['listActiveDirectories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listActiveDirectories stream %j', request); + return this.descriptors.page.listActiveDirectories.createStream( + this.innerApiCalls.listActiveDirectories as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listActiveDirectories`, 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. Parent value for ListActiveDirectoriesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.ActiveDirectory|ActiveDirectory}. 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/v1/net_app.list_active_directories.js + * region_tag:netapp_v1_generated_NetApp_ListActiveDirectories_async + */ + listActiveDirectoriesAsync( + request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, + 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['listActiveDirectories']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listActiveDirectories iterate %j', request); + return this.descriptors.page.listActiveDirectories.asyncIterate( + this.innerApiCalls['listActiveDirectories'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all KMS configs owned by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.KmsConfig|KmsConfig}. + * 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 `listKmsConfigsAsync()` + * 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. + */ + listKmsConfigs( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IKmsConfig[], + protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse + ]>; + listKmsConfigs( + request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, + protos.google.cloud.netapp.v1.IKmsConfig>): void; + listKmsConfigs( + request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, + protos.google.cloud.netapp.v1.IKmsConfig>): void; + listKmsConfigs( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, + protos.google.cloud.netapp.v1.IKmsConfig>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, + protos.google.cloud.netapp.v1.IKmsConfig>): + Promise<[ + protos.google.cloud.netapp.v1.IKmsConfig[], + protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse + ]>|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.netapp.v1.IListKmsConfigsRequest, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, + protos.google.cloud.netapp.v1.IKmsConfig>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listKmsConfigs values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listKmsConfigs request %j', request); + return this.innerApiCalls + .listKmsConfigs(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IKmsConfig[], + protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, + protos.google.cloud.netapp.v1.IListKmsConfigsResponse + ]) => { + this._log.info('listKmsConfigs values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listKmsConfigs`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.KmsConfig|KmsConfig} 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 `listKmsConfigsAsync()` + * 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. + */ + listKmsConfigsStream( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + 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['listKmsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listKmsConfigs stream %j', request); + return this.descriptors.page.listKmsConfigs.createStream( + this.innerApiCalls.listKmsConfigs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listKmsConfigs`, 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. Parent value + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.KmsConfig|KmsConfig}. 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/v1/net_app.list_kms_configs.js + * region_tag:netapp_v1_generated_NetApp_ListKmsConfigs_async + */ + listKmsConfigsAsync( + request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, + 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['listKmsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listKmsConfigs iterate %j', request); + return this.descriptors.page.listKmsConfigs.asyncIterate( + this.innerApiCalls['listKmsConfigs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns descriptions of all replications for a volume. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Replication|Replication}. + * 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 `listReplicationsAsync()` + * 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. + */ + listReplications( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IReplication[], + protos.google.cloud.netapp.v1.IListReplicationsRequest|null, + protos.google.cloud.netapp.v1.IListReplicationsResponse + ]>; + listReplications( + request: protos.google.cloud.netapp.v1.IListReplicationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, + protos.google.cloud.netapp.v1.IReplication>): void; + listReplications( + request: protos.google.cloud.netapp.v1.IListReplicationsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, + protos.google.cloud.netapp.v1.IReplication>): void; + listReplications( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, + protos.google.cloud.netapp.v1.IReplication>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListReplicationsRequest, + protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, + protos.google.cloud.netapp.v1.IReplication>): + Promise<[ + protos.google.cloud.netapp.v1.IReplication[], + protos.google.cloud.netapp.v1.IListReplicationsRequest|null, + protos.google.cloud.netapp.v1.IListReplicationsResponse + ]>|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.netapp.v1.IListReplicationsRequest, + protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, + protos.google.cloud.netapp.v1.IReplication>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listReplications values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listReplications request %j', request); + return this.innerApiCalls + .listReplications(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IReplication[], + protos.google.cloud.netapp.v1.IListReplicationsRequest|null, + protos.google.cloud.netapp.v1.IListReplicationsResponse + ]) => { + this._log.info('listReplications values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listReplications`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Replication|Replication} 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 `listReplicationsAsync()` + * 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. + */ + listReplicationsStream( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + 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['listReplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReplications stream %j', request); + return this.descriptors.page.listReplications.createStream( + this.innerApiCalls.listReplications as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listReplications`, 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 volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.Replication|Replication}. 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/v1/net_app.list_replications.js + * region_tag:netapp_v1_generated_NetApp_ListReplications_async + */ + listReplicationsAsync( + request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, + 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['listReplications']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listReplications iterate %j', request); + return this.descriptors.page.listReplications.asyncIterate( + this.innerApiCalls['listReplications'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns list of all available backup vaults. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackupVault[], + protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse + ]>; + listBackupVaults( + request: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupVault>): void; + listBackupVaults( + request: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupVault>): void; + listBackupVaults( + request?: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupVault>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupVaultsRequest, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupVault>): + Promise<[ + protos.google.cloud.netapp.v1.IBackupVault[], + protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, + protos.google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, + protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault[], + protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, + protos.google.cloud.netapp.v1.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 location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.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.netapp.v1.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 location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * List filter. + * @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.netapp.v1.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/v1/net_app.list_backup_vaults.js + * region_tag:netapp_v1_generated_NetApp_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.netapp.v1.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; + } + /** + * Returns descriptions of all backups for a backupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * @param {number} request.pageSize + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * @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.netapp.v1.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.netapp.v1.IListBackupsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackup[], + protos.google.cloud.netapp.v1.IListBackupsRequest|null, + protos.google.cloud.netapp.v1.IListBackupsResponse + ]>; + listBackups( + request: protos.google.cloud.netapp.v1.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupsRequest, + protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackup>): void; + listBackups( + request: protos.google.cloud.netapp.v1.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupsRequest, + protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackup>): void; + listBackups( + request?: protos.google.cloud.netapp.v1.IListBackupsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupsRequest, + protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackup>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupsRequest, + protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackup>): + Promise<[ + protos.google.cloud.netapp.v1.IBackup[], + protos.google.cloud.netapp.v1.IListBackupsRequest|null, + protos.google.cloud.netapp.v1.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.netapp.v1.IListBackupsRequest, + protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.netapp.v1.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.netapp.v1.IBackup[], + protos.google.cloud.netapp.v1.IListBackupsRequest|null, + protos.google.cloud.netapp.v1.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 backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * @param {number} request.pageSize + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * @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.netapp.v1.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.netapp.v1.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 backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * @param {number} request.pageSize + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @param {string} request.orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @param {string} request.filter + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * @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.netapp.v1.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/v1/net_app.list_backups.js + * region_tag:netapp_v1_generated_NetApp_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.netapp.v1.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; + } + /** + * Returns list of all available backup policies. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListBackupPoliciesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.BackupPolicy|BackupPolicy}. + * 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 `listBackupPoliciesAsync()` + * 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. + */ + listBackupPolicies( + request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IBackupPolicy[], + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse + ]>; + listBackupPolicies( + request: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupPolicy>): void; + listBackupPolicies( + request: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupPolicy>): void; + listBackupPolicies( + request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupPolicy>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupPolicy>): + Promise<[ + protos.google.cloud.netapp.v1.IBackupPolicy[], + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse + ]>|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.netapp.v1.IListBackupPoliciesRequest, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, + protos.google.cloud.netapp.v1.IBackupPolicy>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackupPolicies values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackupPolicies request %j', request); + return this.innerApiCalls + .listBackupPolicies(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IBackupPolicy[], + protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, + protos.google.cloud.netapp.v1.IListBackupPoliciesResponse + ]) => { + this._log.info('listBackupPolicies values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listBackupPolicies`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListBackupPoliciesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.BackupPolicy|BackupPolicy} 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 `listBackupPoliciesAsync()` + * 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. + */ + listBackupPoliciesStream( + request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + 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['listBackupPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBackupPolicies stream %j', request); + return this.descriptors.page.listBackupPolicies.createStream( + this.innerApiCalls.listBackupPolicies as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupPolicies`, 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. Parent value for ListBackupPoliciesRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * 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.netapp.v1.BackupPolicy|BackupPolicy}. 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/v1/net_app.list_backup_policies.js + * region_tag:netapp_v1_generated_NetApp_ListBackupPolicies_async + */ + listBackupPoliciesAsync( + request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, + 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['listBackupPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBackupPolicies iterate %j', request); + return this.descriptors.page.listBackupPolicies.asyncIterate( + this.innerApiCalls['listBackupPolicies'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns list of all quota rules in a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListQuotaRulesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule}. + * 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 `listQuotaRulesAsync()` + * 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. + */ + listQuotaRules( + request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IQuotaRule[], + protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse + ]>; + listQuotaRules( + request: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, + protos.google.cloud.netapp.v1.IQuotaRule>): void; + listQuotaRules( + request: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, + protos.google.cloud.netapp.v1.IQuotaRule>): void; + listQuotaRules( + request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, + protos.google.cloud.netapp.v1.IQuotaRule>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, + protos.google.cloud.netapp.v1.IQuotaRule>): + Promise<[ + protos.google.cloud.netapp.v1.IQuotaRule[], + protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse + ]>|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.netapp.v1.IListQuotaRulesRequest, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, + protos.google.cloud.netapp.v1.IQuotaRule>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listQuotaRules values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listQuotaRules request %j', request); + return this.innerApiCalls + .listQuotaRules(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IQuotaRule[], + protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, + protos.google.cloud.netapp.v1.IListQuotaRulesResponse + ]) => { + this._log.info('listQuotaRules values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listQuotaRules`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListQuotaRulesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule} 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 `listQuotaRulesAsync()` + * 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. + */ + listQuotaRulesStream( + request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + 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['listQuotaRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listQuotaRules stream %j', request); + return this.descriptors.page.listQuotaRules.createStream( + this.innerApiCalls.listQuotaRules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listQuotaRules`, 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. Parent value for ListQuotaRulesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule}. 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/v1/net_app.list_quota_rules.js + * region_tag:netapp_v1_generated_NetApp_ListQuotaRules_async + */ + listQuotaRulesAsync( + request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, + 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['listQuotaRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listQuotaRules iterate %j', request); + return this.descriptors.page.listQuotaRules.asyncIterate( + this.innerApiCalls['listQuotaRules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of host groups in a `location`. Use `-` as location to list + * host groups across all locations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListHostGroupsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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. Filter to apply to the request. + * @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.netapp.v1.HostGroup|HostGroup}. + * 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 `listHostGroupsAsync()` + * 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. + */ + listHostGroups( + request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IHostGroup[], + protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, + protos.google.cloud.netapp.v1.IListHostGroupsResponse + ]>; + listHostGroups( + request: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListHostGroupsRequest, + protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IHostGroup>): void; + listHostGroups( + request: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + callback: PaginationCallback< + protos.google.cloud.netapp.v1.IListHostGroupsRequest, + protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IHostGroup>): void; + listHostGroups( + request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.netapp.v1.IListHostGroupsRequest, + protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IHostGroup>, + callback?: PaginationCallback< + protos.google.cloud.netapp.v1.IListHostGroupsRequest, + protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IHostGroup>): + Promise<[ + protos.google.cloud.netapp.v1.IHostGroup[], + protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, + protos.google.cloud.netapp.v1.IListHostGroupsResponse + ]>|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.netapp.v1.IListHostGroupsRequest, + protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, + protos.google.cloud.netapp.v1.IHostGroup>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listHostGroups values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listHostGroups request %j', request); + return this.innerApiCalls + .listHostGroups(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.netapp.v1.IHostGroup[], + protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, + protos.google.cloud.netapp.v1.IListHostGroupsResponse + ]) => { + this._log.info('listHostGroups values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listHostGroups`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListHostGroupsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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. Filter to apply to the request. + * @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.netapp.v1.HostGroup|HostGroup} 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 `listHostGroupsAsync()` + * 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. + */ + listHostGroupsStream( + request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + 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['listHostGroups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listHostGroups stream %j', request); + return this.descriptors.page.listHostGroups.createStream( + this.innerApiCalls.listHostGroups as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listHostGroups`, 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. Parent value for ListHostGroupsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the 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. Filter to apply to the request. + * @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.netapp.v1.HostGroup|HostGroup}. 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/v1/net_app.list_host_groups.js + * region_tag:netapp_v1_generated_NetApp_ListHostGroups_async + */ + listHostGroupsAsync( + request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, + 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['listHostGroups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listHostGroups iterate %j', request); + return this.descriptors.page.listHostGroups.asyncIterate( + this.innerApiCalls['listHostGroups'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 activeDirectory resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} active_directory + * @returns {string} Resource name string. + */ + activeDirectoryPath(project:string,location:string,activeDirectory:string) { + return this.pathTemplates.activeDirectoryPathTemplate.render({ + project: project, + location: location, + active_directory: activeDirectory, + }); + } + + /** + * Parse the project from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the project. + */ + matchProjectFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).project; + } + + /** + * Parse the location from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the location. + */ + matchLocationFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).location; + } + + /** + * Parse the active_directory from ActiveDirectory resource. + * + * @param {string} activeDirectoryName + * A fully-qualified path representing ActiveDirectory resource. + * @returns {string} A string representing the active_directory. + */ + matchActiveDirectoryFromActiveDirectoryName(activeDirectoryName: string) { + return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).active_directory; + } + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_vault + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath(project:string,location:string,backupVault:string,backup:string) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backup_vault: backupVault, + 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 backup_vault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup_vault. + */ + matchBackupVaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup_vault; + } + + /** + * 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 backupPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_policy + * @returns {string} Resource name string. + */ + backupPolicyPath(project:string,location:string,backupPolicy:string) { + return this.pathTemplates.backupPolicyPathTemplate.render({ + project: project, + location: location, + backup_policy: backupPolicy, + }); + } + + /** + * Parse the project from BackupPolicy resource. + * + * @param {string} backupPolicyName + * A fully-qualified path representing BackupPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPolicyName(backupPolicyName: string) { + return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).project; + } + + /** + * Parse the location from BackupPolicy resource. + * + * @param {string} backupPolicyName + * A fully-qualified path representing BackupPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPolicyName(backupPolicyName: string) { + return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).location; + } + + /** + * Parse the backup_policy from BackupPolicy resource. + * + * @param {string} backupPolicyName + * A fully-qualified path representing BackupPolicy resource. + * @returns {string} A string representing the backup_policy. + */ + matchBackupPolicyFromBackupPolicyName(backupPolicyName: string) { + return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).backup_policy; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_vault + * @returns {string} Resource name string. + */ + backupVaultPath(project:string,location:string,backupVault:string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backup_vault: 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 backup_vault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backup_vault. + */ + matchBackupVaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backup_vault; + } + + /** + * Return a fully-qualified hostGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} host_group + * @returns {string} Resource name string. + */ + hostGroupPath(project:string,location:string,hostGroup:string) { + return this.pathTemplates.hostGroupPathTemplate.render({ + project: project, + location: location, + host_group: hostGroup, + }); + } + + /** + * Parse the project from HostGroup resource. + * + * @param {string} hostGroupName + * A fully-qualified path representing HostGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHostGroupName(hostGroupName: string) { + return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).project; + } + + /** + * Parse the location from HostGroup resource. + * + * @param {string} hostGroupName + * A fully-qualified path representing HostGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromHostGroupName(hostGroupName: string) { + return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).location; + } + + /** + * Parse the host_group from HostGroup resource. + * + * @param {string} hostGroupName + * A fully-qualified path representing HostGroup resource. + * @returns {string} A string representing the host_group. + */ + matchHostGroupFromHostGroupName(hostGroupName: string) { + return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).host_group; + } + + /** + * Return a fully-qualified kmsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} kms_config + * @returns {string} Resource name string. + */ + kmsConfigPath(project:string,location:string,kmsConfig:string) { + return this.pathTemplates.kmsConfigPathTemplate.render({ + project: project, + location: location, + kms_config: kmsConfig, + }); + } + + /** + * Parse the project from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).project; + } + + /** + * Parse the location from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).location; + } + + /** + * Parse the kms_config from KmsConfig resource. + * + * @param {string} kmsConfigName + * A fully-qualified path representing KmsConfig resource. + * @returns {string} A string representing the kms_config. + */ + matchKmsConfigFromKmsConfigName(kmsConfigName: string) { + return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).kms_config; + } + + /** + * Return a fully-qualified quotaRule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @param {string} quota_rule + * @returns {string} Resource name string. + */ + quotaRulePath(project:string,location:string,volume:string,quotaRule:string) { + return this.pathTemplates.quotaRulePathTemplate.render({ + project: project, + location: location, + volume: volume, + quota_rule: quotaRule, + }); + } + + /** + * Parse the project from QuotaRule resource. + * + * @param {string} quotaRuleName + * A fully-qualified path representing QuotaRule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromQuotaRuleName(quotaRuleName: string) { + return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).project; + } + + /** + * Parse the location from QuotaRule resource. + * + * @param {string} quotaRuleName + * A fully-qualified path representing QuotaRule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromQuotaRuleName(quotaRuleName: string) { + return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).location; + } + + /** + * Parse the volume from QuotaRule resource. + * + * @param {string} quotaRuleName + * A fully-qualified path representing QuotaRule resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromQuotaRuleName(quotaRuleName: string) { + return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).volume; + } + + /** + * Parse the quota_rule from QuotaRule resource. + * + * @param {string} quotaRuleName + * A fully-qualified path representing QuotaRule resource. + * @returns {string} A string representing the quota_rule. + */ + matchQuotaRuleFromQuotaRuleName(quotaRuleName: string) { + return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).quota_rule; + } + + /** + * Return a fully-qualified replication resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @param {string} replication + * @returns {string} Resource name string. + */ + replicationPath(project:string,location:string,volume:string,replication:string) { + return this.pathTemplates.replicationPathTemplate.render({ + project: project, + location: location, + volume: volume, + replication: replication, + }); + } + + /** + * Parse the project from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName).project; + } + + /** + * Parse the location from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName).location; + } + + /** + * Parse the volume from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName).volume; + } + + /** + * Parse the replication from Replication resource. + * + * @param {string} replicationName + * A fully-qualified path representing Replication resource. + * @returns {string} A string representing the replication. + */ + matchReplicationFromReplicationName(replicationName: string) { + return this.pathTemplates.replicationPathTemplate.match(replicationName).replication; + } + + /** + * Return a fully-qualified snapshot resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @param {string} snapshot + * @returns {string} Resource name string. + */ + snapshotPath(project:string,location:string,volume:string,snapshot:string) { + return this.pathTemplates.snapshotPathTemplate.render({ + project: project, + location: location, + volume: volume, + snapshot: snapshot, + }); + } + + /** + * Parse the project from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).project; + } + + /** + * Parse the location from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).location; + } + + /** + * Parse the volume from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).volume; + } + + /** + * Parse the snapshot from Snapshot resource. + * + * @param {string} snapshotName + * A fully-qualified path representing Snapshot resource. + * @returns {string} A string representing the snapshot. + */ + matchSnapshotFromSnapshotName(snapshotName: string) { + return this.pathTemplates.snapshotPathTemplate.match(snapshotName).snapshot; + } + + /** + * Return a fully-qualified storagePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} storage_pool + * @returns {string} Resource name string. + */ + storagePoolPath(project:string,location:string,storagePool:string) { + return this.pathTemplates.storagePoolPathTemplate.render({ + project: project, + location: location, + storage_pool: storagePool, + }); + } + + /** + * Parse the project from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).project; + } + + /** + * Parse the location from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).location; + } + + /** + * Parse the storage_pool from StoragePool resource. + * + * @param {string} storagePoolName + * A fully-qualified path representing StoragePool resource. + * @returns {string} A string representing the storage_pool. + */ + matchStoragePoolFromStoragePoolName(storagePoolName: string) { + return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).storage_pool; + } + + /** + * Return a fully-qualified volume resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} volume + * @returns {string} Resource name string. + */ + volumePath(project:string,location:string,volume:string) { + return this.pathTemplates.volumePathTemplate.render({ + project: project, + location: location, + volume: volume, + }); + } + + /** + * Parse the project from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).project; + } + + /** + * Parse the location from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).location; + } + + /** + * Parse the volume from Volume resource. + * + * @param {string} volumeName + * A fully-qualified path representing Volume resource. + * @returns {string} A string representing the volume. + */ + matchVolumeFromVolumeName(volumeName: string) { + return this.pathTemplates.volumePathTemplate.match(volumeName).volume; + } + + /** + * 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.netAppStub && !this._terminated) { + return this.netAppStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json new file mode 100644 index 00000000000..5656e408ea9 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json @@ -0,0 +1,373 @@ +{ + "interfaces": { + "google.cloud.netapp.v1.NetApp": { + "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": { + "ListStoragePools": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ValidateDirectoryService": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SwitchActiveReplicaZone": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetVolume": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RevertVolume": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EstablishVolumePeering": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListActiveDirectories": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListKmsConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EncryptVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "VerifyKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReplications": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetReplication": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StopReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ResumeReplication": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReverseReplicationDirection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EstablishPeering": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SyncReplication": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "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": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListQuotaRules": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetQuotaRule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateQuotaRule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateQuotaRule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteQuotaRule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackupFiles": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListHostGroups": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetHostGroup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateHostGroup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateHostGroup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteHostGroup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapPost": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapGet": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapDelete": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapPatch": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json new file mode 100644 index 00000000000..5960367b5d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json @@ -0,0 +1,16 @@ +[ + "../../protos/google/cloud/netapp/v1/active_directory.proto", + "../../protos/google/cloud/netapp/v1/backup.proto", + "../../protos/google/cloud/netapp/v1/backup_policy.proto", + "../../protos/google/cloud/netapp/v1/backup_vault.proto", + "../../protos/google/cloud/netapp/v1/cloud_netapp_service.proto", + "../../protos/google/cloud/netapp/v1/common.proto", + "../../protos/google/cloud/netapp/v1/host_group.proto", + "../../protos/google/cloud/netapp/v1/kms.proto", + "../../protos/google/cloud/netapp/v1/ontap.proto", + "../../protos/google/cloud/netapp/v1/quota_rule.proto", + "../../protos/google/cloud/netapp/v1/replication.proto", + "../../protos/google/cloud/netapp/v1/snapshot.proto", + "../../protos/google/cloud/netapp/v1/storage_pool.proto", + "../../protos/google/cloud/netapp/v1/volume.proto" +] diff --git a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..736d0a86453 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// 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. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const netapp = require('@google-cloud/netapp'); + +function main() { + const netAppClient = new netapp.NetAppClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..04c911e2a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// 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 {NetAppClient} from '@google-cloud/netapp'; + +// check that the client class type name can be used +function doStuffWithNetAppClient(client: NetAppClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const netAppClient = new NetAppClient(); + doStuffWithNetAppClient(netAppClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-netapp/system-test/install.ts b/owl-bot-staging/google-cloud-netapp/system-test/install.ts new file mode 100644 index 00000000000..394f3362d20 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/system-test/install.ts @@ -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 +// +// 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 {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts b/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts new file mode 100644 index 00000000000..9c37ee83a63 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts @@ -0,0 +1,12482 @@ +// 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 netappModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, 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('v1.NetAppClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new netappModule.v1.NetAppClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'netapp.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new netappModule.v1.NetAppClient(); + 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 = netappModule.v1.NetAppClient.servicePath; + assert.strictEqual(servicePath, 'netapp.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = netappModule.v1.NetAppClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'netapp.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new netappModule.v1.NetAppClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'netapp.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new netappModule.v1.NetAppClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = netappModule.v1.NetAppClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new netappModule.v1.NetAppClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new netappModule.v1.NetAppClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.netAppStub, undefined); + await client.initialize(); + assert(client.netAppStub); + }); + + it('has close method for the initialized client', done => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.netAppStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.netAppStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('getStoragePool', () => { + it('invokes getStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.StoragePool() + ); + client.innerApiCalls.getStoragePool = stubSimpleCall(expectedResponse); + const [response] = await client.getStoragePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.StoragePool() + ); + client.innerApiCalls.getStoragePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getStoragePool( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IStoragePool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getStoragePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getStoragePool(request), expectedError); + const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoragePool with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getStoragePool(request), expectedError); + }); + }); + + describe('getVolume', () => { + it('invokes getVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Volume() + ); + client.innerApiCalls.getVolume = stubSimpleCall(expectedResponse); + const [response] = await client.getVolume(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Volume() + ); + client.innerApiCalls.getVolume = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVolume( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVolume|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVolume = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVolume(request), expectedError); + const actualRequest = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVolume with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getVolume(request), expectedError); + }); + }); + + describe('getSnapshot', () => { + it('invokes getSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Snapshot() + ); + client.innerApiCalls.getSnapshot = stubSimpleCall(expectedResponse); + const [response] = await client.getSnapshot(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Snapshot() + ); + client.innerApiCalls.getSnapshot = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSnapshot( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.ISnapshot|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSnapshot = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSnapshot with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSnapshot(request), expectedError); + }); + }); + + describe('getActiveDirectory', () => { + it('invokes getActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ); + client.innerApiCalls.getActiveDirectory = stubSimpleCall(expectedResponse); + const [response] = await client.getActiveDirectory(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ActiveDirectory() + ); + client.innerApiCalls.getActiveDirectory = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getActiveDirectory( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IActiveDirectory|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getActiveDirectory = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getActiveDirectory(request), expectedError); + const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getActiveDirectory with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getActiveDirectory(request), expectedError); + }); + }); + + describe('getKmsConfig', () => { + it('invokes getKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.KmsConfig() + ); + client.innerApiCalls.getKmsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getKmsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.KmsConfig() + ); + client.innerApiCalls.getKmsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getKmsConfig( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IKmsConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getKmsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getKmsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getKmsConfig with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getKmsConfig(request), expectedError); + }); + }); + + describe('verifyKmsConfig', () => { + it('invokes verifyKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() + ); + client.innerApiCalls.verifyKmsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.verifyKmsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() + ); + client.innerApiCalls.verifyKmsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.verifyKmsConfig( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyKmsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.verifyKmsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyKmsConfig with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.verifyKmsConfig(request), expectedError); + }); + }); + + describe('getReplication', () => { + it('invokes getReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Replication() + ); + client.innerApiCalls.getReplication = stubSimpleCall(expectedResponse); + const [response] = await client.getReplication(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Replication() + ); + client.innerApiCalls.getReplication = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReplication( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IReplication|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReplication = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReplication with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getReplication(request), expectedError); + }); + }); + + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.BackupVault() + ); + client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupVault( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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('getBackupPolicy', () => { + it('invokes getBackupPolicy without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.BackupPolicy() + ); + client.innerApiCalls.getBackupPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPolicy without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.BackupPolicy() + ); + client.innerApiCalls.getBackupPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPolicy( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IBackupPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPolicy with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPolicy with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getBackupPolicy(request), expectedError); + }); + }); + + describe('getQuotaRule', () => { + it('invokes getQuotaRule without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.QuotaRule() + ); + client.innerApiCalls.getQuotaRule = stubSimpleCall(expectedResponse); + const [response] = await client.getQuotaRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getQuotaRule without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.QuotaRule() + ); + client.innerApiCalls.getQuotaRule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getQuotaRule( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IQuotaRule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getQuotaRule with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getQuotaRule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getQuotaRule(request), expectedError); + const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getQuotaRule with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getQuotaRule(request), expectedError); + }); + }); + + describe('getHostGroup', () => { + it('invokes getHostGroup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.HostGroup() + ); + client.innerApiCalls.getHostGroup = stubSimpleCall(expectedResponse); + const [response] = await client.getHostGroup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getHostGroup without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.HostGroup() + ); + client.innerApiCalls.getHostGroup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getHostGroup( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IHostGroup|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getHostGroup with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getHostGroup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getHostGroup(request), expectedError); + const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getHostGroup with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.GetHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getHostGroup(request), expectedError); + }); + }); + + describe('executeOntapPost', () => { + it('invokes executeOntapPost without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() + ); + client.innerApiCalls.executeOntapPost = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapPost(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() + ); + client.innerApiCalls.executeOntapPost = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapPost( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPostResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapPost = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapPost(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapPost(request), expectedError); + }); + }); + + describe('executeOntapGet', () => { + it('invokes executeOntapGet without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() + ); + client.innerApiCalls.executeOntapGet = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapGet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() + ); + client.innerApiCalls.executeOntapGet = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapGet( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapGetResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapGet = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapGet(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapGet(request), expectedError); + }); + }); + + describe('executeOntapDelete', () => { + it('invokes executeOntapDelete without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() + ); + client.innerApiCalls.executeOntapDelete = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapDelete(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() + ); + client.innerApiCalls.executeOntapDelete = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapDelete( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapDelete = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapDelete(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapDelete(request), expectedError); + }); + }); + + describe('executeOntapPatch', () => { + it('invokes executeOntapPatch without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() + ); + client.innerApiCalls.executeOntapPatch = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapPatch(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() + ); + client.innerApiCalls.executeOntapPatch = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapPatch( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapPatch = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapPatch(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapPatch(request), expectedError); + }); + }); + + describe('createStoragePool', () => { + it('invokes createStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createStoragePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.createStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createStoragePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createStoragePool( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createStoragePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createStoragePool(request), expectedError); + const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createStoragePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateStoragePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateStoragePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateStoragePool', () => { + it('invokes updateStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateStoragePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateStoragePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateStoragePool( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateStoragePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateStoragePool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() + ); + request.storagePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); + request.storagePool.name = defaultValue1; + const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateStoragePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateStoragePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateStoragePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteStoragePool', () => { + it('invokes deleteStoragePool without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteStoragePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteStoragePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteStoragePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteStoragePool( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStoragePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteStoragePool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoragePool with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStoragePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteStoragePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteStoragePoolProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteStoragePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteStoragePoolProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteStoragePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('validateDirectoryService', () => { + it('invokes validateDirectoryService without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.validateDirectoryService = stubLongRunningCall(expectedResponse); + const [operation] = await client.validateDirectoryService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateDirectoryService without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.validateDirectoryService = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.validateDirectoryService( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateDirectoryService with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.validateDirectoryService = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.validateDirectoryService(request), expectedError); + const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateDirectoryService with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.validateDirectoryService = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.validateDirectoryService(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkValidateDirectoryServiceProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkValidateDirectoryServiceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkValidateDirectoryServiceProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkValidateDirectoryServiceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('switchActiveReplicaZone', () => { + it('invokes switchActiveReplicaZone without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(expectedResponse); + const [operation] = await client.switchActiveReplicaZone(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes switchActiveReplicaZone without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.switchActiveReplicaZone( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes switchActiveReplicaZone with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.switchActiveReplicaZone(request), expectedError); + const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes switchActiveReplicaZone with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.switchActiveReplicaZone(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSwitchActiveReplicaZoneProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkSwitchActiveReplicaZoneProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSwitchActiveReplicaZoneProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkSwitchActiveReplicaZoneProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createVolume', () => { + it('invokes createVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.createVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVolume = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVolume( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVolume = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createVolume(request), expectedError); + const actualRequest = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVolume = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateVolumeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateVolume', () => { + it('invokes updateVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVolume = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVolume( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVolume = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateVolume(request), expectedError); + const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateVolumeRequest() + ); + request.volume ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); + request.volume.name = defaultValue1; + const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVolume = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateVolumeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteVolume', () => { + it('invokes deleteVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVolume = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVolume( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVolume = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteVolume(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVolume = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteVolumeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('revertVolume', () => { + it('invokes revertVolume without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.revertVolume = stubLongRunningCall(expectedResponse); + const [operation] = await client.revertVolume(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.revertVolume = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.revertVolume( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.revertVolume = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.revertVolume(request), expectedError); + const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes revertVolume with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RevertVolumeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.revertVolume = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.revertVolume(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRevertVolumeProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRevertVolumeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRevertVolumeProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRevertVolumeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('establishVolumePeering', () => { + it('invokes establishVolumePeering without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(expectedResponse); + const [operation] = await client.establishVolumePeering(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishVolumePeering = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.establishVolumePeering( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.establishVolumePeering(request), expectedError); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.establishVolumePeering(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEstablishVolumePeeringProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishVolumePeeringProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEstablishVolumePeeringProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishVolumePeeringProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createSnapshot', () => { + it('invokes createSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.createSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSnapshot( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteSnapshot', () => { + it('invokes deleteSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSnapshot( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateSnapshot', () => { + it('invokes updateSnapshot without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSnapshot( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSnapshot with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() + ); + request.snapshot ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); + request.snapshot.name = defaultValue1; + const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateSnapshotProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateSnapshotProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createActiveDirectory', () => { + it('invokes createActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createActiveDirectory = stubLongRunningCall(expectedResponse); + const [operation] = await client.createActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createActiveDirectory( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createActiveDirectory = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createActiveDirectory(request), expectedError); + const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateActiveDirectoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateActiveDirectoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateActiveDirectory', () => { + it('invokes updateActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateActiveDirectory( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateActiveDirectory(request), expectedError); + const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() + ); + request.activeDirectory ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); + request.activeDirectory.name = defaultValue1; + const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateActiveDirectoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateActiveDirectoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteActiveDirectory', () => { + it('invokes deleteActiveDirectory without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteActiveDirectory(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteActiveDirectory( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteActiveDirectory(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteActiveDirectory with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteActiveDirectory(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteActiveDirectoryProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteActiveDirectoryProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteActiveDirectoryProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteActiveDirectoryProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createKmsConfig', () => { + it('invokes createKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createKmsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.createKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createKmsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createKmsConfig( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createKmsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createKmsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateKmsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateKmsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateKmsConfig', () => { + it('invokes updateKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateKmsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateKmsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateKmsConfig( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateKmsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateKmsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() + ); + request.kmsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); + request.kmsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateKmsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateKmsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('encryptVolumes', () => { + it('invokes encryptVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.encryptVolumes = stubLongRunningCall(expectedResponse); + const [operation] = await client.encryptVolumes(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.encryptVolumes = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.encryptVolumes( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.encryptVolumes = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.encryptVolumes(request), expectedError); + const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes encryptVolumes with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EncryptVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.encryptVolumes = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.encryptVolumes(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEncryptVolumesProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEncryptVolumesProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEncryptVolumesProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEncryptVolumesProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteKmsConfig', () => { + it('invokes deleteKmsConfig without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteKmsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteKmsConfig( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteKmsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteKmsConfig with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteKmsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteKmsConfigProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteKmsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteKmsConfigProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteKmsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createReplication', () => { + it('invokes createReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.createReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteReplication', () => { + it('invokes deleteReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateReplication', () => { + it('invokes updateReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateReplicationRequest() + ); + request.replication ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); + request.replication.name = defaultValue1; + const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('stopReplication', () => { + it('invokes stopReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.stopReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.stopReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.stopReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.stopReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.stopReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.StopReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.stopReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkStopReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkStopReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkStopReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkStopReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('resumeReplication', () => { + it('invokes resumeReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.resumeReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.resumeReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.resumeReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.resumeReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.resumeReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.resumeReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes resumeReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ResumeReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.resumeReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.resumeReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkResumeReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkResumeReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkResumeReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkResumeReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('reverseReplicationDirection', () => { + it('invokes reverseReplicationDirection without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(expectedResponse); + const [operation] = await client.reverseReplicationDirection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reverseReplicationDirection( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.reverseReplicationDirection(request), expectedError); + const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reverseReplicationDirection with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.reverseReplicationDirection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkReverseReplicationDirectionProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkReverseReplicationDirectionProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkReverseReplicationDirectionProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkReverseReplicationDirectionProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('establishPeering', () => { + it('invokes establishPeering without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishPeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishPeering = stubLongRunningCall(expectedResponse); + const [operation] = await client.establishPeering(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishPeering without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishPeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishPeering = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.establishPeering( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishPeering with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishPeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishPeering = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.establishPeering(request), expectedError); + const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishPeering with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishPeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishPeering = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.establishPeering(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEstablishPeeringProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishPeeringProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEstablishPeeringProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishPeeringProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('syncReplication', () => { + it('invokes syncReplication without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SyncReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.syncReplication = stubLongRunningCall(expectedResponse); + const [operation] = await client.syncReplication(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes syncReplication without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SyncReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.syncReplication = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.syncReplication( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes syncReplication with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SyncReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.syncReplication = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.syncReplication(request), expectedError); + const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes syncReplication with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.SyncReplicationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.syncReplication = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.syncReplication(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSyncReplicationProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkSyncReplicationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSyncReplicationProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkSyncReplicationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('createBackup', () => { + it('invokes createBackup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackup( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackup with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + 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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('createBackupPolicy', () => { + it('invokes createBackupPolicy without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPolicy without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPolicy with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPolicy with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPolicyProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateBackupPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPolicyProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateBackupPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateBackupPolicy', () => { + it('invokes updateBackupPolicy without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() + ); + request.backupPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); + request.backupPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPolicy without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() + ); + request.backupPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); + request.backupPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPolicy with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() + ); + request.backupPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); + request.backupPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateBackupPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPolicy with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() + ); + request.backupPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); + request.backupPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateBackupPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupPolicyProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateBackupPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupPolicyProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateBackupPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupPolicy', () => { + it('invokes deleteBackupPolicy without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPolicy without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPolicy with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPolicy with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPolicyProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteBackupPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPolicyProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteBackupPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createQuotaRule', () => { + it('invokes createQuotaRule without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createQuotaRule = stubLongRunningCall(expectedResponse); + const [operation] = await client.createQuotaRule(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createQuotaRule without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createQuotaRule = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createQuotaRule( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createQuotaRule with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createQuotaRule = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createQuotaRule(request), expectedError); + const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createQuotaRule with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createQuotaRule(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateQuotaRuleProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateQuotaRuleProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateQuotaRuleProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateQuotaRuleProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateQuotaRule', () => { + it('invokes updateQuotaRule without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() + ); + request.quotaRule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); + request.quotaRule.name = defaultValue1; + const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateQuotaRule = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateQuotaRule(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateQuotaRule without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() + ); + request.quotaRule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); + request.quotaRule.name = defaultValue1; + const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateQuotaRule = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateQuotaRule( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateQuotaRule with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() + ); + request.quotaRule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); + request.quotaRule.name = defaultValue1; + const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateQuotaRule = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateQuotaRule(request), expectedError); + const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateQuotaRule with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() + ); + request.quotaRule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); + request.quotaRule.name = defaultValue1; + const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateQuotaRule(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateQuotaRuleProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateQuotaRuleProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateQuotaRuleProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateQuotaRuleProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteQuotaRule', () => { + it('invokes deleteQuotaRule without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteQuotaRule(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteQuotaRule without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteQuotaRule = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteQuotaRule( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteQuotaRule with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteQuotaRule(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteQuotaRule with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteQuotaRule(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteQuotaRuleProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteQuotaRuleProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteQuotaRuleProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteQuotaRuleProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('restoreBackupFiles', () => { + it('invokes restoreBackupFiles without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackupFiles(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackupFiles without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackupFiles = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackupFiles( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackupFiles with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.restoreBackupFiles(request), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackupFiles with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.restoreBackupFiles(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupFilesProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRestoreBackupFilesProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupFilesProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkRestoreBackupFilesProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createHostGroup', () => { + it('invokes createHostGroup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createHostGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.createHostGroup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createHostGroup without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createHostGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createHostGroup( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createHostGroup with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createHostGroup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createHostGroup(request), expectedError); + const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createHostGroup with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.CreateHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createHostGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createHostGroup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateHostGroupProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateHostGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateHostGroupProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkCreateHostGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateHostGroup', () => { + it('invokes updateHostGroup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() + ); + request.hostGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); + request.hostGroup.name = defaultValue1; + const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateHostGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateHostGroup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateHostGroup without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() + ); + request.hostGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); + request.hostGroup.name = defaultValue1; + const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateHostGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateHostGroup( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateHostGroup with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() + ); + request.hostGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); + request.hostGroup.name = defaultValue1; + const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateHostGroup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateHostGroup(request), expectedError); + const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateHostGroup with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() + ); + request.hostGroup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); + request.hostGroup.name = defaultValue1; + const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateHostGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateHostGroup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateHostGroupProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateHostGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateHostGroupProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkUpdateHostGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteHostGroup', () => { + it('invokes deleteHostGroup without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteHostGroup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteHostGroup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteHostGroup without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteHostGroup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteHostGroup( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteHostGroup with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteHostGroup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteHostGroup(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteHostGroup with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteHostGroup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteHostGroup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteHostGroupProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteHostGroupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteHostGroupProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkDeleteHostGroupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listStoragePools', () => { + it('invokes listStoragePools without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.innerApiCalls.listStoragePools = stubSimpleCall(expectedResponse); + const [response] = await client.listStoragePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePools without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.innerApiCalls.listStoragePools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listStoragePools( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IStoragePool[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePools with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listStoragePools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listStoragePools(request), expectedError); + const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoragePoolsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.descriptors.page.listStoragePools.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listStoragePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.StoragePool) => { + 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.listStoragePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listStoragePools, request)); + assert( + (client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listStoragePoolsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoragePools.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listStoragePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.StoragePool) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listStoragePools, request)); + assert( + (client.descriptors.page.listStoragePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listStoragePools without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), + ]; + client.descriptors.page.listStoragePools.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; + const iterable = client.listStoragePoolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listStoragePools with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoragePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listStoragePoolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listVolumes', () => { + it('invokes listVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.innerApiCalls.listVolumes = stubSimpleCall(expectedResponse); + const [response] = await client.listVolumes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumes without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.innerApiCalls.listVolumes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVolumes( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVolume[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumes with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVolumes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVolumes(request), expectedError); + const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVolumesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.descriptors.page.listVolumes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listVolumesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Volume[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { + 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.listVolumes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVolumes, request)); + assert( + (client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVolumesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVolumes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listVolumesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Volume[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVolumes, request)); + assert( + (client.descriptors.page.listVolumes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVolumes without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), + ]; + client.descriptors.page.listVolumes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IVolume[] = []; + const iterable = client.listVolumesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVolumes with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListVolumesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listVolumes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVolumesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IVolume[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVolumes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSnapshots', () => { + it('invokes listSnapshots without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = stubSimpleCall(expectedResponse); + const [response] = await client.listSnapshots(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.innerApiCalls.listSnapshots = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSnapshots( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.ISnapshot[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshots with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSnapshots = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSnapshots(request), expectedError); + const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSnapshotsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.descriptors.page.listSnapshots.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Snapshot) => { + 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.listSnapshots.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSnapshots, request)); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSnapshotsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listSnapshotsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Snapshot) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSnapshots, request)); + assert( + (client.descriptors.page.listSnapshots.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSnapshots without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), + ]; + client.descriptors.page.listSnapshots.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; + const iterable = client.listSnapshotsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSnapshots with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListSnapshotsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listSnapshots.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSnapshotsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listActiveDirectories', () => { + it('invokes listActiveDirectories without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + ]; + client.innerApiCalls.listActiveDirectories = stubSimpleCall(expectedResponse); + const [response] = await client.listActiveDirectories(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectories without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + ]; + client.innerApiCalls.listActiveDirectories = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listActiveDirectories( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IActiveDirectory[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectories with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listActiveDirectories = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listActiveDirectories(request), expectedError); + const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listActiveDirectoriesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + ]; + client.descriptors.page.listActiveDirectories.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listActiveDirectoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { + 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.listActiveDirectories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listActiveDirectories, request)); + assert( + (client.descriptors.page.listActiveDirectories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listActiveDirectoriesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listActiveDirectories.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listActiveDirectoriesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listActiveDirectories.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listActiveDirectories, request)); + assert( + (client.descriptors.page.listActiveDirectories.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listActiveDirectories without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), + ]; + client.descriptors.page.listActiveDirectories.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; + const iterable = client.listActiveDirectoriesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listActiveDirectories with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listActiveDirectories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listActiveDirectoriesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listKmsConfigs', () => { + it('invokes listKmsConfigs without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.innerApiCalls.listKmsConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listKmsConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigs without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.innerApiCalls.listKmsConfigs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listKmsConfigs( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IKmsConfig[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigs with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listKmsConfigs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listKmsConfigs(request), expectedError); + const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listKmsConfigsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.descriptors.page.listKmsConfigs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listKmsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.KmsConfig) => { + 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.listKmsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listKmsConfigs, request)); + assert( + (client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listKmsConfigsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listKmsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listKmsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.KmsConfig) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listKmsConfigs, request)); + assert( + (client.descriptors.page.listKmsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listKmsConfigs without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), + ]; + client.descriptors.page.listKmsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; + const iterable = client.listKmsConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listKmsConfigs with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listKmsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listKmsConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReplications', () => { + it('invokes listReplications without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.innerApiCalls.listReplications = stubSimpleCall(expectedResponse); + const [response] = await client.listReplications(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplications without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.innerApiCalls.listReplications = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReplications( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IReplication[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplications with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReplications = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReplications(request), expectedError); + const actualRequest = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReplicationsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.descriptors.page.listReplications.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listReplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Replication[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Replication) => { + 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.listReplications.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReplications, request)); + assert( + (client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReplicationsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReplications.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listReplicationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Replication[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.Replication) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReplications, request)); + assert( + (client.descriptors.page.listReplications.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReplications without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), + ]; + client.descriptors.page.listReplications.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IReplication[] = []; + const iterable = client.listReplicationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReplications.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReplications.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReplications with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListReplicationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listReplications.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReplicationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IReplication[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReplications.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReplications.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.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('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + ]; + client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.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('listBackupPolicies', () => { + it('invokes listBackupPolicies without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + ]; + client.innerApiCalls.listBackupPolicies = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPolicies without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + ]; + client.innerApiCalls.listBackupPolicies = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPolicies( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IBackupPolicy[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPolicies with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPolicies = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupPolicies(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPoliciesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + ]; + client.descriptors.page.listBackupPolicies.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.BackupPolicy[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.BackupPolicy) => { + 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.listBackupPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPolicies, request)); + assert( + (client.descriptors.page.listBackupPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupPoliciesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPolicies.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.BackupPolicy[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.BackupPolicy) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPolicies, request)); + assert( + (client.descriptors.page.listBackupPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPolicies without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), + ]; + client.descriptors.page.listBackupPolicies.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IBackupPolicy[] = []; + const iterable = client.listBackupPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPolicies with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPolicies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPoliciesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IBackupPolicy[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listQuotaRules', () => { + it('invokes listQuotaRules without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + ]; + client.innerApiCalls.listQuotaRules = stubSimpleCall(expectedResponse); + const [response] = await client.listQuotaRules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQuotaRules without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + ]; + client.innerApiCalls.listQuotaRules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listQuotaRules( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IQuotaRule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQuotaRules with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listQuotaRules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listQuotaRules(request), expectedError); + const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQuotaRulesStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + ]; + client.descriptors.page.listQuotaRules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listQuotaRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.QuotaRule[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.QuotaRule) => { + 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.listQuotaRules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listQuotaRules, request)); + assert( + (client.descriptors.page.listQuotaRules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listQuotaRulesStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listQuotaRules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listQuotaRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.QuotaRule[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.QuotaRule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listQuotaRules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listQuotaRules, request)); + assert( + (client.descriptors.page.listQuotaRules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listQuotaRules without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), + ]; + client.descriptors.page.listQuotaRules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IQuotaRule[] = []; + const iterable = client.listQuotaRulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listQuotaRules with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listQuotaRules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listQuotaRulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IQuotaRule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listHostGroups', () => { + it('invokes listHostGroups without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + ]; + client.innerApiCalls.listHostGroups = stubSimpleCall(expectedResponse); + const [response] = await client.listHostGroups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHostGroups without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + ]; + client.innerApiCalls.listHostGroups = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listHostGroups( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IHostGroup[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHostGroups with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listHostGroups = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listHostGroups(request), expectedError); + const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listHostGroupsStream without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + ]; + client.descriptors.page.listHostGroups.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listHostGroupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.HostGroup[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.HostGroup) => { + 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.listHostGroups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listHostGroups, request)); + assert( + (client.descriptors.page.listHostGroups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listHostGroupsStream with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listHostGroups.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listHostGroupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.netapp.v1.HostGroup[] = []; + stream.on('data', (response: protos.google.cloud.netapp.v1.HostGroup) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listHostGroups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listHostGroups, request)); + assert( + (client.descriptors.page.listHostGroups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listHostGroups without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), + ]; + client.descriptors.page.listHostGroups.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.netapp.v1.IHostGroup[] = []; + const iterable = client.listHostGroupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listHostGroups with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ListHostGroupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listHostGroups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listHostGroupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.netapp.v1.IHostGroup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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 netappModule.v1.NetAppClient({ + 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('activeDirectory', async () => { + const fakePath = "/rendered/path/activeDirectory"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + active_directory: "activeDirectoryValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.activeDirectoryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.activeDirectoryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('activeDirectoryPath', () => { + const result = client.activeDirectoryPath("projectValue", "locationValue", "activeDirectoryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.activeDirectoryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromActiveDirectoryName', () => { + const result = client.matchProjectFromActiveDirectoryName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromActiveDirectoryName', () => { + const result = client.matchLocationFromActiveDirectoryName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchActiveDirectoryFromActiveDirectoryName', () => { + const result = client.matchActiveDirectoryFromActiveDirectoryName(fakePath); + assert.strictEqual(result, "activeDirectoryValue"); + assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backup', async () => { + const fakePath = "/rendered/path/backup"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_vault: "backupVaultValue", + backup: "backupValue", + }; + const client = new netappModule.v1.NetAppClient({ + 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", "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('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, "backupValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupPolicy', async () => { + const fakePath = "/rendered/path/backupPolicy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_policy: "backupPolicyValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPolicyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPolicyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPolicyPath', () => { + const result = client.backupPolicyPath("projectValue", "locationValue", "backupPolicyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPolicyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupPolicyName', () => { + const result = client.matchProjectFromBackupPolicyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupPolicyName', () => { + const result = client.matchLocationFromBackupPolicyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupPolicyFromBackupPolicyName', () => { + const result = client.matchBackupPolicyFromBackupPolicyName(fakePath); + assert.strictEqual(result, "backupPolicyValue"); + assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupVault', async () => { + const fakePath = "/rendered/path/backupVault"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_vault: "backupVaultValue", + }; + const client = new netappModule.v1.NetAppClient({ + 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('hostGroup', async () => { + const fakePath = "/rendered/path/hostGroup"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + host_group: "hostGroupValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.hostGroupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.hostGroupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('hostGroupPath', () => { + const result = client.hostGroupPath("projectValue", "locationValue", "hostGroupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.hostGroupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromHostGroupName', () => { + const result = client.matchProjectFromHostGroupName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromHostGroupName', () => { + const result = client.matchLocationFromHostGroupName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchHostGroupFromHostGroupName', () => { + const result = client.matchHostGroupFromHostGroupName(fakePath); + assert.strictEqual(result, "hostGroupValue"); + assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('kmsConfig', async () => { + const fakePath = "/rendered/path/kmsConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + kms_config: "kmsConfigValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.kmsConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.kmsConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('kmsConfigPath', () => { + const result = client.kmsConfigPath("projectValue", "locationValue", "kmsConfigValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.kmsConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromKmsConfigName', () => { + const result = client.matchProjectFromKmsConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromKmsConfigName', () => { + const result = client.matchLocationFromKmsConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchKmsConfigFromKmsConfigName', () => { + const result = client.matchKmsConfigFromKmsConfigName(fakePath); + assert.strictEqual(result, "kmsConfigValue"); + assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('quotaRule', async () => { + const fakePath = "/rendered/path/quotaRule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + volume: "volumeValue", + quota_rule: "quotaRuleValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.quotaRulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.quotaRulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('quotaRulePath', () => { + const result = client.quotaRulePath("projectValue", "locationValue", "volumeValue", "quotaRuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.quotaRulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromQuotaRuleName', () => { + const result = client.matchProjectFromQuotaRuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromQuotaRuleName', () => { + const result = client.matchLocationFromQuotaRuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVolumeFromQuotaRuleName', () => { + const result = client.matchVolumeFromQuotaRuleName(fakePath); + assert.strictEqual(result, "volumeValue"); + assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchQuotaRuleFromQuotaRuleName', () => { + const result = client.matchQuotaRuleFromQuotaRuleName(fakePath); + assert.strictEqual(result, "quotaRuleValue"); + assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('replication', async () => { + const fakePath = "/rendered/path/replication"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + volume: "volumeValue", + replication: "replicationValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.replicationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.replicationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('replicationPath', () => { + const result = client.replicationPath("projectValue", "locationValue", "volumeValue", "replicationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.replicationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromReplicationName', () => { + const result = client.matchProjectFromReplicationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromReplicationName', () => { + const result = client.matchLocationFromReplicationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVolumeFromReplicationName', () => { + const result = client.matchVolumeFromReplicationName(fakePath); + assert.strictEqual(result, "volumeValue"); + assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReplicationFromReplicationName', () => { + const result = client.matchReplicationFromReplicationName(fakePath); + assert.strictEqual(result, "replicationValue"); + assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('snapshot', async () => { + const fakePath = "/rendered/path/snapshot"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + volume: "volumeValue", + snapshot: "snapshotValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.snapshotPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.snapshotPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('snapshotPath', () => { + const result = client.snapshotPath("projectValue", "locationValue", "volumeValue", "snapshotValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.snapshotPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSnapshotName', () => { + const result = client.matchProjectFromSnapshotName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSnapshotName', () => { + const result = client.matchLocationFromSnapshotName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVolumeFromSnapshotName', () => { + const result = client.matchVolumeFromSnapshotName(fakePath); + assert.strictEqual(result, "volumeValue"); + assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSnapshotFromSnapshotName', () => { + const result = client.matchSnapshotFromSnapshotName(fakePath); + assert.strictEqual(result, "snapshotValue"); + assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('storagePool', async () => { + const fakePath = "/rendered/path/storagePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + storage_pool: "storagePoolValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.storagePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.storagePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('storagePoolPath', () => { + const result = client.storagePoolPath("projectValue", "locationValue", "storagePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.storagePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromStoragePoolName', () => { + const result = client.matchProjectFromStoragePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromStoragePoolName', () => { + const result = client.matchLocationFromStoragePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchStoragePoolFromStoragePoolName', () => { + const result = client.matchStoragePoolFromStoragePoolName(fakePath); + assert.strictEqual(result, "storagePoolValue"); + assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('volume', async () => { + const fakePath = "/rendered/path/volume"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + volume: "volumeValue", + }; + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.volumePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.volumePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('volumePath', () => { + const result = client.volumePath("projectValue", "locationValue", "volumeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.volumePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVolumeName', () => { + const result = client.matchProjectFromVolumeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVolumeName', () => { + const result = client.matchLocationFromVolumeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVolumeFromVolumeName', () => { + const result = client.matchVolumeFromVolumeName(fakePath); + assert.strictEqual(result, "volumeValue"); + assert((client.pathTemplates.volumePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-netapp/tsconfig.json b/owl-bot-staging/google-cloud-netapp/tsconfig.json new file mode 100644 index 00000000000..ca73e7bfc82 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-cloud-netapp/webpack.config.js b/owl-bot-staging/google-cloud-netapp/webpack.config.js new file mode 100644 index 00000000000..a2b8685a421 --- /dev/null +++ b/owl-bot-staging/google-cloud-netapp/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'NetApp', + filename: './net-app.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 945c01bcd8848924da298e4d9e88cfb6389dbddf Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 06:27:24 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-netapp/.eslintignore | 7 - .../google-cloud-netapp/.eslintrc.json | 3 - .../google-cloud-netapp/.gitattributes | 4 - .../google-cloud-netapp/.gitignore | 14 - owl-bot-staging/google-cloud-netapp/.jsdoc.js | 55 - .../google-cloud-netapp/.mocharc.js | 33 - owl-bot-staging/google-cloud-netapp/.nycrc | 24 - .../google-cloud-netapp/.prettierignore | 6 - .../google-cloud-netapp/.prettierrc.js | 22 - .../google-cloud-netapp/CODE_OF_CONDUCT.md | 94 - .../google-cloud-netapp/CONTRIBUTING.md | 76 - owl-bot-staging/google-cloud-netapp/LICENSE | 202 - owl-bot-staging/google-cloud-netapp/README.md | 185 - .../cloud/netapp/v1/active_directory.proto | 237 - .../google/cloud/netapp/v1/backup.proto | 262 - .../cloud/netapp/v1/backup_policy.proto | 195 - .../google/cloud/netapp/v1/backup_vault.proto | 303 - .../netapp/v1/cloud_netapp_service.proto | 918 - .../google/cloud/netapp/v1/common.proto | 158 - .../google/cloud/netapp/v1/host_group.proto | 197 - .../protos/google/cloud/netapp/v1/kms.proto | 246 - .../google/cloud/netapp/v1/quota_rule.proto | 203 - .../google/cloud/netapp/v1/replication.proto | 509 - .../google/cloud/netapp/v1/snapshot.proto | 180 - .../google/cloud/netapp/v1/storage_pool.proto | 341 - .../google/cloud/netapp/v1/volume.proto | 1022 - .../google-cloud-netapp/protos/protos.d.ts | 24482 ------ .../google-cloud-netapp/protos/protos.js | 64227 ---------------- .../google-cloud-netapp/protos/protos.json | 8651 --- .../v1/net_app.create_active_directory.js | 75 - .../generated/v1/net_app.create_backup.js | 77 - .../v1/net_app.create_backup_policy.js | 77 - .../v1/net_app.create_backup_vault.js | 77 - .../generated/v1/net_app.create_host_group.js | 75 - .../generated/v1/net_app.create_kms_config.js | 75 - .../generated/v1/net_app.create_quota_rule.js | 75 - .../v1/net_app.create_replication.js | 76 - .../generated/v1/net_app.create_snapshot.js | 76 - .../v1/net_app.create_storage_pool.js | 75 - .../generated/v1/net_app.create_volume.js | 75 - .../v1/net_app.delete_active_directory.js | 62 - .../generated/v1/net_app.delete_backup.js | 63 - .../v1/net_app.delete_backup_policy.js | 63 - .../v1/net_app.delete_backup_vault.js | 63 - .../generated/v1/net_app.delete_host_group.js | 64 - .../generated/v1/net_app.delete_kms_config.js | 62 - .../generated/v1/net_app.delete_quota_rule.js | 62 - .../v1/net_app.delete_replication.js | 63 - .../generated/v1/net_app.delete_snapshot.js | 63 - .../v1/net_app.delete_storage_pool.js | 62 - .../generated/v1/net_app.delete_volume.js | 68 - .../generated/v1/net_app.encrypt_volumes.js | 62 - .../generated/v1/net_app.establish_peering.js | 85 - .../v1/net_app.get_active_directory.js | 61 - .../generated/v1/net_app.get_backup.js | 62 - .../generated/v1/net_app.get_backup_policy.js | 62 - .../generated/v1/net_app.get_backup_vault.js | 62 - .../generated/v1/net_app.get_host_group.js | 63 - .../generated/v1/net_app.get_kms_config.js | 61 - .../generated/v1/net_app.get_quota_rule.js | 61 - .../generated/v1/net_app.get_replication.js | 62 - .../generated/v1/net_app.get_snapshot.js | 62 - .../generated/v1/net_app.get_storage_pool.js | 61 - .../generated/v1/net_app.get_volume.js | 61 - .../v1/net_app.list_active_directories.js | 80 - .../v1/net_app.list_backup_policies.js | 80 - .../v1/net_app.list_backup_vaults.js | 82 - .../generated/v1/net_app.list_backups.js | 93 - .../generated/v1/net_app.list_host_groups.js | 80 - .../generated/v1/net_app.list_kms_configs.js | 80 - .../generated/v1/net_app.list_quota_rules.js | 80 - .../generated/v1/net_app.list_replications.js | 82 - .../generated/v1/net_app.list_snapshots.js | 82 - .../v1/net_app.list_storage_pools.js | 81 - .../generated/v1/net_app.list_volumes.js | 80 - .../v1/net_app.restore_backup_files.js | 80 - .../v1/net_app.resume_replication.js | 63 - .../net_app.reverse_replication_direction.js | 63 - .../generated/v1/net_app.revert_volume.js | 70 - .../generated/v1/net_app.stop_replication.js | 72 - .../v1/net_app.switch_active_replica_zone.js | 62 - .../generated/v1/net_app.sync_replication.js | 63 - .../v1/net_app.update_active_directory.js | 71 - .../generated/v1/net_app.update_backup.js | 71 - .../v1/net_app.update_backup_policy.js | 71 - .../v1/net_app.update_backup_vault.js | 71 - .../generated/v1/net_app.update_host_group.js | 69 - .../generated/v1/net_app.update_kms_config.js | 71 - .../generated/v1/net_app.update_quota_rule.js | 70 - .../v1/net_app.update_replication.js | 68 - .../generated/v1/net_app.update_snapshot.js | 68 - .../v1/net_app.update_storage_pool.js | 71 - .../generated/v1/net_app.update_volume.js | 71 - .../v1/net_app.validate_directory_service.js | 66 - .../generated/v1/net_app.verify_kms_config.js | 61 - ...ippet_metadata_google.cloud.netapp.v1.json | 3231 - .../google-cloud-netapp/src/index.ts | 27 - .../src/v1/gapic_metadata.json | 777 - .../google-cloud-netapp/src/v1/index.ts | 19 - .../src/v1/net_app_client.ts | 10491 --- .../src/v1/net_app_client_config.json | 373 - .../src/v1/net_app_proto_list.json | 16 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../system-test/install.ts | 49 - .../test/gapic_net_app_v1.ts | 12482 --- .../google-cloud-netapp/tsconfig.json | 22 - .../google-cloud-netapp/webpack.config.js | 64 - packages/google-cloud-netapp/README.md | 5 + .../google/cloud/netapp/v1/backup.proto | 1 + .../netapp/v1/cloud_netapp_service.proto | 53 + .../google/cloud/netapp/v1/common.proto | 3 - .../protos/google/cloud/netapp/v1/ontap.proto | 0 .../google/cloud/netapp/v1/storage_pool.proto | 23 +- .../google/cloud/netapp/v1/volume.proto | 64 +- .../google-cloud-netapp/protos/protos.d.ts | 1666 +- packages/google-cloud-netapp/protos/protos.js | 27377 ++++--- .../google-cloud-netapp/protos/protos.json | 340 +- .../v1/net_app.establish_volume_peering.js | 0 .../v1/net_app.execute_ontap_delete.js | 0 .../generated/v1/net_app.execute_ontap_get.js | 0 .../v1/net_app.execute_ontap_patch.js | 0 .../v1/net_app.execute_ontap_post.js | 0 ...ippet_metadata_google.cloud.netapp.v1.json | 224 + .../src/v1/gapic_metadata.json | 50 + .../src/v1/net_app_client.ts | 550 +- .../src/v1/net_app_client_config.json | 20 + .../src/v1/net_app_proto_list.json | 1 + .../test/gapic_net_app_v1.ts | 586 + 129 files changed, 18883 insertions(+), 147171 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-netapp/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-netapp/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-netapp/.gitattributes delete mode 100644 owl-bot-staging/google-cloud-netapp/.gitignore delete mode 100644 owl-bot-staging/google-cloud-netapp/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-netapp/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-netapp/.nycrc delete mode 100644 owl-bot-staging/google-cloud-netapp/.prettierignore delete mode 100644 owl-bot-staging/google-cloud-netapp/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md delete mode 100644 owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md delete mode 100644 owl-bot-staging/google-cloud-netapp/LICENSE delete mode 100644 owl-bot-staging/google-cloud-netapp/README.md delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-netapp/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js delete mode 100644 owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json delete mode 100644 owl-bot-staging/google-cloud-netapp/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json delete mode 100644 owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts delete mode 100644 owl-bot-staging/google-cloud-netapp/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-netapp/webpack.config.js rename {owl-bot-staging => packages}/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto (100%) rename {owl-bot-staging => packages}/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js (100%) rename {owl-bot-staging => packages}/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js (100%) rename {owl-bot-staging => packages}/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js (100%) rename {owl-bot-staging => packages}/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js (100%) rename {owl-bot-staging => packages}/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js (100%) diff --git a/owl-bot-staging/google-cloud-netapp/.eslintignore b/owl-bot-staging/google-cloud-netapp/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-netapp/.eslintrc.json b/owl-bot-staging/google-cloud-netapp/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-netapp/.gitattributes b/owl-bot-staging/google-cloud-netapp/.gitattributes deleted file mode 100644 index 33739cb74e4..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -*.ts text eol=lf -*.js text eol=lf -protos/* linguist-generated -**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/owl-bot-staging/google-cloud-netapp/.gitignore b/owl-bot-staging/google-cloud-netapp/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-cloud-netapp/.jsdoc.js b/owl-bot-staging/google-cloud-netapp/.jsdoc.js deleted file mode 100644 index 07f36ff414a..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// 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'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/netapp', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-netapp/.mocharc.js b/owl-bot-staging/google-cloud-netapp/.mocharc.js deleted file mode 100644 index 5eb34e86c87..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// 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. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-netapp/.nycrc b/owl-bot-staging/google-cloud-netapp/.nycrc deleted file mode 100644 index 81a95fc94b0..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "report-dir": "./.coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/.coverage", - "**/apis", - "**/benchmark", - "**/conformance", - "**/docs", - "**/samples", - "**/scripts", - "**/protos", - "**/test", - "**/*.d.ts", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ], - "exclude-after-remap": false, - "all": true -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/.prettierignore b/owl-bot-staging/google-cloud-netapp/.prettierignore deleted file mode 100644 index 9340ad9b86d..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/owl-bot-staging/google-cloud-netapp/.prettierrc.js b/owl-bot-staging/google-cloud-netapp/.prettierrc.js deleted file mode 100644 index 7649ee3c254..00000000000 --- a/owl-bot-staging/google-cloud-netapp/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// 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. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md b/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md deleted file mode 100644 index 2add2547a81..00000000000 --- a/owl-bot-staging/google-cloud-netapp/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,94 +0,0 @@ - -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when the Project -Steward has a reasonable belief that an individual's behavior may have a -negative impact on the project or its community. - -## Conflict Resolution - -We do not believe that all conflict is bad; healthy debate and disagreement -often yield positive results. However, it is never okay to be disrespectful or -to engage in behavior that violates the project’s code of conduct. - -If you see someone violating the code of conduct, you are encouraged to address -the behavior directly with those involved. Many issues can be resolved quickly -and easily, and this gives people more control over the outcome of their -dispute. If you are unable to resolve the matter for any reason, or if the -behavior is threatening or harassing, report it. We are dedicated to providing -an environment where participants feel welcome and safe. - -Reports should be directed to *googleapis-stewards@google.com*, the -Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to -receive and address reported violations of the code of conduct. They will then -work with a committee consisting of representatives from the Open Source -Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out to the Project Steward, please email -opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is taken. -The identity of the reporter will be omitted from the details of the report -supplied to the accused. In potentially harmful situations, such as ongoing -harassment or threats to anyone's safety, we may take action without notice. - -## Attribution - -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, -available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md b/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md deleted file mode 100644 index 46b5bf76212..00000000000 --- a/owl-bot-staging/google-cloud-netapp/CONTRIBUTING.md +++ /dev/null @@ -1,76 +0,0 @@ -# How to become a contributor and submit your own code - -**Table of contents** - -* [Contributor License Agreements](#contributor-license-agreements) -* [Contributing a patch](#contributing-a-patch) -* [Running the tests](#running-the-tests) -* [Releasing the library](#releasing-the-library) - -## Contributor License Agreements - -We'd love to accept your sample apps and patches! Before we can take them, we -have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the code to which - you are contributing. -1. Ensure that your code has an appropriate set of tests which all pass. -1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. -1. Submit a pull request. - -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Netapp API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. - - -## Running the tests - -1. [Prepare your environment for Node.js setup][setup]. - -1. Install dependencies: - - npm install - -1. Run the tests: - - # Run unit tests. - npm test - - # Run sample integration tests. - npm run samples-test - - # Run all system tests. - npm run system-test - -1. Lint (and maybe fix) any changes: - - npm run fix - -[setup]: https://cloud.google.com/nodejs/docs/setup -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/LICENSE b/owl-bot-staging/google-cloud-netapp/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/owl-bot-staging/google-cloud-netapp/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-netapp/README.md b/owl-bot-staging/google-cloud-netapp/README.md deleted file mode 100644 index f4c7d90f98b..00000000000 --- a/owl-bot-staging/google-cloud-netapp/README.md +++ /dev/null @@ -1,185 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [NetApp API: Nodejs Client][homepage] - -This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways -unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **stable** libraries -are addressed with the highest priority - -[![npm version](https://img.shields.io/npm/v/@google-cloud/netapp.svg)](https://www.npmjs.org/package/@google-cloud/netapp) - -NetApp API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [NetApp API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/netapp/latest) -* [NetApp API Documentation](https://cloud.google.com/netapp/volumes/docs/discover/overview) - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - -**Table of contents:** - -* [Quickstart](#quickstart) - * [Before you begin](#before-you-begin) - * [Installing the client library](#installing-the-client-library) - -* [Versioning](#versioning) -* [Contributing](#contributing) -* [License](#license) - -## Quickstart -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the NetApp API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-cloud/netapp -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| create active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js) | -| create backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js) | -| create backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js) | -| create backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js) | -| create host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js) | -| create kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js) | -| create quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js) | -| create replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js) | -| create snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js) | -| create storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js) | -| create volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js) | -| delete active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js) | -| delete backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js) | -| delete backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js) | -| delete backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js) | -| delete host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js) | -| delete kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js) | -| delete quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js) | -| delete replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js) | -| delete snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js) | -| delete storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js) | -| delete volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js) | -| encrypt volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js) | -| establish peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js) | -| establish volume peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js) | -| execute ontap delete | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js) | -| execute ontap get | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js) | -| execute ontap patch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js) | -| execute ontap post | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js) | -| get active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js) | -| get backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js) | -| get backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js) | -| get backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js) | -| get host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js) | -| get kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js) | -| get quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js) | -| get replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js) | -| get snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js) | -| get storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js) | -| get volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js) | -| list active directories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js) | -| list backup policies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js) | -| list backup vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js) | -| list backups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js) | -| list host groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js) | -| list kms configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js) | -| list quota rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js) | -| list replications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js) | -| list snapshots | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js) | -| list storage pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js) | -| list volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js) | -| restore backup files | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js) | -| resume replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js) | -| reverse replication direction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js) | -| revert volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js) | -| stop replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js) | -| switch active replica zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js) | -| sync replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js) | -| update active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js) | -| update backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js) | -| update backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js) | -| update backup vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js) | -| update host group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js) | -| update kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js) | -| update quota rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js) | -| update replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js) | -| update snapshot | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js) | -| update storage pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js) | -| update volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js) | -| validate directory service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js) | -| verify kms config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js) | -| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-cloud/netapp@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/LICENSE) - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=netapp.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto deleted file mode 100644 index 3ec6b81ef06..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/active_directory.proto +++ /dev/null @@ -1,237 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "ActiveDirectoryProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// ListActiveDirectoriesRequest for requesting multiple active directories. -message ListActiveDirectoriesRequest { - // Required. Parent value for ListActiveDirectoriesRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/ActiveDirectory" - } - ]; - - // Requested page size. Server may return fewer items than requested. - // If unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results the server should return. - string page_token = 3; - - // Filtering results - string filter = 4; - - // Hint for how to order the results - string order_by = 5; -} - -// ListActiveDirectoriesResponse contains all the active directories requested. -message ListActiveDirectoriesResponse { - // The list of active directories. - repeated ActiveDirectory active_directories = 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; -} - -// GetActiveDirectory for getting a single active directory. -message GetActiveDirectoryRequest { - // Required. Name of the active directory. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/ActiveDirectory" - } - ]; -} - -// CreateActiveDirectoryRequest for creating an active directory. -message CreateActiveDirectoryRequest { - // Required. Value for parent. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/ActiveDirectory" - } - ]; - - // Required. Fields of the to be created active directory. - ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the active directory to create. Must be unique within the - // parent resource. Must contain only letters, numbers and hyphen, with the - // first character a letter , the last a letter or a number, and a 63 - // character maximum. - string active_directory_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// UpdateActiveDirectoryRequest for updating an active directory. -message UpdateActiveDirectoryRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Active Directory 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The volume being updated - ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteActiveDirectoryRequest for deleting a single active directory. -message DeleteActiveDirectoryRequest { - // Required. Name of the active directory. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/ActiveDirectory" - } - ]; -} - -// ActiveDirectory is the public representation of the active directory config. -message ActiveDirectory { - option (google.api.resource) = { - type: "netapp.googleapis.com/ActiveDirectory" - pattern: "projects/{project}/locations/{location}/activeDirectories/{active_directory}" - plural: "activeDirectories" - singular: "activeDirectory" - }; - - // The Active Directory States - enum State { - // Unspecified Active Directory State - STATE_UNSPECIFIED = 0; - - // Active Directory State is Creating - CREATING = 1; - - // Active Directory State is Ready - READY = 2; - - // Active Directory State is Updating - UPDATING = 3; - - // Active Directory State is In use - IN_USE = 4; - - // Active Directory State is Deleting - DELETING = 5; - - // Active Directory State is Error - ERROR = 6; - - // Active Directory State is Diagnosing. - DIAGNOSING = 7; - } - - // Identifier. The resource name of the active directory. - // Format: - // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Create time of the active directory. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The state of the AD. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Name of the Active Directory domain - string domain = 4 [(google.api.field_behavior) = REQUIRED]; - - // The Active Directory site the service will limit Domain Controller - // discovery too. - string site = 5; - - // Required. Comma separated list of DNS server IP addresses for the Active - // Directory domain. - string dns = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. NetBIOSPrefix is used as a prefix for SMB server name. - string net_bios_prefix = 7 [(google.api.field_behavior) = REQUIRED]; - - // The Organizational Unit (OU) within the Windows Active Directory the user - // belongs to. - string organizational_unit = 8; - - // If enabled, AES encryption will be enabled for SMB communication. - bool aes_encryption = 9; - - // Required. Username of the Active Directory domain administrator. - string username = 10 [(google.api.field_behavior) = REQUIRED]; - - // Required. Password of the Active Directory domain administrator. - string password = 11 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Users to be added to the Built-in Backup Operator active - // directory group. - repeated string backup_operators = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Users to be added to the Built-in Admininstrators group. - repeated string administrators = 22 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Domain users to be given the SeSecurityPrivilege. - repeated string security_operators = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Name of the active directory machine. This optional parameter is used only - // while creating kerberos volume - string kdc_hostname = 14; - - // KDC server IP address for the active directory machine. - string kdc_ip = 15; - - // If enabled, will allow access to local users and LDAP users. If access is - // needed for only LDAP users, it has to be disabled. - bool nfs_users_with_ldap = 16; - - // Description of the active directory. - string description = 17; - - // Specifies whether or not the LDAP traffic needs to be signed. - bool ldap_signing = 18; - - // If enabled, traffic between the SMB server to Domain Controller (DC) will - // be encrypted. - bool encrypt_dc_connections = 19; - - // Labels for the active directory. - map labels = 20; - - // Output only. The state details of the Active Directory. - string state_details = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto deleted file mode 100644 index 22f6dfd68bb..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto +++ /dev/null @@ -1,262 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "BackupProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// A NetApp Backup. -message Backup { - option (google.api.resource) = { - type: "netapp.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}" - plural: "backups" - singular: "backup" - }; - - // The Backup States - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // Backup is being created. While in this state, the snapshot for the backup - // point-in-time may not have been created yet, and so the point-in-time may - // not have been fixed. - CREATING = 1; - - // Backup is being uploaded. While in this state, none of the writes to the - // volume will be included in the backup. - UPLOADING = 2; - - // Backup is available for use. - READY = 3; - - // Backup is being deleted. - DELETING = 4; - - // Backup is not valid and cannot be used for creating new volumes or - // restoring existing volumes. - ERROR = 5; - - // Backup is being updated. - UPDATING = 6; - } - - // Backup types. - enum Type { - // Unspecified backup type. - TYPE_UNSPECIFIED = 0; - - // Manual backup type. - MANUAL = 1; - - // Scheduled backup type. - SCHEDULED = 2; - } - - // Identifier. The resource name of the backup. - // Format: - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. The backup state. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A description of the backup with 2048 characters or less. - // Requests with longer descriptions will be rejected. - string description = 3; - - // Output only. Size of the file system when the backup was created. When - // creating a new volume from the backup, the volume capacity will have to be - // at least as big. - int64 volume_usage_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type of backup, manually created or created by a backup - // policy. - Type backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Volume full name of this backup belongs to. - // Either source_volume or ontap_source should be provided. - // Format: - // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` - string source_volume = 6 [ - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // If specified, backup will be created from the given snapshot. - // If not specified, there will be a new snapshot taken to initiate the backup - // creation. Format: - // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - optional string source_snapshot = 7 [ - (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } - ]; - - // Output only. The time when the backup was created. - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 9; - - // Output only. Total size of all backups in a chain in bytes = baseline - // backup size + sum(incremental backup size) - int64 chain_storage_bytes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use - bool satisfies_pzs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use - bool satisfies_pzi = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Region of the volume from which the backup was created. - // Format: `projects/{project_id}/locations/{location}` - string volume_region = 13 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Output only. Region in which backup is stored. - // Format: `projects/{project_id}/locations/{location}` - string backup_region = 14 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Output only. The time until which the backup is not deletable. - google.protobuf.Timestamp enforced_retention_end_time = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ListBackupsRequest lists backups. -message ListBackupsRequest { - // Required. The backupVault for which to retrieve backup information, - // in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - // To retrieve backup information for all locations, use "-" for the - // `{location}` value. - // To retrieve backup information for all backupVaults, use "-" for the - // `{backup_vault_id}` value. - // To retrieve backup information for a volume, use "-" for the - // `{backup_vault_id}` value and specify volume full name with the filter. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Backup" - } - ]; - - // The maximum number of items to return. The service may return fewer - // than this value. The maximum value - // is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2; - - // The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // The standard list filter. - // If specified, backups will be returned based on the attribute name that - // matches the filter expression. If empty, then no backups are filtered out. - // See https://google.aip.dev/160 - string filter = 5; -} - -// ListBackupsResponse is the result of ListBackupsRequest. -message ListBackupsResponse { - // A list of backups in the project. - repeated Backup backups = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// GetBackupRequest gets the state of a backup. -message GetBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } - ]; -} - -// CreateBackupRequest creates a backup. -message CreateBackupRequest { - // Required. The NetApp backupVault to create the backups of, in the format - // `projects/*/locations/*/backupVaults/{backup_vault_id}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Backup" - } - ]; - - // Required. The ID to use for the backup. - // The ID must be unique within the specified backupVault. - // Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A backup resource - Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteBackupRequest deletes a backup. -message DeleteBackupRequest { - // Required. The backup resource name, in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } - ]; -} - -// UpdateBackupRequest updates description and/or labels for a backup. -message UpdateBackupRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Backup resource to be updated. - // 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The backup being updated - Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto deleted file mode 100644 index 4daac312d6c..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_policy.proto +++ /dev/null @@ -1,195 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "BackupPolicyProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// Backup Policy. -message BackupPolicy { - option (google.api.resource) = { - type: "netapp.googleapis.com/BackupPolicy" - pattern: "projects/{project}/locations/{location}/backupPolicies/{backup_policy}" - plural: "backupPolicies" - singular: "backupPolicy" - }; - - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // BackupPolicy is being created. - CREATING = 1; - - // BackupPolicy is available for use. - READY = 2; - - // BackupPolicy is being deleted. - DELETING = 3; - - // BackupPolicy is not valid and cannot be used. - ERROR = 4; - - // BackupPolicy is being updated. - UPDATING = 5; - } - - // Identifier. The resource name of the backup policy. - // Format: - // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Number of daily backups to keep. Note that the minimum daily backup limit - // is 2. - optional int32 daily_backup_limit = 2; - - // Number of weekly backups to keep. Note that the sum of daily, weekly and - // monthly backups should be greater than 1. - optional int32 weekly_backup_limit = 3; - - // Number of monthly backups to keep. Note that the sum of daily, weekly and - // monthly backups should be greater than 1. - optional int32 monthly_backup_limit = 4; - - // Description of the backup policy. - optional string description = 5; - - // If enabled, make backups automatically according to the schedules. - // This will be applied to all volumes that have this policy attached and - // enforced on volume level. If not specified, default is true. - optional bool enabled = 6; - - // Output only. The total number of volumes assigned by this backup policy. - optional int32 assigned_volume_count = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the backup policy was created. - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 9; - - // Output only. The backup policy state. - State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateBackupPolicyRequest creates a backupPolicy. -message CreateBackupPolicyRequest { - // Required. The location to create the backup policies of, in the format - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/BackupPolicy" - } - ]; - - // Required. A backupPolicy resource - BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the backup policy. - // The ID must be unique within the specified location. - // Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string backup_policy_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// GetBackupPolicyRequest gets the state of a backupPolicy. -message GetBackupPolicyRequest { - // Required. The backupPolicy resource name, in the format - // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupPolicy" - } - ]; -} - -// ListBackupPoliciesRequest for requesting multiple backup policies. -message ListBackupPoliciesRequest { - // Required. Parent value for ListBackupPoliciesRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/BackupPolicy" - } - ]; - - // Requested page size. Server may return fewer items than requested. - // If unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results the server should return. - string page_token = 3; - - // Filtering results - string filter = 4; - - // Hint for how to order the results - string order_by = 5; -} - -// ListBackupPoliciesResponse contains all the backup policies requested. -message ListBackupPoliciesResponse { - // The list of backup policies. - repeated BackupPolicy backup_policies = 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; -} - -// UpdateBackupPolicyRequest for updating a backup policy. -message UpdateBackupPolicyRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Backup Policy 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The backup policy being updated - BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteBackupPolicyRequest deletes a backup policy. -message DeleteBackupPolicyRequest { - // Required. The backup policy resource name, in the format - // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupPolicy" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto deleted file mode 100644 index baa4232afee..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/backup_vault.proto +++ /dev/null @@ -1,303 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "BackupVaultProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// A NetApp BackupVault. -message BackupVault { - option (google.api.resource) = { - type: "netapp.googleapis.com/BackupVault" - pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}" - plural: "backupVaults" - singular: "backupVault" - }; - - // Retention policy for backups in the backup vault - message BackupRetentionPolicy { - // Required. Minimum retention duration in days for backups in the backup - // vault. - int32 backup_minimum_enforced_retention_days = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates if the daily backups are immutable. - // At least one of daily_backup_immutable, weekly_backup_immutable, - // monthly_backup_immutable and manual_backup_immutable must be true. - bool daily_backup_immutable = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates if the weekly backups are immutable. - // At least one of daily_backup_immutable, weekly_backup_immutable, - // monthly_backup_immutable and manual_backup_immutable must be true. - bool weekly_backup_immutable = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates if the monthly backups are immutable. - // At least one of daily_backup_immutable, weekly_backup_immutable, - // monthly_backup_immutable and manual_backup_immutable must be true. - bool monthly_backup_immutable = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates if the manual backups are immutable. - // At least one of daily_backup_immutable, weekly_backup_immutable, - // monthly_backup_immutable and manual_backup_immutable must be true. - bool manual_backup_immutable = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // The Backup Vault States - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // BackupVault is being created. - CREATING = 1; - - // BackupVault is available for use. - READY = 2; - - // BackupVault is being deleted. - DELETING = 3; - - // BackupVault is not valid and cannot be used. - ERROR = 4; - - // BackupVault is being updated. - UPDATING = 5; - } - - // Backup Vault Type. - enum BackupVaultType { - // BackupVault type not set. - BACKUP_VAULT_TYPE_UNSPECIFIED = 0; - - // BackupVault type is IN_REGION. - IN_REGION = 1; - - // BackupVault type is CROSS_REGION. - CROSS_REGION = 2; - } - - // Encryption state of customer-managed encryption keys (CMEK) backups. - enum EncryptionState { - // Encryption state not set. - ENCRYPTION_STATE_UNSPECIFIED = 0; - - // Encryption state is pending. - ENCRYPTION_STATE_PENDING = 1; - - // Encryption is complete. - ENCRYPTION_STATE_COMPLETED = 2; - - // Encryption is in progress. - ENCRYPTION_STATE_IN_PROGRESS = 3; - - // Encryption has failed. - ENCRYPTION_STATE_FAILED = 4; - } - - // Identifier. The resource name of the backup vault. - // Format: - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. The backup vault state. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the backup vault. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Description of the backup vault. - string description = 4; - - // Resource labels to represent user provided metadata. - map labels = 5; - - // Optional. Type of backup vault to be created. - // Default is IN_REGION. - BackupVaultType backup_vault_type = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Region in which the backup vault is created. - // Format: `projects/{project_id}/locations/{location}` - string source_region = 7 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Optional. Region where the backups are stored. - // Format: `projects/{project_id}/locations/{location}` - string backup_region = 8 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Output only. Name of the Backup vault created in source region. - // Format: - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - string source_backup_vault = 9 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupVault" - } - ]; - - // Output only. Name of the Backup vault created in backup region. - // Format: - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - string destination_backup_vault = 10 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupVault" - } - ]; - - // Optional. Backup retention policy defining the retention of backups. - BackupRetentionPolicy backup_retention_policy = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the Key Management System (KMS) configuration to be - // used for backup encryption. Format: - // `projects/{project}/locations/{location}/kmsConfigs/{kms_config}` - string kms_config = 12 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; - - // Output only. Field indicating encryption state of CMEK backups. - EncryptionState encryption_state = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The crypto key version used to encrypt the backup vault. - // Format: - // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - string backups_crypto_key_version = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// GetBackupVaultRequest gets the state of a backupVault. -message GetBackupVaultRequest { - // Required. The backupVault resource name, in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupVault" - } - ]; -} - -// ListBackupVaultsRequest lists backupVaults. -message ListBackupVaultsRequest { - // Required. The location for which to retrieve backupVault information, - // in the format - // `projects/{project_id}/locations/{location}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/BackupVault" - } - ]; - - // The maximum number of items to return. - int32 page_size = 2; - - // The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListBackupVaultsResponse is the result of ListBackupVaultsRequest. -message ListBackupVaultsResponse { - // A list of backupVaults in the project for the specified location. - repeated BackupVault backup_vaults = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// CreateBackupVaultRequest creates a backup vault. -message CreateBackupVaultRequest { - // Required. The location to create the backup vaults, in the format - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/BackupVault" - } - ]; - - // Required. The ID to use for the backupVault. - // The ID must be unique within the specified location. - // Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A backupVault resource - BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteBackupVaultRequest deletes a backupVault. -message DeleteBackupVaultRequest { - // Required. The backupVault resource name, in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupVault" - } - ]; -} - -// UpdateBackupVaultRequest updates description and/or labels for a backupVault. -message UpdateBackupVaultRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Backup resource to be updated. - // 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The backupVault being updated - BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto deleted file mode 100644 index 6d4beaa5435..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto +++ /dev/null @@ -1,918 +0,0 @@ -// 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.netapp.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/netapp/v1/active_directory.proto"; -import "google/cloud/netapp/v1/backup.proto"; -import "google/cloud/netapp/v1/backup_policy.proto"; -import "google/cloud/netapp/v1/backup_vault.proto"; -import "google/cloud/netapp/v1/host_group.proto"; -import "google/cloud/netapp/v1/kms.proto"; -import "google/cloud/netapp/v1/ontap.proto"; -import "google/cloud/netapp/v1/quota_rule.proto"; -import "google/cloud/netapp/v1/replication.proto"; -import "google/cloud/netapp/v1/snapshot.proto"; -import "google/cloud/netapp/v1/storage_pool.proto"; -import "google/cloud/netapp/v1/volume.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "CloudNetappServiceProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; -option (google.api.resource_definition) = { - type: "compute.googleapis.com/Network" - pattern: "projects/{project}/global/networks/{network}" -}; - -// NetApp Files Google Cloud Service -service NetApp { - option (google.api.default_host) = "netapp.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Returns descriptions of all storage pools owned by the caller. - rpc ListStoragePools(ListStoragePoolsRequest) - returns (ListStoragePoolsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/storagePools" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a new storage pool. - rpc CreateStoragePool(CreateStoragePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/storagePools" - body: "storage_pool" - }; - option (google.api.method_signature) = - "parent,storage_pool,storage_pool_id"; - option (google.longrunning.operation_info) = { - response_type: "StoragePool" - metadata_type: "OperationMetadata" - }; - } - - // Returns the description of the specified storage pool by poolId. - rpc GetStoragePool(GetStoragePoolRequest) returns (StoragePool) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/storagePools/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the storage pool properties with the full spec - rpc UpdateStoragePool(UpdateStoragePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}" - body: "storage_pool" - }; - option (google.api.method_signature) = "storage_pool,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "StoragePool" - metadata_type: "OperationMetadata" - }; - } - - // Warning! This operation will permanently delete the storage pool. - rpc DeleteStoragePool(DeleteStoragePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/storagePools/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // ValidateDirectoryService does a connectivity check for a directory service - // policy attached to the storage pool. - rpc ValidateDirectoryService(ValidateDirectoryServiceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // This operation will switch the active/replica zone for a regional - // storagePool. - rpc SwitchActiveReplicaZone(SwitchActiveReplicaZoneRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/storagePools/*}:switch" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "StoragePool" - metadata_type: "OperationMetadata" - }; - } - - // Lists Volumes in a given project. - rpc ListVolumes(ListVolumesRequest) returns (ListVolumesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/volumes" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single Volume. - rpc GetVolume(GetVolumeRequest) returns (Volume) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/volumes/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Volume in a given project and location. - rpc CreateVolume(CreateVolumeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/volumes" - body: "volume" - }; - option (google.api.method_signature) = "parent,volume,volume_id"; - option (google.longrunning.operation_info) = { - response_type: "Volume" - metadata_type: "OperationMetadata" - }; - } - - // Updates the parameters of a single Volume. - rpc UpdateVolume(UpdateVolumeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{volume.name=projects/*/locations/*/volumes/*}" - body: "volume" - }; - option (google.api.method_signature) = "volume,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Volume" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single Volume. - rpc DeleteVolume(DeleteVolumeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/volumes/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Revert an existing volume to a specified snapshot. - // Warning! This operation will permanently revert all changes made after the - // snapshot was created. - rpc RevertVolume(RevertVolumeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*}:revert" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Volume" - metadata_type: "OperationMetadata" - }; - } - - // Establish volume peering. This is used to establish cluster and svm - // peerings between the GCNV and OnPrem clusters. - rpc EstablishVolumePeering(EstablishVolumePeeringRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Volume" - metadata_type: "OperationMetadata" - }; - } - - // Returns descriptions of all snapshots for a volume. - rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" - }; - option (google.api.method_signature) = "parent"; - } - - // Describe a snapshot for a volume. - rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Create a new snapshot for a volume. - rpc CreateSnapshot(CreateSnapshotRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" - body: "snapshot" - }; - option (google.api.method_signature) = "parent,snapshot,snapshot_id"; - option (google.longrunning.operation_info) = { - response_type: "Snapshot" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a snapshot. - rpc DeleteSnapshot(DeleteSnapshotRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Updates the settings of a specific snapshot. - rpc UpdateSnapshot(UpdateSnapshotRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}" - body: "snapshot" - }; - option (google.api.method_signature) = "snapshot,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Snapshot" - metadata_type: "OperationMetadata" - }; - } - - // Lists active directories. - rpc ListActiveDirectories(ListActiveDirectoriesRequest) - returns (ListActiveDirectoriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/activeDirectories" - }; - option (google.api.method_signature) = "parent"; - } - - // Describes a specified active directory. - rpc GetActiveDirectory(GetActiveDirectoryRequest) returns (ActiveDirectory) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/activeDirectories/*}" - }; - option (google.api.method_signature) = "name"; - } - - // CreateActiveDirectory - // Creates the active directory specified in the request. - rpc CreateActiveDirectory(CreateActiveDirectoryRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/activeDirectories" - body: "active_directory" - }; - option (google.api.method_signature) = - "parent,active_directory,active_directory_id"; - option (google.longrunning.operation_info) = { - response_type: "ActiveDirectory" - metadata_type: "OperationMetadata" - }; - } - - // Update the parameters of an active directories. - rpc UpdateActiveDirectory(UpdateActiveDirectoryRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}" - body: "active_directory" - }; - option (google.api.method_signature) = "active_directory,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "ActiveDirectory" - metadata_type: "OperationMetadata" - }; - } - - // Delete the active directory specified in the request. - rpc DeleteActiveDirectory(DeleteActiveDirectoryRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/activeDirectories/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns descriptions of all KMS configs owned by the caller. - rpc ListKmsConfigs(ListKmsConfigsRequest) returns (ListKmsConfigsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/kmsConfigs" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a new KMS config. - rpc CreateKmsConfig(CreateKmsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/kmsConfigs" - body: "kms_config" - }; - option (google.api.method_signature) = "parent,kms_config,kms_config_id"; - option (google.longrunning.operation_info) = { - response_type: "KmsConfig" - metadata_type: "OperationMetadata" - }; - } - - // Returns the description of the specified KMS config by kms_config_id. - rpc GetKmsConfig(GetKmsConfigRequest) returns (KmsConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the Kms config properties with the full spec - rpc UpdateKmsConfig(UpdateKmsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}" - body: "kms_config" - }; - option (google.api.method_signature) = "kms_config,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "KmsConfig" - metadata_type: "OperationMetadata" - }; - } - - // Encrypt the existing volumes without CMEK encryption with the desired the - // KMS config for the whole region. - rpc EncryptVolumes(EncryptVolumesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "KmsConfig" - metadata_type: "OperationMetadata" - }; - } - - // Verifies KMS config reachability. - rpc VerifyKmsConfig(VerifyKmsConfigRequest) - returns (VerifyKmsConfigResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify" - body: "*" - }; - } - - // Warning! This operation will permanently delete the Kms config. - rpc DeleteKmsConfig(DeleteKmsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/kmsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns descriptions of all replications for a volume. - rpc ListReplications(ListReplicationsRequest) - returns (ListReplicationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" - }; - option (google.api.method_signature) = "parent"; - } - - // Describe a replication for a volume. - rpc GetReplication(GetReplicationRequest) returns (Replication) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Create a new replication for a volume. - rpc CreateReplication(CreateReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/volumes/*}/replications" - body: "replication" - }; - option (google.api.method_signature) = "parent,replication,replication_id"; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a replication. - rpc DeleteReplication(DeleteReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Updates the settings of a specific replication. - rpc UpdateReplication(UpdateReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}" - body: "replication" - }; - option (google.api.method_signature) = "replication,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Stop Cross Region Replication. - rpc StopReplication(StopReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Resume Cross Region Replication. - rpc ResumeReplication(ResumeReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Reverses direction of replication. Source becomes destination and - // destination becomes source. - rpc ReverseReplicationDirection(ReverseReplicationDirectionRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Establish replication peering. - rpc EstablishPeering(EstablishPeeringRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Syncs the replication. This will invoke one time volume data transfer from - // source to destination. - rpc SyncReplication(SyncReplicationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Replication" - metadata_type: "OperationMetadata" - }; - } - - // Creates new backup vault - rpc CreateBackupVault(CreateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{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" - }; - } - - // Returns the description of the specified backup vault - rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns list of all available backup vaults. - rpc ListBackupVaults(ListBackupVaultsRequest) - returns (ListBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates the settings of a specific backup vault. - rpc UpdateBackupVault(UpdateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{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" - }; - } - - // Warning! This operation will permanently delete the backup vault. - rpc DeleteBackupVault(DeleteBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Creates a backup from the volume specified in the request - // The backup can be created from the given snapshot if specified in the - // request. If no snapshot specified, there'll be a new snapshot taken to - // initiate the backup creation. - rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" - body: "backup" - }; - option (google.api.method_signature) = "parent,backup,backup_id"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Returns the description of the specified backup - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns descriptions of all backups for a backupVault. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Warning! This operation will permanently delete the backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Update backup with full spec. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Creates new backup policy - rpc CreateBackupPolicy(CreateBackupPolicyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPolicies" - body: "backup_policy" - }; - option (google.api.method_signature) = - "parent,backup_policy,backup_policy_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPolicy" - metadata_type: "OperationMetadata" - }; - } - - // Returns the description of the specified backup policy by backup_policy_id. - rpc GetBackupPolicy(GetBackupPolicyRequest) returns (BackupPolicy) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPolicies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns list of all available backup policies. - rpc ListBackupPolicies(ListBackupPoliciesRequest) - returns (ListBackupPoliciesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPolicies" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates settings of a specific backup policy. - rpc UpdateBackupPolicy(UpdateBackupPolicyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}" - body: "backup_policy" - }; - option (google.api.method_signature) = "backup_policy,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "BackupPolicy" - metadata_type: "OperationMetadata" - }; - } - - // Warning! This operation will permanently delete the backup policy. - rpc DeleteBackupPolicy(DeleteBackupPolicyRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPolicies/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns list of all quota rules in a location. - rpc ListQuotaRules(ListQuotaRulesRequest) returns (ListQuotaRulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns details of the specified quota rule. - rpc GetQuotaRule(GetQuotaRuleRequest) returns (QuotaRule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new quota rule. - rpc CreateQuotaRule(CreateQuotaRuleRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" - body: "quota_rule" - }; - option (google.api.method_signature) = "parent,quota_rule,quota_rule_id"; - option (google.longrunning.operation_info) = { - response_type: "QuotaRule" - metadata_type: "OperationMetadata" - }; - } - - // Updates a quota rule. - rpc UpdateQuotaRule(UpdateQuotaRuleRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}" - body: "quota_rule" - }; - option (google.api.method_signature) = "quota_rule,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "QuotaRule" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a quota rule. - rpc DeleteQuotaRule(DeleteQuotaRuleRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Restore files from a backup to a volume. - rpc RestoreBackupFiles(RestoreBackupFilesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/volumes/*}:restore" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "RestoreBackupFilesResponse" - metadata_type: "OperationMetadata" - }; - } - - // Returns a list of host groups in a `location`. Use `-` as location to list - // host groups across all locations. - rpc ListHostGroups(ListHostGroupsRequest) returns (ListHostGroupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/hostGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Returns details of the specified host group. - rpc GetHostGroup(GetHostGroupRequest) returns (HostGroup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/hostGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new host group. - rpc CreateHostGroup(CreateHostGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/hostGroups" - body: "host_group" - }; - option (google.api.method_signature) = "parent,host_group,host_group_id"; - option (google.longrunning.operation_info) = { - response_type: "HostGroup" - metadata_type: "OperationMetadata" - }; - } - - // Updates an existing host group. - rpc UpdateHostGroup(UpdateHostGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}" - body: "host_group" - }; - option (google.api.method_signature) = "host_group,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "HostGroup" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a host group. - rpc DeleteHostGroup(DeleteHostGroupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/hostGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // `ExecuteOntapPost` dispatches the ONTAP `POST` request to the - // `StoragePool` cluster. - rpc ExecuteOntapPost(ExecuteOntapPostRequest) - returns (ExecuteOntapPostResponse) { - option (google.api.http) = { - post: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - body: "*" - }; - } - - // `ExecuteOntapGet` dispatches the ONTAP `GET` request to the - // `StoragePool` cluster. - rpc ExecuteOntapGet(ExecuteOntapGetRequest) - returns (ExecuteOntapGetResponse) { - option (google.api.http) = { - get: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - }; - } - - // `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the - // `StoragePool` cluster. - rpc ExecuteOntapDelete(ExecuteOntapDeleteRequest) - returns (ExecuteOntapDeleteResponse) { - option (google.api.http) = { - delete: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - }; - } - - // `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the - // `StoragePool` cluster. - rpc ExecuteOntapPatch(ExecuteOntapPatchRequest) - returns (ExecuteOntapPatchResponse) { - option (google.api.http) = { - patch: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - body: "*" - }; - } -} - -// 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 been canceled successfully - // have [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]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto deleted file mode 100644 index 789ad87e8be..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto +++ /dev/null @@ -1,158 +0,0 @@ -// 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.netapp.v1; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "CommonProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// The service level of a storage pool and its volumes. -enum ServiceLevel { - // Unspecified service level. - SERVICE_LEVEL_UNSPECIFIED = 0; - - // Premium service level. - PREMIUM = 1; - - // Extreme service level. - EXTREME = 2; - - // Standard service level. - STANDARD = 3; - - // Flex service level. - FLEX = 4; -} - -// Flex Storage Pool performance. -enum FlexPerformance { - // Unspecified flex performance. - FLEX_PERFORMANCE_UNSPECIFIED = 0; - - // Flex Storage Pool with default performance. - FLEX_PERFORMANCE_DEFAULT = 1; - - // Flex Storage Pool with custom performance. - FLEX_PERFORMANCE_CUSTOM = 2; -} - -// The volume encryption key source. -enum EncryptionType { - // The source of the encryption key is not specified. - ENCRYPTION_TYPE_UNSPECIFIED = 0; - - // Google managed encryption key. - SERVICE_MANAGED = 1; - - // Customer managed encryption key, which is stored in KMS. - CLOUD_KMS = 2; -} - -// Type of directory service -enum DirectoryServiceType { - // Directory service type is not specified. - DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0; - - // Active directory policy attached to the storage pool. - ACTIVE_DIRECTORY = 1; -} - -// Type of storage pool -enum StoragePoolType { - // Storage pool type is not specified. - STORAGE_POOL_TYPE_UNSPECIFIED = 0; - - // Storage pool type is file. - FILE = 1; - - // Storage pool type is unified. - UNIFIED = 2; -} - -// Schedule for Hybrid Replication. -// New enum values may be added in future to support different frequency of -// replication. -enum HybridReplicationSchedule { - // Unspecified HybridReplicationSchedule - HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED = 0; - - // Replication happens once every 10 minutes. - EVERY_10_MINUTES = 1; - - // Replication happens once every hour. - HOURLY = 2; - - // Replication happens once every day. - DAILY = 3; -} - -// QoS (Quality of Service) Types of the storage pool -enum QosType { - // Unspecified QoS Type - QOS_TYPE_UNSPECIFIED = 0; - - // QoS Type is Auto - AUTO = 1; - - // QoS Type is Manual - MANUAL = 2; -} - -// OS types for the host group -enum OsType { - // Unspecified OS Type - OS_TYPE_UNSPECIFIED = 0; - - // OS Type is Linux - LINUX = 1; - - // OS Type is Windows - WINDOWS = 2; - - // OS Type is VMware ESXi - ESXI = 3; -} - -// Metadata for a given -// [google.cloud.location.Location][google.cloud.location.Location]. -message LocationMetadata { - // Output only. Supported service levels in a location. - repeated ServiceLevel supported_service_levels = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Supported flex performance in a location. - repeated FlexPerformance supported_flex_performance = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates if the location has VCP support. - bool has_vcp = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates if the location has ONTAP Proxy support. - bool has_ontap_proxy = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// UserCommands contains the commands to be executed by the customer. -message UserCommands { - // Output only. List of commands to be executed by the customer. - repeated string commands = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto deleted file mode 100644 index 1404cc68152..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/host_group.proto +++ /dev/null @@ -1,197 +0,0 @@ -// 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.netapp.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/netapp/v1/common.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "HostGroupProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// ListHostGroupsRequest for listing host groups. -message ListHostGroupsRequest { - // Required. Parent value for ListHostGroupsRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/HostGroup" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, the 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. Filter to apply to the request. - 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]; -} - -// ListHostGroupsResponse is the response to a ListHostGroupsRequest. -message ListHostGroupsResponse { - // The list of host groups. - repeated HostGroup host_groups = 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; -} - -// GetHostGroupRequest for getting a host group. -message GetHostGroupRequest { - // Required. The resource name of the host group. - // Format: - // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/HostGroup" - } - ]; -} - -// CreateHostGroupRequest for creating a host group. -message CreateHostGroupRequest { - // Required. Parent value for CreateHostGroupRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/HostGroup" - } - ]; - - // Required. Fields of the host group to create. - HostGroup host_group = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the host group to create. Must be unique within the parent - // resource. Must contain only letters, numbers, and hyphen, with - // the first character a letter or underscore, the last a letter or underscore - // or a number, and a 63 character maximum. - string host_group_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// UpdateHostGroupRequest for updating a host group. -message UpdateHostGroupRequest { - // Required. The host group to update. - // The host group's `name` field is used to identify the host group. - // Format: - // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - HostGroup host_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The list of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// DeleteHostGroupRequest for deleting a single host group. -message DeleteHostGroupRequest { - // Required. The resource name of the host group. - // Format: - // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/HostGroup" - } - ]; -} - -// Host group is a collection of hosts that can be used for accessing a Block -// Volume. -message HostGroup { - option (google.api.resource) = { - type: "netapp.googleapis.com/HostGroup" - pattern: "projects/{project}/locations/{location}/hostGroups/{host_group}" - plural: "hostGroups" - singular: "hostGroup" - }; - - // Types of host group. - enum Type { - // Unspecified type for host group. - TYPE_UNSPECIFIED = 0; - - // iSCSI initiator host group. - ISCSI_INITIATOR = 1; - } - - // Host group states. - enum State { - // Unspecified state for host group. - STATE_UNSPECIFIED = 0; - - // Host group is creating. - CREATING = 1; - - // Host group is ready. - READY = 2; - - // Host group is updating. - UPDATING = 3; - - // Host group is deleting. - DELETING = 4; - - // Host group is disabled. - DISABLED = 5; - } - - // Identifier. The resource name of the host group. - // Format: - // `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. Type of the host group. - Type type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. State of the host group. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the host group. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The list of hosts associated with the host group. - repeated string hosts = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The OS type of the host group. It indicates the type of operating - // system used by all of the hosts in the HostGroup. All hosts in a HostGroup - // must be of the same OS type. This can be set only when creating a - // HostGroup. - OsType os_type = 6 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the host group. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels of the host group. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto deleted file mode 100644 index 05572278de4..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/kms.proto +++ /dev/null @@ -1,246 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "KmsProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; -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}" -}; - -// GetKmsConfigRequest gets a KMS Config. -message GetKmsConfigRequest { - // Required. Name of the KmsConfig - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; -} - -// ListKmsConfigsRequest lists KMS Configs. -message ListKmsConfigsRequest { - // Required. Parent value - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/KmsConfig" - } - ]; - - // The maximum number of items to return. - int32 page_size = 2; - - // The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListKmsConfigsResponse is the response to a ListKmsConfigsRequest. -message ListKmsConfigsResponse { - // The list of KmsConfigs - repeated KmsConfig kms_configs = 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; -} - -// CreateKmsConfigRequest creates a KMS Config. -message CreateKmsConfigRequest { - // Required. Value for parent. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/KmsConfig" - } - ]; - - // Required. Id of the requesting KmsConfig. Must be unique within the parent - // resource. Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string kms_config_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The required parameters to create a new KmsConfig. - KmsConfig kms_config = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// UpdateKmsConfigRequest updates a KMS Config. -message UpdateKmsConfigRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // KmsConfig 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The KmsConfig being updated - KmsConfig kms_config = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteKmsConfigRequest deletes a KMS Config. -message DeleteKmsConfigRequest { - // Required. Name of the KmsConfig. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; -} - -// EncryptVolumesRequest specifies the KMS config to encrypt existing volumes. -message EncryptVolumesRequest { - // Required. Name of the KmsConfig. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; -} - -// VerifyKmsConfigRequest specifies the KMS config to be validated. -message VerifyKmsConfigRequest { - // Required. Name of the KMS Config to be verified. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; -} - -// VerifyKmsConfigResponse contains the information if the config is correctly -// and error message. -message VerifyKmsConfigResponse { - // Output only. If the customer key configured correctly to the encrypt - // volume. - bool healthy = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error message if config is not healthy. - string health_error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Instructions for the customers to provide the access to the - // encryption key. - string instructions = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// KmsConfig is the customer-managed encryption key(CMEK) configuration. -message KmsConfig { - option (google.api.resource) = { - type: "netapp.googleapis.com/KmsConfig" - pattern: "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" - plural: "kmsConfigs" - singular: "kmsConfig" - }; - - // The KmsConfig States - enum State { - // Unspecified KmsConfig State - STATE_UNSPECIFIED = 0; - - // KmsConfig State is Ready - READY = 1; - - // KmsConfig State is Creating - CREATING = 2; - - // KmsConfig State is Deleting - DELETING = 3; - - // KmsConfig State is Updating - UPDATING = 4; - - // KmsConfig State is In Use. - IN_USE = 5; - - // KmsConfig State is Error - ERROR = 6; - - // KmsConfig State is Pending to verify crypto key access. - KEY_CHECK_PENDING = 7; - - // KmsConfig State is Not accessbile by the SDE service account to the - // crypto key. - KEY_NOT_REACHABLE = 8; - - // KmsConfig State is Disabling. - DISABLING = 9; - - // KmsConfig State is Disabled. - DISABLED = 10; - - // KmsConfig State is Migrating. - // The existing volumes are migrating from SMEK to CMEK. - MIGRATING = 11; - } - - // Identifier. Name of the KmsConfig. - // Format: `projects/{project}/locations/{location}/kmsConfigs/{kms_config}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. Customer-managed crypto key resource full name. Format: - // `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. State of the KmsConfig. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the KmsConfig. - string state_details = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the KmsConfig. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Description of the KmsConfig. - string description = 6; - - // Labels as key value pairs - map labels = 7; - - // Output only. Instructions to provide the access to the customer provided - // encryption key. - string instructions = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The Service account which will have access to the customer - // provided encryption key. - string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto deleted file mode 100644 index 6bdaef7a7c1..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/quota_rule.proto +++ /dev/null @@ -1,203 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "QuotaRuleProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// ListQuotaRulesRequest for listing quota rules. -message ListQuotaRulesRequest { - // Required. Parent value for ListQuotaRulesRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/QuotaRule" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, the 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]; -} - -// ListQuotaRulesResponse is the response to a ListQuotaRulesRequest. -message ListQuotaRulesResponse { - // List of quota rules - repeated QuotaRule quota_rules = 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; -} - -// GetQuotaRuleRequest for getting a quota rule. -message GetQuotaRuleRequest { - // Required. Name of the quota rule - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/QuotaRule" - } - ]; -} - -// CreateQuotaRuleRequest for creating a quota rule. -message CreateQuotaRuleRequest { - // Required. Parent value for CreateQuotaRuleRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/QuotaRule" - } - ]; - - // Required. Fields of the to be created quota rule. - QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the quota rule to create. Must be unique within the parent - // resource. Must contain only letters, numbers, underscore and hyphen, with - // the first character a letter or underscore, the last a letter or underscore - // or a number, and a 63 character maximum. - string quota_rule_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// UpdateQuotaRuleRequest for updating a quota rule. -message UpdateQuotaRuleRequest { - // Optional. Field mask is used to specify the fields to be overwritten in the - // Quota Rule 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 = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The quota rule being updated - QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteQuotaRuleRequest for deleting a single quota rule. -message DeleteQuotaRuleRequest { - // Required. Name of the quota rule. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/QuotaRule" - } - ]; -} - -// QuotaRule specifies the maximum disk space a user or group can use within a -// volume. They can be used for creating default and individual quota rules. -message QuotaRule { - option (google.api.resource) = { - type: "netapp.googleapis.com/QuotaRule" - pattern: "projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}" - plural: "quotaRules" - singular: "quotaRule" - }; - - // Types of Quota Rule - enum Type { - // Unspecified type for quota rule - TYPE_UNSPECIFIED = 0; - - // Individual user quota rule - INDIVIDUAL_USER_QUOTA = 1; - - // Individual group quota rule - INDIVIDUAL_GROUP_QUOTA = 2; - - // Default user quota rule - DEFAULT_USER_QUOTA = 3; - - // Default group quota rule - DEFAULT_GROUP_QUOTA = 4; - } - - // Quota Rule states - enum State { - // Unspecified state for quota rule - STATE_UNSPECIFIED = 0; - - // Quota rule is creating - CREATING = 1; - - // Quota rule is updating - UPDATING = 2; - - // Quota rule is deleting - DELETING = 3; - - // Quota rule is ready - READY = 4; - - // Quota rule is in error state. - ERROR = 5; - } - - // Identifier. The resource name of the quota rule. - // Format: - // `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The quota rule applies to the specified user or group, identified - // by a Unix UID/GID, Windows SID, or null for default. - string target = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The type of quota rule. - Type type = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The maximum allowed disk space in MiB. - int32 disk_limit_mib = 4 [(google.api.field_behavior) = REQUIRED]; - - // Output only. State of the quota rule - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the quota rule - string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the quota rule - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the quota rule - string description = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels of the quota rule - map labels = 10 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto deleted file mode 100644 index ca5995e4a51..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/replication.proto +++ /dev/null @@ -1,509 +0,0 @@ -// 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.netapp.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/netapp/v1/common.proto"; -import "google/cloud/netapp/v1/volume.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "ReplicationProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// TransferStats reports all statistics related to replication transfer. -message TransferStats { - // Cumulative bytes transferred so far for the replication relationship. - optional int64 transfer_bytes = 1; - - // Cumulative time taken across all transfers for the replication - // relationship. - optional google.protobuf.Duration total_transfer_duration = 2; - - // Last transfer size in bytes. - optional int64 last_transfer_bytes = 3; - - // Time taken during last transfer. - optional google.protobuf.Duration last_transfer_duration = 4; - - // Lag duration indicates the duration by which Destination region volume - // content lags behind the primary region volume content. - optional google.protobuf.Duration lag_duration = 5; - - // Time when progress was updated last. - optional google.protobuf.Timestamp update_time = 6; - - // Time when last transfer completed. - optional google.protobuf.Timestamp last_transfer_end_time = 7; - - // A message describing the cause of the last transfer failure. - optional string last_transfer_error = 8; -} - -// Replication is a nested resource under Volume, that describes a -// cross-region replication relationship between 2 volumes in different -// regions. -message Replication { - option (google.api.resource) = { - type: "netapp.googleapis.com/Replication" - pattern: "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" - plural: "replications" - singular: "replication" - }; - - // The replication states - // New enum values may be added in future to indicate possible new states. - enum State { - // Unspecified replication State - STATE_UNSPECIFIED = 0; - - // Replication is creating. - CREATING = 1; - - // Replication is ready. - READY = 2; - - // Replication is updating. - UPDATING = 3; - - // Replication is deleting. - DELETING = 5; - - // Replication is in error state. - ERROR = 6; - - // Replication is waiting for cluster peering to be established. - PENDING_CLUSTER_PEERING = 8; - - // Replication is waiting for SVM peering to be established. - PENDING_SVM_PEERING = 9; - - // Replication is waiting for Commands to be executed on Onprem ONTAP. - PENDING_REMOTE_RESYNC = 10; - - // Onprem ONTAP is destination and Replication can only be managed from - // Onprem. - EXTERNALLY_MANAGED_REPLICATION = 11; - } - - // New enum values may be added in future to support different replication - // topology. - enum ReplicationRole { - // Unspecified replication role - REPLICATION_ROLE_UNSPECIFIED = 0; - - // Indicates Source volume. - SOURCE = 1; - - // Indicates Destination volume. - DESTINATION = 2; - } - - // Schedule for Replication. - // New enum values may be added in future to support different frequency of - // replication. - enum ReplicationSchedule { - // Unspecified ReplicationSchedule - REPLICATION_SCHEDULE_UNSPECIFIED = 0; - - // Replication happens once every 10 minutes. - EVERY_10_MINUTES = 1; - - // Replication happens once every hour. - HOURLY = 2; - - // Replication happens once every day. - DAILY = 3; - } - - // Mirroring states. - // No new value is expected to be added in future. - enum MirrorState { - // Unspecified MirrorState - MIRROR_STATE_UNSPECIFIED = 0; - - // Destination volume is being prepared. - PREPARING = 1; - - // Destination volume has been initialized and is ready to receive - // replication transfers. - MIRRORED = 2; - - // Destination volume is not receiving replication transfers. - STOPPED = 3; - - // Incremental replication is in progress. - TRANSFERRING = 4; - - // Baseline replication is in progress. - BASELINE_TRANSFERRING = 5; - - // Replication is aborted. - ABORTED = 6; - - // Replication is being managed from Onprem ONTAP. - EXTERNALLY_MANAGED = 7; - - // Peering is yet to be established. - PENDING_PEERING = 8; - } - - // Hybrid replication type. - enum HybridReplicationType { - // Unspecified hybrid replication type. - HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; - - // Hybrid replication type for migration. - MIGRATION = 1; - - // Hybrid replication type for continuous replication. - CONTINUOUS_REPLICATION = 2; - - // New field for reversible OnPrem replication, to be used for data - // protection. - ONPREM_REPLICATION = 3; - - // Hybrid replication type for incremental Transfer in the reverse direction - // (GCNV is source and Onprem is destination) - REVERSE_ONPREM_REPLICATION = 4; - } - - // Identifier. The resource name of the Replication. - // Format: - // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. State of the replication. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the replication. - string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates whether this points to source or destination. - ReplicationRole role = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Indicates the schedule for replication. - ReplicationSchedule replication_schedule = 5 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. Indicates the state of mirroring. - MirrorState mirror_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Condition of the relationship. Can be one of the following: - // - true: The replication relationship is healthy. It has not missed the most - // recent scheduled transfer. - // - false: The replication relationship is not healthy. It has missed the - // most recent scheduled transfer. - optional bool healthy = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Replication create time. - google.protobuf.Timestamp create_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Full name of destination volume resource. - // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - string destination_volume = 10 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Output only. Replication transfer statistics. - TransferStats transfer_stats = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 12; - - // A description about this replication relationship. - optional string description = 13; - - // Required. Input only. Destination volume parameters - DestinationVolumeParameters destination_volume_parameters = 14 [ - (google.api.field_behavior) = INPUT_ONLY, - (google.api.field_behavior) = REQUIRED - ]; - - // Output only. Full name of source volume resource. - // Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - string source_volume = 15 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Output only. Hybrid peering details. - HybridPeeringDetails hybrid_peering_details = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Location of the user cluster. - string cluster_location = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Type of the hybrid replication. - HybridReplicationType hybrid_replication_type = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Copy pastable snapmirror commands to be executed on onprem - // cluster by the customer. - UserCommands hybrid_replication_user_commands = 20 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// HybridPeeringDetails contains details about the hybrid peering. -message HybridPeeringDetails { - // Output only. IP address of the subnet. - string subnet_ip = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Copy-paste-able commands to be used on user's ONTAP to accept - // peering requests. - string command = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Expiration time for the peering command to be executed on - // user's ONTAP. - google.protobuf.Timestamp command_expiry_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Temporary passphrase generated to accept cluster peering - // command. - string passphrase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the user's local source volume to be peered with the - // destination volume. - string peer_volume_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the user's local source cluster to be peered with the - // destination cluster. - string peer_cluster_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the user's local source vserver svm to be peered with - // the destination vserver svm. - string peer_svm_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ListReplications lists replications. -message ListReplicationsRequest { - // Required. The volume for which to retrieve replication information, - // in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Replication" - } - ]; - - // The maximum number of items to return. - int32 page_size = 2; - - // The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListReplicationsResponse is the result of ListReplicationsRequest. -message ListReplicationsResponse { - // A list of replications in the project for the specified volume. - repeated Replication replications = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// GetReplicationRequest gets the state of a replication. -message GetReplicationRequest { - // Required. The replication resource name, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; -} - -// DestinationVolumeParameters specify input parameters used for creating -// destination volume. -message DestinationVolumeParameters { - // Required. Existing destination StoragePool name. - string storage_pool = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; - - // Desired destination volume resource id. If not specified, source volume's - // resource id will be used. - // This value must start with a lowercase letter followed by up to 62 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string volume_id = 2; - - // Destination volume's share name. If not specified, source volume's share - // name will be used. - string share_name = 3; - - // Description for the destination volume. - optional string description = 4; - - // Optional. Tiering policy for the volume. - optional TieringPolicy tiering_policy = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// CreateReplicationRequest creates a replication. -message CreateReplicationRequest { - // Required. The NetApp volume to create the replications of, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Replication" - } - ]; - - // Required. A replication resource - Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the replication to create. Must be unique within the parent - // resource. Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string replication_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteReplicationRequest deletes a replication. -message DeleteReplicationRequest { - // Required. The replication resource name, in the format - // `projects/*/locations/*/volumes/*/replications/{replication_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; -} - -// UpdateReplicationRequest updates description and/or labels for a replication. -message UpdateReplicationRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. A replication resource - Replication replication = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// StopReplicationRequest stops a replication until resumed. -message StopReplicationRequest { - // Required. The resource name of the replication, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; - - // Indicates whether to stop replication forcefully while data transfer is in - // progress. - // Warning! if force is true, this will abort any current transfers - // and can lead to data loss due to partial transfer. - // If force is false, stop replication will fail while data transfer is in - // progress and you will need to retry later. - bool force = 2; -} - -// ResumeReplicationRequest resumes a stopped replication. -message ResumeReplicationRequest { - // Required. The resource name of the replication, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; -} - -// ReverseReplicationDirectionRequest reverses direction of replication. Source -// becomes destination and destination becomes source. -message ReverseReplicationDirectionRequest { - // Required. The resource name of the replication, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; -} - -// EstablishPeeringRequest establishes cluster and svm peerings between the -// source and the destination replications. -message EstablishPeeringRequest { - // Required. The resource name of the replication, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; - - // Required. Name of the user's local source cluster to be peered with the - // destination cluster. - string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the user's local source vserver svm to be peered with the - // destination vserver svm. - string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. List of IPv4 ip addresses to be used for peering. - repeated string peer_ip_addresses = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. Name of the user's local source volume to be peered with the - // destination volume. - string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// SyncReplicationRequest syncs the replication from source to destination. -message SyncReplicationRequest { - // Required. The resource name of the replication, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto deleted file mode 100644 index c84d780e987..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/snapshot.proto +++ /dev/null @@ -1,180 +0,0 @@ -// 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.netapp.v1; - -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.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "SnapshotProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// ListSnapshotsRequest lists snapshots. -message ListSnapshotsRequest { - // Required. The volume for which to retrieve snapshot information, - // in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Snapshot" - } - ]; - - // The maximum number of items to return. - int32 page_size = 2; - - // The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3; - - // Sort results. Supported values are "name", "name desc" or "" (unsorted). - string order_by = 4; - - // List filter. - string filter = 5; -} - -// ListSnapshotsResponse is the result of ListSnapshotsRequest. -message ListSnapshotsResponse { - // A list of snapshots in the project for the specified volume. - repeated Snapshot snapshots = 1; - - // The token you can use to retrieve the next page of results. Not returned - // if there are no more results in the list. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// GetSnapshotRequest gets the state of a snapshot. -message GetSnapshotRequest { - // Required. The snapshot resource name, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } - ]; -} - -// CreateSnapshotRequest creates a snapshot. -message CreateSnapshotRequest { - // Required. The NetApp volume to create the snapshots of, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Snapshot" - } - ]; - - // Required. A snapshot resource - Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the snapshot to create. Must be unique within the parent - // resource. Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a - // number, and a 63 character maximum. - string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteSnapshotRequest deletes a snapshot. -message DeleteSnapshotRequest { - // Required. The snapshot resource name, in the format - // `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } - ]; -} - -// UpdateSnapshotRequest updates description and/or labels for a snapshot. -message UpdateSnapshotRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. A snapshot resource - Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Snapshot is a point-in-time version of a Volume's content. -message Snapshot { - option (google.api.resource) = { - type: "netapp.googleapis.com/Snapshot" - pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" - plural: "snapshots" - singular: "snapshot" - }; - - // The Snapshot States - enum State { - // Unspecified Snapshot State - STATE_UNSPECIFIED = 0; - - // Snapshot State is Ready - READY = 1; - - // Snapshot State is Creating - CREATING = 2; - - // Snapshot State is Deleting - DELETING = 3; - - // Snapshot State is Updating - UPDATING = 4; - - // Snapshot State is Disabled - DISABLED = 5; - - // Snapshot State is Error - ERROR = 6; - } - - // Identifier. The resource name of the snapshot. - // Format: - // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. The snapshot state. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the storage pool - string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A description of the snapshot with 2048 characters or less. - // Requests with longer descriptions will be rejected. - string description = 4; - - // Output only. Current storage usage for the snapshot in bytes. - double used_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the snapshot was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user provided metadata. - map labels = 7; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto deleted file mode 100644 index 7bbca2f7588..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto +++ /dev/null @@ -1,341 +0,0 @@ -// 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.netapp.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/netapp/v1/common.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "StoragePoolProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// `Mode` of the storage pool or volume. This field is used to control whether -// the resource is managed by the GCNV APIs or the GCNV ONTAP Mode APIs. -enum Mode { - // The `Mode` is not specified. - MODE_UNSPECIFIED = 0; - - // The resource is managed by the GCNV APIs. - DEFAULT = 1; - - // The resource is managed by the GCNV ONTAP Mode APIs. - ONTAP = 2; -} - -// GetStoragePoolRequest gets a Storage Pool. -message GetStoragePoolRequest { - // Required. Name of the storage pool - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; -} - -// ListStoragePoolsRequest lists Storage Pools. -message ListStoragePoolsRequest { - // Required. Parent value - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/StoragePool" - } - ]; - - // Optional. The maximum number of items to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value to use if there are additional - // results to retrieve for this list request. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Sort results. Supported values are "name", "name desc" or "" - // (unsorted). - string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. List filter. - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// ListStoragePoolsResponse is the response to a ListStoragePoolsRequest. -message ListStoragePoolsResponse { - // The list of StoragePools - repeated StoragePool storage_pools = 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; -} - -// CreateStoragePoolRequest creates a Storage Pool. -message CreateStoragePoolRequest { - // Required. Value for parent. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/StoragePool" - } - ]; - - // Required. Id of the requesting storage pool. Must be unique within the - // parent resource. Must contain only letters, numbers and hyphen, with the - // first character a letter, the last a letter or a number, and a 63 character - // maximum. - string storage_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The required parameters to create a new storage pool. - StoragePool storage_pool = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// UpdateStoragePoolRequest updates a Storage Pool. -message UpdateStoragePoolRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // StoragePool 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The pool being updated - StoragePool storage_pool = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// DeleteStoragePoolRequest deletes a Storage Pool. -message DeleteStoragePoolRequest { - // Required. Name of the storage pool - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; -} - -// SwitchActiveReplicaZoneRequest switch the active/replica zone for a regional -// storagePool. -message SwitchActiveReplicaZoneRequest { - // Required. Name of the storage pool - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; -} - -// StoragePool is a container for volumes with a service level and capacity. -// Volumes can be created in a pool of sufficient available capacity. -// StoragePool capacity is what you are billed for. -message StoragePool { - option (google.api.resource) = { - type: "netapp.googleapis.com/StoragePool" - pattern: "projects/{project}/locations/{location}/storagePools/{storage_pool}" - plural: "storagePools" - singular: "storagePool" - }; - - // The Storage Pool States - enum State { - // Unspecified Storage Pool State - STATE_UNSPECIFIED = 0; - - // Storage Pool State is Ready - READY = 1; - - // Storage Pool State is Creating - CREATING = 2; - - // Storage Pool State is Deleting - DELETING = 3; - - // Storage Pool State is Updating - UPDATING = 4; - - // Storage Pool State is Restoring - RESTORING = 5; - - // Storage Pool State is Disabled - DISABLED = 6; - - // Storage Pool State is Error - ERROR = 7; - } - - // Identifier. Name of the storage pool - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Required. Service level of the storage pool - ServiceLevel service_level = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Capacity in GIB of the pool - int64 capacity_gib = 3 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Allocated size of all volumes in GIB in the storage pool - int64 volume_capacity_gib = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Volume count of the storage pool - int32 volume_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State of the storage pool - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the storage pool - string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the storage pool - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the storage pool - string description = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels as key value pairs - map labels = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Required. VPC Network name. - // Format: projects/{project}/global/networks/{network} - string network = 11 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } - ]; - - // Optional. Specifies the Active Directory to be used for creating a SMB - // volume. - string active_directory = 12 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/ActiveDirectory" - } - ]; - - // Optional. Specifies the KMS config to be used for volume encryption. - string kms_config = 13 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; - - // Optional. Flag indicating if the pool is NFS LDAP enabled or not. - bool ldap_enabled = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This field is not implemented. The values provided in this field - // are ignored. - string psa_range = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Specifies the current pool encryption key source. - EncryptionType encryption_type = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Deprecated. Used to allow SO pool to access AD or DNS server from other - // regions. - optional bool global_access_allowed = 17 [deprecated = true]; - - // Optional. True if the storage pool supports Auto Tiering enabled volumes. - // Default is false. Auto-tiering can be enabled after storage pool creation - // but it can't be disabled once enabled. - bool allow_auto_tiering = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the replica zone for regional storagePool. - string replica_zone = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the active zone for regional storagePool. - string zone = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Reserved for future use - bool satisfies_pzs = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use - bool satisfies_pzi = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. True if using Independent Scaling of capacity and performance - // (Hyperdisk) By default set to false - bool custom_performance_enabled = 25 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom Performance Total Throughput of the pool (in MiBps) - int64 total_throughput_mibps = 26 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom Performance Total IOPS of the pool - // if not provided, it will be calculated based on the total_throughput_mibps - int64 total_iops = 27 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Total hot tier capacity for the Storage Pool. It is applicable - // only to Flex service level. It should be less than the minimum storage pool - // size and cannot be more than the current storage pool size. It cannot be - // decreased once set. - int64 hot_tier_size_gib = 28 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating that the hot-tier threshold will be - // auto-increased by 10% of the hot-tier when it hits 100%. Default is true. - // The increment will kick in only if the new size after increment is - // still less than or equal to storage pool size. - optional bool enable_hot_tier_auto_resize = 29 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. QoS (Quality of Service) Type of the storage pool - QosType qos_type = 30 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Available throughput of the storage pool (in MiB/s). - double available_throughput_mibps = 31 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total cold tier data rounded down to the nearest GiB used by - // the storage pool. - int64 cold_tier_size_used_gib = 33 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total hot tier data rounded down to the nearest GiB used by - // the storage pool. - int64 hot_tier_size_used_gib = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Type of the storage pool. This field is used to control whether - // the pool supports `FILE` based volumes only or `UNIFIED` (both `FILE` and - // `BLOCK`) volumes. If not specified during creation, it defaults to `FILE`. - optional StoragePoolType type = 35 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Mode of the storage pool. This field is used to control whether - // the user can perform the ONTAP operations on the storage pool using the - // GCNV ONTAP Mode APIs. If not specified during creation, it defaults to - // `DEFAULT`. - optional Mode mode = 36 [(google.api.field_behavior) = OPTIONAL]; -} - -// ValidateDirectoryServiceRequest validates the directory service policy -// attached to the storage pool. -message ValidateDirectoryServiceRequest { - // Required. Name of the storage pool - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; - - // Type of directory service policy attached to the storage pool. - DirectoryServiceType directory_service_type = 2; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto b/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto deleted file mode 100644 index d5526eaefd4..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto +++ /dev/null @@ -1,1022 +0,0 @@ -// 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.netapp.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/netapp/v1/common.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetApp.V1"; -option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; -option java_multiple_files = true; -option java_outer_classname = "VolumeProto"; -option java_package = "com.google.cloud.netapp.v1"; -option php_namespace = "Google\\Cloud\\NetApp\\V1"; -option ruby_package = "Google::Cloud::NetApp::V1"; - -// Protocols is an enum of all the supported network protocols for a volume. -enum Protocols { - // Unspecified protocol - PROTOCOLS_UNSPECIFIED = 0; - - // NFS V3 protocol - NFSV3 = 1; - - // NFS V4 protocol - NFSV4 = 2; - - // SMB protocol - SMB = 3; - - // ISCSI protocol - ISCSI = 4; -} - -// AccessType is an enum of all the supported access types for a volume. -enum AccessType { - // Unspecified Access Type - ACCESS_TYPE_UNSPECIFIED = 0; - - // Read Only - READ_ONLY = 1; - - // Read Write - READ_WRITE = 2; - - // None - READ_NONE = 3; -} - -// SMBSettings -// Modifies the behaviour of a SMB volume. -enum SMBSettings { - // Unspecified default option - SMB_SETTINGS_UNSPECIFIED = 0; - - // SMB setting encrypt data - ENCRYPT_DATA = 1; - - // SMB setting browsable - BROWSABLE = 2; - - // SMB setting notify change - CHANGE_NOTIFY = 3; - - // SMB setting not to notify change - NON_BROWSABLE = 4; - - // SMB setting oplocks - OPLOCKS = 5; - - // SMB setting to show snapshots - SHOW_SNAPSHOT = 6; - - // SMB setting to show previous versions - SHOW_PREVIOUS_VERSIONS = 7; - - // SMB setting to access volume based on enumerartion - ACCESS_BASED_ENUMERATION = 8; - - // Continuously available enumeration - CONTINUOUSLY_AVAILABLE = 9; -} - -// The security style of the volume, can be either UNIX or NTFS. -enum SecurityStyle { - // SecurityStyle is unspecified - SECURITY_STYLE_UNSPECIFIED = 0; - - // SecurityStyle uses NTFS - NTFS = 1; - - // SecurityStyle uses UNIX - UNIX = 2; -} - -// Actions to be restricted for a volume. -enum RestrictedAction { - // Unspecified restricted action - RESTRICTED_ACTION_UNSPECIFIED = 0; - - // Prevent volume from being deleted when mounted. - DELETE = 1; -} - -// Message for requesting list of Volumes -message ListVolumesRequest { - // Required. Parent value for ListVolumesRequest - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Volume" - } - ]; - - // Requested page size. Server may return fewer items than requested. - // If unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results the server should return. - string page_token = 3; - - // Filtering results - string filter = 4; - - // Hint for how to order the results - string order_by = 5; -} - -// Message for response to listing Volumes -message ListVolumesResponse { - // The list of Volume - repeated Volume volumes = 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; -} - -// Message for getting a Volume -message GetVolumeRequest { - // Required. Name of the volume - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; -} - -// Message for creating a Volume -message CreateVolumeRequest { - // Required. Value for parent. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "netapp.googleapis.com/Volume" - } - ]; - - // Required. Id of the requesting volume. Must be unique within the parent - // resource. Must contain only letters, numbers and hyphen, with the first - // character a letter, the last a letter or a number, - // and a 63 character maximum. - string volume_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The volume being created. - Volume volume = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for updating a Volume -message UpdateVolumeRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Volume 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 = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The volume being updated - Volume volume = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Message for deleting a Volume -message DeleteVolumeRequest { - // Required. Name of the volume - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // If this field is set as true, CCFE will not block the volume resource - // deletion even if it has any snapshots resource. (Otherwise, the request - // will only work if the volume has no snapshots.) - bool force = 2; -} - -// RevertVolumeRequest reverts the given volume to the specified snapshot. -message RevertVolumeRequest { - // Required. The resource name of the volume, in the format of - // projects/{project_id}/locations/{location}/volumes/{volume_id}. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Required. The snapshot resource ID, in the format 'my-snapshot', where the - // specified ID is the {snapshot_id} of the fully qualified name like - // projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - string snapshot_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Volume provides a filesystem that you can mount. -message Volume { - option (google.api.resource) = { - type: "netapp.googleapis.com/Volume" - pattern: "projects/{project}/locations/{location}/volumes/{volume}" - plural: "volumes" - singular: "volume" - }; - - // Details about a clone volume. - message CloneDetails { - // Output only. Specifies the full resource name of the source snapshot from - // which this volume was cloned. Format: - // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - string source_snapshot = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Snapshot" - } - ]; - - // Output only. Full name of the source volume resource. - // Format: - // projects/{project}/locations/{location}/volumes/{volume} - string source_volume = 2 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Output only. Shared space in GiB. Determined at volume creation time - // based on size of source snapshot. - int64 shared_space_gib = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The volume states - enum State { - // Unspecified Volume State - STATE_UNSPECIFIED = 0; - - // Volume State is Ready - READY = 1; - - // Volume State is Creating - CREATING = 2; - - // Volume State is Deleting - DELETING = 3; - - // Volume State is Updating - UPDATING = 4; - - // Volume State is Restoring - RESTORING = 5; - - // Volume State is Disabled - DISABLED = 6; - - // Volume State is Error - ERROR = 7; - - // Volume State is Preparing. Note that this is different from CREATING - // where CREATING means the volume is being created, while PREPARING means - // the volume is created and now being prepared for the replication. - PREPARING = 8; - - // Volume State is Read Only - READ_ONLY = 9; - } - - // Identifier. Name of the volume - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. State of the volume - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. State details of the volume - string state_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Create time of the volume - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Share name of the volume - string share_name = 5 [(google.api.field_behavior) = REQUIRED]; - - // Output only. This field is not implemented. The values provided in this - // field are ignored. - string psa_range = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. StoragePool name of the volume - string storage_pool = 7 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/StoragePool" - } - ]; - - // Output only. VPC Network name. - // Format: projects/{project}/global/networks/{network} - string network = 8 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } - ]; - - // Output only. Service level of the volume - ServiceLevel service_level = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Capacity in GIB of the volume - int64 capacity_gib = 10 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Export policy of the volume - ExportPolicy export_policy = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Protocols required for the volume - repeated Protocols protocols = 12 [(google.api.field_behavior) = REQUIRED]; - - // Optional. SMB share settings for the volume. - repeated SMBSettings smb_settings = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Mount options of this volume - repeated MountOption mount_options = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Default unix style permission (e.g. 777) the mount point will be - // created with. Applicable for NFS protocol types only. - string unix_permissions = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels as key value pairs - map labels = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the volume - string description = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SnapshotPolicy for a volume. - SnapshotPolicy snapshot_policy = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Snap_reserve specifies percentage of volume storage reserved for - // snapshot storage. Default is 0 percent. - double snap_reserve = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Snapshot_directory if enabled (true) the volume will contain a - // read-only .snapshot directory which provides access to each of the volume's - // snapshots. - bool snapshot_directory = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Used capacity in GIB of the volume. This is computed - // periodically and it does not represent the realtime usage. - int64 used_gib = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Security Style of the Volume - SecurityStyle security_style = 22 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating if the volume is a kerberos volume or not, export - // policy rules control kerberos security modes (krb5, krb5i, krb5p). - bool kerberos_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Flag indicating if the volume is NFS LDAP enabled or not. - bool ldap_enabled = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Specifies the ActiveDirectory name of a SMB volume. - string active_directory = 25 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/ActiveDirectory" - } - ]; - - // Optional. Specifies the source of the volume to be created from. - RestoreParameters restore_parameters = 26 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Specifies the KMS config to be used for volume encryption. - string kms_config = 27 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/KmsConfig" - } - ]; - - // Output only. Specified the current volume encryption key source. - EncryptionType encryption_type = 28 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates whether the volume is part of a replication - // relationship. - bool has_replication = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // BackupConfig of the volume. - optional BackupConfig backup_config = 30; - - // Optional. List of actions that are restricted on this volume. - repeated RestrictedAction restricted_actions = 31 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating if the volume will be a large capacity volume or - // a regular volume. - bool large_capacity = 32 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating if the volume will have an IP address per node - // for volumes supporting multiple IP endpoints. Only the volume with - // large_capacity will be allowed to have multiple endpoints. - bool multiple_endpoints = 33 [(google.api.field_behavior) = OPTIONAL]; - - // Tiering policy for the volume. - optional TieringPolicy tiering_policy = 34; - - // Output only. Specifies the replica zone for regional volume. - string replica_zone = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Specifies the active zone for regional volume. - string zone = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Size of the volume cold tier data rounded down to the nearest - // GiB. - int64 cold_tier_size_gib = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The Hybrid Replication parameters for the volume. - HybridReplicationParameters hybrid_replication_parameters = 40 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Throughput of the volume (in MiB/s) - double throughput_mibps = 41 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cache parameters for the volume. - CacheParameters cache_parameters = 42 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Total hot tier data rounded down to the nearest GiB used by - // the Volume. This field is only used for flex Service Level - int64 hot_tier_size_used_gib = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Block devices for the volume. - // Currently, only one block device is permitted per Volume. - repeated BlockDevice block_devices = 45 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. If this volume is a clone, this field contains details about - // the clone. - CloneDetails clone_details = 47 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Defines the export policy for the volume. -message ExportPolicy { - // Required. List of export policy rules - repeated SimpleExportPolicyRule rules = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// An export policy rule describing various export options. -message SimpleExportPolicyRule { - // `SquashMode` defines how remote user privileges are restricted when - // accessing an NFS export. It controls how user identities (like root) are - // mapped to anonymous users to limit access and enforce security. - enum SquashMode { - // Defaults to `NO_ROOT_SQUASH`. - SQUASH_MODE_UNSPECIFIED = 0; - - // The root user (UID 0) retains full access. Other users are - // unaffected. - NO_ROOT_SQUASH = 1; - - // The root user (UID 0) is squashed to anonymous user ID. Other users are - // unaffected. - ROOT_SQUASH = 2; - - // All users are squashed to anonymous user ID. - ALL_SQUASH = 3; - } - - // Comma separated list of allowed clients IP addresses - optional string allowed_clients = 1; - - // Whether Unix root access will be granted. - optional string has_root_access = 2; - - // Access type (ReadWrite, ReadOnly, None) - optional AccessType access_type = 3; - - // NFS V3 protocol. - optional bool nfsv3 = 4; - - // NFS V4 protocol. - optional bool nfsv4 = 5; - - // If enabled (true) the rule defines a read only access for clients matching - // the 'allowedClients' specification. It enables nfs clients to mount using - // 'authentication' kerberos security mode. - optional bool kerberos_5_read_only = 6; - - // If enabled (true) the rule defines read and write access for clients - // matching the 'allowedClients' specification. It enables nfs clients to - // mount using 'authentication' kerberos security mode. The - // 'kerberos5ReadOnly' value be ignored if this is enabled. - optional bool kerberos_5_read_write = 7; - - // If enabled (true) the rule defines a read only access for clients matching - // the 'allowedClients' specification. It enables nfs clients to mount using - // 'integrity' kerberos security mode. - optional bool kerberos_5i_read_only = 8; - - // If enabled (true) the rule defines read and write access for clients - // matching the 'allowedClients' specification. It enables nfs clients to - // mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' - // value be ignored if this is enabled. - optional bool kerberos_5i_read_write = 9; - - // If enabled (true) the rule defines a read only access for clients matching - // the 'allowedClients' specification. It enables nfs clients to mount using - // 'privacy' kerberos security mode. - optional bool kerberos_5p_read_only = 10; - - // If enabled (true) the rule defines read and write access for clients - // matching the 'allowedClients' specification. It enables nfs clients to - // mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' - // value be ignored if this is enabled. - optional bool kerberos_5p_read_write = 11; - - // Optional. Defines how user identity squashing is applied for this export - // rule. This field is the preferred way to configure squashing behavior and - // takes precedence over `has_root_access` if both are provided. - optional SquashMode squash_mode = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An integer representing the anonymous user ID. Range is 0 to - // `4294967295`. Required when `squash_mode` is `ROOT_SQUASH` or `ALL_SQUASH`. - optional int64 anon_uid = 13 [(google.api.field_behavior) = OPTIONAL]; -} - -// Snapshot Policy for a volume. -message SnapshotPolicy { - // If enabled, make snapshots automatically according to the schedules. - // Default is false. - optional bool enabled = 1; - - // Hourly schedule policy. - optional HourlySchedule hourly_schedule = 2; - - // Daily schedule policy. - optional DailySchedule daily_schedule = 3; - - // Weekly schedule policy. - optional WeeklySchedule weekly_schedule = 4; - - // Monthly schedule policy. - optional MonthlySchedule monthly_schedule = 5; -} - -// Make a snapshot every hour e.g. at 04:00, 05:00, 06:00. -message HourlySchedule { - // The maximum number of Snapshots to keep for the hourly schedule - optional double snapshots_to_keep = 1; - - // Set the minute of the hour to start the snapshot (0-59), defaults to the - // top of the hour (0). - optional double minute = 2; -} - -// Make a snapshot every day e.g. at 04:00, 05:20, 23:50 -message DailySchedule { - // The maximum number of Snapshots to keep for the hourly schedule - optional double snapshots_to_keep = 1; - - // Set the minute of the hour to start the snapshot (0-59), defaults to the - // top of the hour (0). - optional double minute = 2; - - // Set the hour to start the snapshot (0-23), defaults to midnight (0). - optional double hour = 3; -} - -// Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday -// 23:50 -message WeeklySchedule { - // The maximum number of Snapshots to keep for the hourly schedule - optional double snapshots_to_keep = 1; - - // Set the minute of the hour to start the snapshot (0-59), defaults to the - // top of the hour (0). - optional double minute = 2; - - // Set the hour to start the snapshot (0-23), defaults to midnight (0). - optional double hour = 3; - - // Set the day or days of the week to make a snapshot. Accepts a comma - // separated days of the week. Defaults to 'Sunday'. - optional string day = 4; -} - -// Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50 -message MonthlySchedule { - // The maximum number of Snapshots to keep for the hourly schedule - optional double snapshots_to_keep = 1; - - // Set the minute of the hour to start the snapshot (0-59), defaults to the - // top of the hour (0). - optional double minute = 2; - - // Set the hour to start the snapshot (0-23), defaults to midnight (0). - optional double hour = 3; - - // Set the day or days of the month to make a snapshot (1-31). Accepts a - // comma separated number of days. Defaults to '1'. - optional string days_of_month = 4; -} - -// View only mount options for a volume. -message MountOption { - // Export string - string export = 1; - - // Full export string - string export_full = 2; - - // Protocol to mount with. - Protocols protocol = 3; - - // Instructions for mounting - string instructions = 4; - - // Output only. IP Address. - string ip_address = 5 [ - (google.api.field_info).format = IPV4, - (google.api.field_behavior) = OUTPUT_ONLY - ]; -} - -// The RestoreParameters if volume is created from a snapshot or backup. -message RestoreParameters { - // The source that the volume is created from. - oneof source { - // Full name of the snapshot resource. - // Format: - // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - string source_snapshot = 1; - - // Full name of the backup resource. - // Format for standard backup: - // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} - // Format for BackupDR backup: - // projects/{project}/locations/{location}/backupVaults/{backup_vault}/dataSources/{data_source}/backups/{backup} - string source_backup = 2 [ - (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } - ]; - } -} - -// BackupConfig contains backup related config on a volume. -message BackupConfig { - // Optional. When specified, schedule backups will be created based on the - // policy configuration. - repeated string backup_policies = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupPolicy" - } - ]; - - // Optional. Name of backup vault. - // Format: - // projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} - string backup_vault = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/BackupVault" - } - ]; - - // Optional. When set to true, scheduled backup is enabled on the volume. - // This field should be nil when there's no backup policy attached. - optional bool scheduled_backup_enabled = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Total size of all backups in a chain in bytes = baseline - // backup size + sum(incremental backup size). - optional int64 backup_chain_bytes = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Defines tiering policy for the volume. -message TieringPolicy { - // Tier action for the volume. - enum TierAction { - // Unspecified. - TIER_ACTION_UNSPECIFIED = 0; - - // When tiering is enabled, new cold data will be tiered. - ENABLED = 1; - - // When paused, tiering won't be performed on new data. Existing data stays - // tiered until accessed. - PAUSED = 2; - } - - // Optional. Flag indicating if the volume has tiering policy enable/pause. - // Default is PAUSED. - optional TierAction tier_action = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Time in days to mark the volume's data block as cold and make it - // eligible for tiering, can be range from 2-183. Default is 31. - optional int32 cooling_threshold_days = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating that the hot tier bypass mode is enabled. Default - // is false. This is only applicable to Flex service level. - optional bool hot_tier_bypass_mode_enabled = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The Hybrid Replication parameters for the volume. -message HybridReplicationParameters { - // Type of the volume's hybrid replication. - enum VolumeHybridReplicationType { - // Unspecified hybrid replication type. - VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; - - // Hybrid replication type for migration. - MIGRATION = 1; - - // Hybrid replication type for continuous replication. - CONTINUOUS_REPLICATION = 2; - - // New field for reversible OnPrem replication, to be used for data - // protection. - ONPREM_REPLICATION = 3; - - // New field for reversible OnPrem replication, to be used for data - // protection. - REVERSE_ONPREM_REPLICATION = 4; - } - - // Required. Desired name for the replication of this volume. - string replication = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/Replication" - } - ]; - - // Required. Name of the user's local source volume to be peered with the - // destination volume. - string peer_volume_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the user's local source cluster to be peered with the - // destination cluster. - string peer_cluster_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the user's local source vserver svm to be peered with the - // destination vserver svm. - string peer_svm_name = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. List of node ip addresses to be peered with. - repeated string peer_ip_addresses = 5 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Name of source cluster location associated with the Hybrid - // replication. This is a free-form field for the display purpose only. - string cluster_location = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Description of the replication. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels to be added to the replication as the key value pairs. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Replication Schedule for the replication created. - HybridReplicationSchedule replication_schedule = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Type of the hybrid replication. - VolumeHybridReplicationType hybrid_replication_type = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Constituent volume count for large volume. - int32 large_volume_constituent_count = 11 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Cache Parameters for the volume. -message CacheParameters { - // State of the cache volume indicating the peering status. - enum CacheState { - // Default unspecified state. - CACHE_STATE_UNSPECIFIED = 0; - - // State indicating waiting for cluster peering to be established. - PENDING_CLUSTER_PEERING = 1; - - // State indicating waiting for SVM peering to be established. - PENDING_SVM_PEERING = 2; - - // State indicating successful establishment of peering with origin - // volumes's ONTAP cluster. - PEERED = 3; - - // Terminal state wherein peering with origin volume's ONTAP cluster - // has failed. - ERROR = 4; - } - - // Required. Name of the origin volume for the cache volume. - string peer_volume_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the origin volume's ONTAP cluster. - string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the origin volume's SVM. - string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. List of IC LIF addresses of the origin volume's ONTAP cluster. - repeated string peer_ip_addresses = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Indicates whether the cache volume has global file lock enabled. - optional bool enable_global_file_lock = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration of the cache volume. - CacheConfig cache_config = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. State of the cache volume indicating the peering status. - CacheState cache_state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Copy-paste-able commands to be used on user's ONTAP to accept - // peering requests. - string command = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Expiration time for the peering command to be executed on user's - // ONTAP. - google.protobuf.Timestamp peering_command_expiry_time = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Temporary passphrase generated to accept cluster peering - // command. - string passphrase = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detailed description of the current cache state. - string state_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration of the cache volume. -message CacheConfig { - // State of the prepopulation job indicating how the prepopulation is - // progressing. - enum CachePrePopulateState { - // Default unspecified state. - CACHE_PRE_POPULATE_STATE_UNSPECIFIED = 0; - - // State representing when the most recent create or update request did not - // require a prepopulation job. - NOT_NEEDED = 1; - - // State representing when the most recent update request requested a - // prepopulation job but it has not yet completed. - IN_PROGRESS = 2; - - // State representing when the most recent update request requested a - // prepopulation job and it has completed successfully. - COMPLETE = 3; - - // State representing when the most recent update request requested a - // prepopulation job but the prepopulate job failed. - ERROR = 4; - } - - // Optional. Pre-populate cache volume with data from the origin volume. - CachePrePopulate cache_pre_populate = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating whether writeback is enabled for the FlexCache - // volume. - optional bool writeback_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating whether a CIFS change notification is enabled for - // the FlexCache volume. - optional bool cifs_change_notify_enabled = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. State of the prepopulation job indicating how the - // prepopulation is progressing. - CachePrePopulateState cache_pre_populate_state = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Pre-populate cache volume with data from the origin volume. -message CachePrePopulate { - // Optional. List of directory-paths to be pre-populated for the FlexCache - // volume. - repeated string path_list = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. List of directory-paths to be excluded for pre-population for the - // FlexCache volume. - repeated string exclude_path_list = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Flag indicating whether the directories listed with the - // `path_list` need to be recursively pre-populated. - optional bool recursion = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Block device represents the device(s) which are stored in the block volume. -message BlockDevice { - // Optional. User-defined name for the block device, unique within the volume. - // In case no user input is provided, name will be auto-generated in the - // backend. The name must meet the following requirements: - // * Be between 1 and 255 characters long. - // * Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), - // and the following special characters: "-", "_", "}", "{", ".". - // * Spaces are not allowed. - optional string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of host groups that identify hosts that can mount the - // block volume. Format: - // `projects/{project_id}/locations/{location}/hostGroups/{host_group_id}` - // This field can be updated after the block device is created. - repeated string host_groups = 2 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "netapp.googleapis.com/HostGroup" - } - ]; - - // Output only. Device identifier of the block volume. This represents - // `lun_serial_number` for iSCSI volumes. - string identifier = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The size of the block device in GiB. - // Any value provided for the `size_gib` field during volume creation is - // ignored. The block device's size is system-managed and will be set to match - // the parent Volume's `capacity_gib`. - optional int64 size_gib = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Immutable. The OS type of the volume. - // This field can't be changed after the block device is created. - OsType os_type = 5 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; -} - -// RestoreBackupFilesRequest restores files from a backup to a volume. -message RestoreBackupFilesRequest { - // Required. The volume resource name, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Required. The backup resource name, in the format - // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - string backup = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } - ]; - - // Required. List of files to be restored, specified by their absolute path in - // the source volume. - repeated string file_list = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Absolute directory path in the destination volume. This is - // required if the `file_list` is provided. - string restore_destination_path = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// RestoreBackupFilesResponse is the result of RestoreBackupFilesRequest. -message RestoreBackupFilesResponse {} - -// EstablishVolumePeeringRequest establishes cluster and svm peerings between -// the source and destination clusters. -message EstablishVolumePeeringRequest { - // Required. The volume resource name, in the format - // `projects/{project_id}/locations/{location}/volumes/{volume_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } - ]; - - // Required. Name of the user's local source cluster to be peered with the - // destination cluster. - string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the user's local source vserver svm to be peered with the - // destination vserver svm. - string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. List of IPv4 ip addresses to be used for peering. - repeated string peer_ip_addresses = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. Name of the user's local source volume to be peered with the - // destination volume. - string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts b/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts deleted file mode 100644 index ebfa437a676..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/protos.d.ts +++ /dev/null @@ -1,24482 +0,0 @@ -// 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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace netapp. */ - namespace netapp { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ListActiveDirectoriesRequest. */ - interface IListActiveDirectoriesRequest { - - /** ListActiveDirectoriesRequest parent */ - parent?: (string|null); - - /** ListActiveDirectoriesRequest pageSize */ - pageSize?: (number|null); - - /** ListActiveDirectoriesRequest pageToken */ - pageToken?: (string|null); - - /** ListActiveDirectoriesRequest filter */ - filter?: (string|null); - - /** ListActiveDirectoriesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListActiveDirectoriesRequest. */ - class ListActiveDirectoriesRequest implements IListActiveDirectoriesRequest { - - /** - * Constructs a new ListActiveDirectoriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest); - - /** ListActiveDirectoriesRequest parent. */ - public parent: string; - - /** ListActiveDirectoriesRequest pageSize. */ - public pageSize: number; - - /** ListActiveDirectoriesRequest pageToken. */ - public pageToken: string; - - /** ListActiveDirectoriesRequest filter. */ - public filter: string; - - /** ListActiveDirectoriesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListActiveDirectoriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListActiveDirectoriesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesRequest): google.cloud.netapp.v1.ListActiveDirectoriesRequest; - - /** - * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. - * @param message ListActiveDirectoriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. - * @param message ListActiveDirectoriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListActiveDirectoriesRequest - * @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.netapp.v1.ListActiveDirectoriesRequest; - - /** - * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListActiveDirectoriesRequest - * @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.netapp.v1.ListActiveDirectoriesRequest; - - /** - * Verifies a ListActiveDirectoriesRequest 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 ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListActiveDirectoriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesRequest; - - /** - * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. - * @param message ListActiveDirectoriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListActiveDirectoriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListActiveDirectoriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListActiveDirectoriesResponse. */ - interface IListActiveDirectoriesResponse { - - /** ListActiveDirectoriesResponse activeDirectories */ - activeDirectories?: (google.cloud.netapp.v1.IActiveDirectory[]|null); - - /** ListActiveDirectoriesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListActiveDirectoriesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListActiveDirectoriesResponse. */ - class ListActiveDirectoriesResponse implements IListActiveDirectoriesResponse { - - /** - * Constructs a new ListActiveDirectoriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse); - - /** ListActiveDirectoriesResponse activeDirectories. */ - public activeDirectories: google.cloud.netapp.v1.IActiveDirectory[]; - - /** ListActiveDirectoriesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListActiveDirectoriesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListActiveDirectoriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListActiveDirectoriesResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListActiveDirectoriesResponse): google.cloud.netapp.v1.ListActiveDirectoriesResponse; - - /** - * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. - * @param message ListActiveDirectoriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. - * @param message ListActiveDirectoriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListActiveDirectoriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListActiveDirectoriesResponse - * @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.netapp.v1.ListActiveDirectoriesResponse; - - /** - * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListActiveDirectoriesResponse - * @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.netapp.v1.ListActiveDirectoriesResponse; - - /** - * Verifies a ListActiveDirectoriesResponse 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 ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListActiveDirectoriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListActiveDirectoriesResponse; - - /** - * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. - * @param message ListActiveDirectoriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListActiveDirectoriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListActiveDirectoriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListActiveDirectoriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetActiveDirectoryRequest. */ - interface IGetActiveDirectoryRequest { - - /** GetActiveDirectoryRequest name */ - name?: (string|null); - } - - /** Represents a GetActiveDirectoryRequest. */ - class GetActiveDirectoryRequest implements IGetActiveDirectoryRequest { - - /** - * Constructs a new GetActiveDirectoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest); - - /** GetActiveDirectoryRequest name. */ - public name: string; - - /** - * Creates a new GetActiveDirectoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetActiveDirectoryRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetActiveDirectoryRequest): google.cloud.netapp.v1.GetActiveDirectoryRequest; - - /** - * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. - * @param message GetActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. - * @param message GetActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetActiveDirectoryRequest - * @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.netapp.v1.GetActiveDirectoryRequest; - - /** - * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetActiveDirectoryRequest - * @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.netapp.v1.GetActiveDirectoryRequest; - - /** - * Verifies a GetActiveDirectoryRequest 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 GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetActiveDirectoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetActiveDirectoryRequest; - - /** - * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. - * @param message GetActiveDirectoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetActiveDirectoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetActiveDirectoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateActiveDirectoryRequest. */ - interface ICreateActiveDirectoryRequest { - - /** CreateActiveDirectoryRequest parent */ - parent?: (string|null); - - /** CreateActiveDirectoryRequest activeDirectory */ - activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); - - /** CreateActiveDirectoryRequest activeDirectoryId */ - activeDirectoryId?: (string|null); - } - - /** Represents a CreateActiveDirectoryRequest. */ - class CreateActiveDirectoryRequest implements ICreateActiveDirectoryRequest { - - /** - * Constructs a new CreateActiveDirectoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest); - - /** CreateActiveDirectoryRequest parent. */ - public parent: string; - - /** CreateActiveDirectoryRequest activeDirectory. */ - public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); - - /** CreateActiveDirectoryRequest activeDirectoryId. */ - public activeDirectoryId: string; - - /** - * Creates a new CreateActiveDirectoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateActiveDirectoryRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): google.cloud.netapp.v1.CreateActiveDirectoryRequest; - - /** - * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. - * @param message CreateActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. - * @param message CreateActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateActiveDirectoryRequest - * @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.netapp.v1.CreateActiveDirectoryRequest; - - /** - * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateActiveDirectoryRequest - * @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.netapp.v1.CreateActiveDirectoryRequest; - - /** - * Verifies a CreateActiveDirectoryRequest 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 CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateActiveDirectoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateActiveDirectoryRequest; - - /** - * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. - * @param message CreateActiveDirectoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateActiveDirectoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateActiveDirectoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateActiveDirectoryRequest. */ - interface IUpdateActiveDirectoryRequest { - - /** UpdateActiveDirectoryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateActiveDirectoryRequest activeDirectory */ - activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); - } - - /** Represents an UpdateActiveDirectoryRequest. */ - class UpdateActiveDirectoryRequest implements IUpdateActiveDirectoryRequest { - - /** - * Constructs a new UpdateActiveDirectoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest); - - /** UpdateActiveDirectoryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateActiveDirectoryRequest activeDirectory. */ - public activeDirectory?: (google.cloud.netapp.v1.IActiveDirectory|null); - - /** - * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateActiveDirectoryRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; - - /** - * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. - * @param message UpdateActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. - * @param message UpdateActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateActiveDirectoryRequest - * @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.netapp.v1.UpdateActiveDirectoryRequest; - - /** - * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateActiveDirectoryRequest - * @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.netapp.v1.UpdateActiveDirectoryRequest; - - /** - * Verifies an UpdateActiveDirectoryRequest 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 UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateActiveDirectoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateActiveDirectoryRequest; - - /** - * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. - * @param message UpdateActiveDirectoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateActiveDirectoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateActiveDirectoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteActiveDirectoryRequest. */ - interface IDeleteActiveDirectoryRequest { - - /** DeleteActiveDirectoryRequest name */ - name?: (string|null); - } - - /** Represents a DeleteActiveDirectoryRequest. */ - class DeleteActiveDirectoryRequest implements IDeleteActiveDirectoryRequest { - - /** - * Constructs a new DeleteActiveDirectoryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest); - - /** DeleteActiveDirectoryRequest name. */ - public name: string; - - /** - * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteActiveDirectoryRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; - - /** - * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. - * @param message DeleteActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. - * @param message DeleteActiveDirectoryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteActiveDirectoryRequest - * @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.netapp.v1.DeleteActiveDirectoryRequest; - - /** - * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteActiveDirectoryRequest - * @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.netapp.v1.DeleteActiveDirectoryRequest; - - /** - * Verifies a DeleteActiveDirectoryRequest 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 DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteActiveDirectoryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteActiveDirectoryRequest; - - /** - * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. - * @param message DeleteActiveDirectoryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteActiveDirectoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteActiveDirectoryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteActiveDirectoryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActiveDirectory. */ - interface IActiveDirectory { - - /** ActiveDirectory name */ - name?: (string|null); - - /** ActiveDirectory createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ActiveDirectory state */ - state?: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State|null); - - /** ActiveDirectory domain */ - domain?: (string|null); - - /** ActiveDirectory site */ - site?: (string|null); - - /** ActiveDirectory dns */ - dns?: (string|null); - - /** ActiveDirectory netBiosPrefix */ - netBiosPrefix?: (string|null); - - /** ActiveDirectory organizationalUnit */ - organizationalUnit?: (string|null); - - /** ActiveDirectory aesEncryption */ - aesEncryption?: (boolean|null); - - /** ActiveDirectory username */ - username?: (string|null); - - /** ActiveDirectory password */ - password?: (string|null); - - /** ActiveDirectory backupOperators */ - backupOperators?: (string[]|null); - - /** ActiveDirectory administrators */ - administrators?: (string[]|null); - - /** ActiveDirectory securityOperators */ - securityOperators?: (string[]|null); - - /** ActiveDirectory kdcHostname */ - kdcHostname?: (string|null); - - /** ActiveDirectory kdcIp */ - kdcIp?: (string|null); - - /** ActiveDirectory nfsUsersWithLdap */ - nfsUsersWithLdap?: (boolean|null); - - /** ActiveDirectory description */ - description?: (string|null); - - /** ActiveDirectory ldapSigning */ - ldapSigning?: (boolean|null); - - /** ActiveDirectory encryptDcConnections */ - encryptDcConnections?: (boolean|null); - - /** ActiveDirectory labels */ - labels?: ({ [k: string]: string }|null); - - /** ActiveDirectory stateDetails */ - stateDetails?: (string|null); - } - - /** Represents an ActiveDirectory. */ - class ActiveDirectory implements IActiveDirectory { - - /** - * Constructs a new ActiveDirectory. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IActiveDirectory); - - /** ActiveDirectory name. */ - public name: string; - - /** ActiveDirectory createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ActiveDirectory state. */ - public state: (google.cloud.netapp.v1.ActiveDirectory.State|keyof typeof google.cloud.netapp.v1.ActiveDirectory.State); - - /** ActiveDirectory domain. */ - public domain: string; - - /** ActiveDirectory site. */ - public site: string; - - /** ActiveDirectory dns. */ - public dns: string; - - /** ActiveDirectory netBiosPrefix. */ - public netBiosPrefix: string; - - /** ActiveDirectory organizationalUnit. */ - public organizationalUnit: string; - - /** ActiveDirectory aesEncryption. */ - public aesEncryption: boolean; - - /** ActiveDirectory username. */ - public username: string; - - /** ActiveDirectory password. */ - public password: string; - - /** ActiveDirectory backupOperators. */ - public backupOperators: string[]; - - /** ActiveDirectory administrators. */ - public administrators: string[]; - - /** ActiveDirectory securityOperators. */ - public securityOperators: string[]; - - /** ActiveDirectory kdcHostname. */ - public kdcHostname: string; - - /** ActiveDirectory kdcIp. */ - public kdcIp: string; - - /** ActiveDirectory nfsUsersWithLdap. */ - public nfsUsersWithLdap: boolean; - - /** ActiveDirectory description. */ - public description: string; - - /** ActiveDirectory ldapSigning. */ - public ldapSigning: boolean; - - /** ActiveDirectory encryptDcConnections. */ - public encryptDcConnections: boolean; - - /** ActiveDirectory labels. */ - public labels: { [k: string]: string }; - - /** ActiveDirectory stateDetails. */ - public stateDetails: string; - - /** - * Creates a new ActiveDirectory instance using the specified properties. - * @param [properties] Properties to set - * @returns ActiveDirectory instance - */ - public static create(properties?: google.cloud.netapp.v1.IActiveDirectory): google.cloud.netapp.v1.ActiveDirectory; - - /** - * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. - * @param message ActiveDirectory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. - * @param message ActiveDirectory message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IActiveDirectory, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActiveDirectory message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActiveDirectory - * @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.netapp.v1.ActiveDirectory; - - /** - * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActiveDirectory - * @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.netapp.v1.ActiveDirectory; - - /** - * Verifies an ActiveDirectory 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 ActiveDirectory message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActiveDirectory - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ActiveDirectory; - - /** - * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. - * @param message ActiveDirectory - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ActiveDirectory, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActiveDirectory to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActiveDirectory - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ActiveDirectory { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - IN_USE = 4, - DELETING = 5, - ERROR = 6, - DIAGNOSING = 7 - } - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup state */ - state?: (google.cloud.netapp.v1.Backup.State|keyof typeof google.cloud.netapp.v1.Backup.State|null); - - /** Backup description */ - description?: (string|null); - - /** Backup volumeUsageBytes */ - volumeUsageBytes?: (number|Long|string|null); - - /** Backup backupType */ - backupType?: (google.cloud.netapp.v1.Backup.Type|keyof typeof google.cloud.netapp.v1.Backup.Type|null); - - /** Backup sourceVolume */ - sourceVolume?: (string|null); - - /** Backup sourceSnapshot */ - sourceSnapshot?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels */ - labels?: ({ [k: string]: string }|null); - - /** Backup chainStorageBytes */ - chainStorageBytes?: (number|Long|string|null); - - /** Backup satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Backup satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** Backup volumeRegion */ - volumeRegion?: (string|null); - - /** Backup backupRegion */ - backupRegion?: (string|null); - - /** Backup enforcedRetentionEndTime */ - enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Backup. */ - class Backup implements IBackup { - - /** - * Constructs a new Backup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup state. */ - public state: (google.cloud.netapp.v1.Backup.State|keyof typeof google.cloud.netapp.v1.Backup.State); - - /** Backup description. */ - public description: string; - - /** Backup volumeUsageBytes. */ - public volumeUsageBytes: (number|Long|string); - - /** Backup backupType. */ - public backupType: (google.cloud.netapp.v1.Backup.Type|keyof typeof google.cloud.netapp.v1.Backup.Type); - - /** Backup sourceVolume. */ - public sourceVolume: string; - - /** Backup sourceSnapshot. */ - public sourceSnapshot?: (string|null); - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels. */ - public labels: { [k: string]: string }; - - /** Backup chainStorageBytes. */ - public chainStorageBytes: (number|Long|string); - - /** Backup satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** Backup satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** Backup volumeRegion. */ - public volumeRegion: string; - - /** Backup backupRegion. */ - public backupRegion: string; - - /** Backup enforcedRetentionEndTime. */ - public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Backup instance using the specified properties. - * @param [properties] Properties to set - * @returns Backup instance - */ - public static create(properties?: google.cloud.netapp.v1.IBackup): google.cloud.netapp.v1.Backup; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - UPLOADING = 2, - READY = 3, - DELETING = 4, - ERROR = 5, - UPDATING = 6 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - MANUAL = 1, - SCHEDULED = 2 - } - } - - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { - - /** ListBackupsRequest parent */ - parent?: (string|null); - - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { - - /** - * Constructs a new ListBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; - - /** ListBackupsRequest orderBy. */ - public orderBy: string; - - /** ListBackupsRequest filter. */ - public filter: string; - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListBackupsRequest): google.cloud.netapp.v1.ListBackupsRequest; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.netapp.v1.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.netapp.v1.IListBackupsResponse): google.cloud.netapp.v1.ListBackupsResponse; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { - - /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetBackupRequest); - - /** GetBackupRequest name. */ - public name: string; - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetBackupRequest): google.cloud.netapp.v1.GetBackupRequest; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a CreateBackupRequest. */ - interface ICreateBackupRequest { - - /** CreateBackupRequest parent */ - parent?: (string|null); - - /** CreateBackupRequest backupId */ - backupId?: (string|null); - - /** CreateBackupRequest backup */ - backup?: (google.cloud.netapp.v1.IBackup|null); - } - - /** Represents a CreateBackupRequest. */ - class CreateBackupRequest implements ICreateBackupRequest { - - /** - * Constructs a new CreateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateBackupRequest); - - /** CreateBackupRequest parent. */ - public parent: string; - - /** CreateBackupRequest backupId. */ - public backupId: string; - - /** CreateBackupRequest backup. */ - public backup?: (google.cloud.netapp.v1.IBackup|null); - - /** - * Creates a new CreateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateBackupRequest): google.cloud.netapp.v1.CreateBackupRequest; - - /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. - * @param message CreateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupRequest - * @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.netapp.v1.CreateBackupRequest; - - /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupRequest - * @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.netapp.v1.CreateBackupRequest; - - /** - * Verifies a CreateBackupRequest 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 CreateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateBackupRequest; - - /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. - * @param message CreateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupRequest - * @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); - } - - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { - - /** - * Constructs a new DeleteBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteBackupRequest); - - /** DeleteBackupRequest name. */ - public name: string; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteBackupRequest): google.cloud.netapp.v1.DeleteBackupRequest; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 an UpdateBackupRequest. */ - interface IUpdateBackupRequest { - - /** UpdateBackupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup */ - backup?: (google.cloud.netapp.v1.IBackup|null); - } - - /** Represents an UpdateBackupRequest. */ - class UpdateBackupRequest implements IUpdateBackupRequest { - - /** - * Constructs a new UpdateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateBackupRequest); - - /** UpdateBackupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup. */ - public backup?: (google.cloud.netapp.v1.IBackup|null); - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateBackupRequest): google.cloud.netapp.v1.UpdateBackupRequest; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 BackupPolicy. */ - interface IBackupPolicy { - - /** BackupPolicy name */ - name?: (string|null); - - /** BackupPolicy dailyBackupLimit */ - dailyBackupLimit?: (number|null); - - /** BackupPolicy weeklyBackupLimit */ - weeklyBackupLimit?: (number|null); - - /** BackupPolicy monthlyBackupLimit */ - monthlyBackupLimit?: (number|null); - - /** BackupPolicy description */ - description?: (string|null); - - /** BackupPolicy enabled */ - enabled?: (boolean|null); - - /** BackupPolicy assignedVolumeCount */ - assignedVolumeCount?: (number|null); - - /** BackupPolicy createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPolicy labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupPolicy state */ - state?: (google.cloud.netapp.v1.BackupPolicy.State|keyof typeof google.cloud.netapp.v1.BackupPolicy.State|null); - } - - /** Represents a BackupPolicy. */ - class BackupPolicy implements IBackupPolicy { - - /** - * Constructs a new BackupPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IBackupPolicy); - - /** BackupPolicy name. */ - public name: string; - - /** BackupPolicy dailyBackupLimit. */ - public dailyBackupLimit?: (number|null); - - /** BackupPolicy weeklyBackupLimit. */ - public weeklyBackupLimit?: (number|null); - - /** BackupPolicy monthlyBackupLimit. */ - public monthlyBackupLimit?: (number|null); - - /** BackupPolicy description. */ - public description?: (string|null); - - /** BackupPolicy enabled. */ - public enabled?: (boolean|null); - - /** BackupPolicy assignedVolumeCount. */ - public assignedVolumeCount?: (number|null); - - /** BackupPolicy createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPolicy labels. */ - public labels: { [k: string]: string }; - - /** BackupPolicy state. */ - public state: (google.cloud.netapp.v1.BackupPolicy.State|keyof typeof google.cloud.netapp.v1.BackupPolicy.State); - - /** - * Creates a new BackupPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPolicy instance - */ - public static create(properties?: google.cloud.netapp.v1.IBackupPolicy): google.cloud.netapp.v1.BackupPolicy; - - /** - * Encodes the specified BackupPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. - * @param message BackupPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. - * @param message BackupPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IBackupPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPolicy - * @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.netapp.v1.BackupPolicy; - - /** - * Decodes a BackupPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPolicy - * @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.netapp.v1.BackupPolicy; - - /** - * Verifies a BackupPolicy 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 BackupPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupPolicy; - - /** - * Creates a plain object from a BackupPolicy message. Also converts values to other types if specified. - * @param message BackupPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.BackupPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPolicy { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - DELETING = 3, - ERROR = 4, - UPDATING = 5 - } - } - - /** Properties of a CreateBackupPolicyRequest. */ - interface ICreateBackupPolicyRequest { - - /** CreateBackupPolicyRequest parent */ - parent?: (string|null); - - /** CreateBackupPolicyRequest backupPolicy */ - backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); - - /** CreateBackupPolicyRequest backupPolicyId */ - backupPolicyId?: (string|null); - } - - /** Represents a CreateBackupPolicyRequest. */ - class CreateBackupPolicyRequest implements ICreateBackupPolicyRequest { - - /** - * Constructs a new CreateBackupPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateBackupPolicyRequest); - - /** CreateBackupPolicyRequest parent. */ - public parent: string; - - /** CreateBackupPolicyRequest backupPolicy. */ - public backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); - - /** CreateBackupPolicyRequest backupPolicyId. */ - public backupPolicyId: string; - - /** - * Creates a new CreateBackupPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPolicyRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateBackupPolicyRequest): google.cloud.netapp.v1.CreateBackupPolicyRequest; - - /** - * Encodes the specified CreateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. - * @param message CreateBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. - * @param message CreateBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPolicyRequest - * @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.netapp.v1.CreateBackupPolicyRequest; - - /** - * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPolicyRequest - * @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.netapp.v1.CreateBackupPolicyRequest; - - /** - * Verifies a CreateBackupPolicyRequest 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 CreateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateBackupPolicyRequest; - - /** - * Creates a plain object from a CreateBackupPolicyRequest message. Also converts values to other types if specified. - * @param message CreateBackupPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPolicyRequest. */ - interface IGetBackupPolicyRequest { - - /** GetBackupPolicyRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPolicyRequest. */ - class GetBackupPolicyRequest implements IGetBackupPolicyRequest { - - /** - * Constructs a new GetBackupPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetBackupPolicyRequest); - - /** GetBackupPolicyRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPolicyRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetBackupPolicyRequest): google.cloud.netapp.v1.GetBackupPolicyRequest; - - /** - * Encodes the specified GetBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. - * @param message GetBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. - * @param message GetBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPolicyRequest - * @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.netapp.v1.GetBackupPolicyRequest; - - /** - * Decodes a GetBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPolicyRequest - * @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.netapp.v1.GetBackupPolicyRequest; - - /** - * Verifies a GetBackupPolicyRequest 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 GetBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetBackupPolicyRequest; - - /** - * Creates a plain object from a GetBackupPolicyRequest message. Also converts values to other types if specified. - * @param message GetBackupPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPoliciesRequest. */ - interface IListBackupPoliciesRequest { - - /** ListBackupPoliciesRequest parent */ - parent?: (string|null); - - /** ListBackupPoliciesRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPoliciesRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPoliciesRequest filter */ - filter?: (string|null); - - /** ListBackupPoliciesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListBackupPoliciesRequest. */ - class ListBackupPoliciesRequest implements IListBackupPoliciesRequest { - - /** - * Constructs a new ListBackupPoliciesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListBackupPoliciesRequest); - - /** ListBackupPoliciesRequest parent. */ - public parent: string; - - /** ListBackupPoliciesRequest pageSize. */ - public pageSize: number; - - /** ListBackupPoliciesRequest pageToken. */ - public pageToken: string; - - /** ListBackupPoliciesRequest filter. */ - public filter: string; - - /** ListBackupPoliciesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListBackupPoliciesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPoliciesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListBackupPoliciesRequest): google.cloud.netapp.v1.ListBackupPoliciesRequest; - - /** - * Encodes the specified ListBackupPoliciesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. - * @param message ListBackupPoliciesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListBackupPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. - * @param message ListBackupPoliciesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListBackupPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPoliciesRequest - * @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.netapp.v1.ListBackupPoliciesRequest; - - /** - * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPoliciesRequest - * @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.netapp.v1.ListBackupPoliciesRequest; - - /** - * Verifies a ListBackupPoliciesRequest 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 ListBackupPoliciesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPoliciesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListBackupPoliciesRequest; - - /** - * Creates a plain object from a ListBackupPoliciesRequest message. Also converts values to other types if specified. - * @param message ListBackupPoliciesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListBackupPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPoliciesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPoliciesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPoliciesResponse. */ - interface IListBackupPoliciesResponse { - - /** ListBackupPoliciesResponse backupPolicies */ - backupPolicies?: (google.cloud.netapp.v1.IBackupPolicy[]|null); - - /** ListBackupPoliciesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPoliciesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPoliciesResponse. */ - class ListBackupPoliciesResponse implements IListBackupPoliciesResponse { - - /** - * Constructs a new ListBackupPoliciesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListBackupPoliciesResponse); - - /** ListBackupPoliciesResponse backupPolicies. */ - public backupPolicies: google.cloud.netapp.v1.IBackupPolicy[]; - - /** ListBackupPoliciesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPoliciesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPoliciesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPoliciesResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListBackupPoliciesResponse): google.cloud.netapp.v1.ListBackupPoliciesResponse; - - /** - * Encodes the specified ListBackupPoliciesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. - * @param message ListBackupPoliciesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListBackupPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. - * @param message ListBackupPoliciesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListBackupPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPoliciesResponse - * @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.netapp.v1.ListBackupPoliciesResponse; - - /** - * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPoliciesResponse - * @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.netapp.v1.ListBackupPoliciesResponse; - - /** - * Verifies a ListBackupPoliciesResponse 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 ListBackupPoliciesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPoliciesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListBackupPoliciesResponse; - - /** - * Creates a plain object from a ListBackupPoliciesResponse message. Also converts values to other types if specified. - * @param message ListBackupPoliciesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListBackupPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPoliciesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPoliciesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupPolicyRequest. */ - interface IUpdateBackupPolicyRequest { - - /** UpdateBackupPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupPolicyRequest backupPolicy */ - backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); - } - - /** Represents an UpdateBackupPolicyRequest. */ - class UpdateBackupPolicyRequest implements IUpdateBackupPolicyRequest { - - /** - * Constructs a new UpdateBackupPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateBackupPolicyRequest); - - /** UpdateBackupPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupPolicyRequest backupPolicy. */ - public backupPolicy?: (google.cloud.netapp.v1.IBackupPolicy|null); - - /** - * Creates a new UpdateBackupPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupPolicyRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateBackupPolicyRequest): google.cloud.netapp.v1.UpdateBackupPolicyRequest; - - /** - * Encodes the specified UpdateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. - * @param message UpdateBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. - * @param message UpdateBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupPolicyRequest - * @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.netapp.v1.UpdateBackupPolicyRequest; - - /** - * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupPolicyRequest - * @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.netapp.v1.UpdateBackupPolicyRequest; - - /** - * Verifies an UpdateBackupPolicyRequest 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 UpdateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateBackupPolicyRequest; - - /** - * Creates a plain object from an UpdateBackupPolicyRequest message. Also converts values to other types if specified. - * @param message UpdateBackupPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPolicyRequest. */ - interface IDeleteBackupPolicyRequest { - - /** DeleteBackupPolicyRequest name */ - name?: (string|null); - } - - /** Represents a DeleteBackupPolicyRequest. */ - class DeleteBackupPolicyRequest implements IDeleteBackupPolicyRequest { - - /** - * Constructs a new DeleteBackupPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteBackupPolicyRequest); - - /** DeleteBackupPolicyRequest name. */ - public name: string; - - /** - * Creates a new DeleteBackupPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPolicyRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteBackupPolicyRequest): google.cloud.netapp.v1.DeleteBackupPolicyRequest; - - /** - * Encodes the specified DeleteBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. - * @param message DeleteBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. - * @param message DeleteBackupPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPolicyRequest - * @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.netapp.v1.DeleteBackupPolicyRequest; - - /** - * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPolicyRequest - * @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.netapp.v1.DeleteBackupPolicyRequest; - - /** - * Verifies a DeleteBackupPolicyRequest 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 DeleteBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteBackupPolicyRequest; - - /** - * Creates a plain object from a DeleteBackupPolicyRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteBackupPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupVault. */ - interface IBackupVault { - - /** BackupVault name */ - name?: (string|null); - - /** BackupVault state */ - state?: (google.cloud.netapp.v1.BackupVault.State|keyof typeof google.cloud.netapp.v1.BackupVault.State|null); - - /** BackupVault createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault description */ - description?: (string|null); - - /** BackupVault labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupVault backupVaultType */ - backupVaultType?: (google.cloud.netapp.v1.BackupVault.BackupVaultType|keyof typeof google.cloud.netapp.v1.BackupVault.BackupVaultType|null); - - /** BackupVault sourceRegion */ - sourceRegion?: (string|null); - - /** BackupVault backupRegion */ - backupRegion?: (string|null); - - /** BackupVault sourceBackupVault */ - sourceBackupVault?: (string|null); - - /** BackupVault destinationBackupVault */ - destinationBackupVault?: (string|null); - - /** BackupVault backupRetentionPolicy */ - backupRetentionPolicy?: (google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null); - - /** BackupVault kmsConfig */ - kmsConfig?: (string|null); - - /** BackupVault encryptionState */ - encryptionState?: (google.cloud.netapp.v1.BackupVault.EncryptionState|keyof typeof google.cloud.netapp.v1.BackupVault.EncryptionState|null); - - /** BackupVault backupsCryptoKeyVersion */ - backupsCryptoKeyVersion?: (string|null); - } - - /** Represents a BackupVault. */ - class BackupVault implements IBackupVault { - - /** - * Constructs a new BackupVault. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IBackupVault); - - /** BackupVault name. */ - public name: string; - - /** BackupVault state. */ - public state: (google.cloud.netapp.v1.BackupVault.State|keyof typeof google.cloud.netapp.v1.BackupVault.State); - - /** BackupVault createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault description. */ - public description: string; - - /** BackupVault labels. */ - public labels: { [k: string]: string }; - - /** BackupVault backupVaultType. */ - public backupVaultType: (google.cloud.netapp.v1.BackupVault.BackupVaultType|keyof typeof google.cloud.netapp.v1.BackupVault.BackupVaultType); - - /** BackupVault sourceRegion. */ - public sourceRegion: string; - - /** BackupVault backupRegion. */ - public backupRegion: string; - - /** BackupVault sourceBackupVault. */ - public sourceBackupVault: string; - - /** BackupVault destinationBackupVault. */ - public destinationBackupVault: string; - - /** BackupVault backupRetentionPolicy. */ - public backupRetentionPolicy?: (google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null); - - /** BackupVault kmsConfig. */ - public kmsConfig: string; - - /** BackupVault encryptionState. */ - public encryptionState: (google.cloud.netapp.v1.BackupVault.EncryptionState|keyof typeof google.cloud.netapp.v1.BackupVault.EncryptionState); - - /** BackupVault backupsCryptoKeyVersion. */ - public backupsCryptoKeyVersion: string; - - /** - * Creates a new BackupVault instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupVault instance - */ - public static create(properties?: google.cloud.netapp.v1.IBackupVault): google.cloud.netapp.v1.BackupVault; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a BackupRetentionPolicy. */ - interface IBackupRetentionPolicy { - - /** BackupRetentionPolicy backupMinimumEnforcedRetentionDays */ - backupMinimumEnforcedRetentionDays?: (number|null); - - /** BackupRetentionPolicy dailyBackupImmutable */ - dailyBackupImmutable?: (boolean|null); - - /** BackupRetentionPolicy weeklyBackupImmutable */ - weeklyBackupImmutable?: (boolean|null); - - /** BackupRetentionPolicy monthlyBackupImmutable */ - monthlyBackupImmutable?: (boolean|null); - - /** BackupRetentionPolicy manualBackupImmutable */ - manualBackupImmutable?: (boolean|null); - } - - /** Represents a BackupRetentionPolicy. */ - class BackupRetentionPolicy implements IBackupRetentionPolicy { - - /** - * Constructs a new BackupRetentionPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy); - - /** BackupRetentionPolicy backupMinimumEnforcedRetentionDays. */ - public backupMinimumEnforcedRetentionDays: number; - - /** BackupRetentionPolicy dailyBackupImmutable. */ - public dailyBackupImmutable: boolean; - - /** BackupRetentionPolicy weeklyBackupImmutable. */ - public weeklyBackupImmutable: boolean; - - /** BackupRetentionPolicy monthlyBackupImmutable. */ - public monthlyBackupImmutable: boolean; - - /** BackupRetentionPolicy manualBackupImmutable. */ - public manualBackupImmutable: boolean; - - /** - * Creates a new BackupRetentionPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupRetentionPolicy instance - */ - public static create(properties?: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy): google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy; - - /** - * Encodes the specified BackupRetentionPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. - * @param message BackupRetentionPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupRetentionPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. - * @param message BackupRetentionPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupRetentionPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupRetentionPolicy - * @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.netapp.v1.BackupVault.BackupRetentionPolicy; - - /** - * Decodes a BackupRetentionPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupRetentionPolicy - * @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.netapp.v1.BackupVault.BackupRetentionPolicy; - - /** - * Verifies a BackupRetentionPolicy 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 BackupRetentionPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupRetentionPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy; - - /** - * Creates a plain object from a BackupRetentionPolicy message. Also converts values to other types if specified. - * @param message BackupRetentionPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupRetentionPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupRetentionPolicy - * @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, - READY = 2, - DELETING = 3, - ERROR = 4, - UPDATING = 5 - } - - /** BackupVaultType enum. */ - enum BackupVaultType { - BACKUP_VAULT_TYPE_UNSPECIFIED = 0, - IN_REGION = 1, - CROSS_REGION = 2 - } - - /** EncryptionState enum. */ - enum EncryptionState { - ENCRYPTION_STATE_UNSPECIFIED = 0, - ENCRYPTION_STATE_PENDING = 1, - ENCRYPTION_STATE_COMPLETED = 2, - ENCRYPTION_STATE_IN_PROGRESS = 3, - ENCRYPTION_STATE_FAILED = 4 - } - } - - /** Properties of a GetBackupVaultRequest. */ - interface IGetBackupVaultRequest { - - /** GetBackupVaultRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupVaultRequest. */ - class GetBackupVaultRequest implements IGetBackupVaultRequest { - - /** - * Constructs a new GetBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetBackupVaultRequest); - - /** GetBackupVaultRequest name. */ - public name: string; - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupVaultRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetBackupVaultRequest): google.cloud.netapp.v1.GetBackupVaultRequest; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 a ListBackupVaultsRequest. */ - interface IListBackupVaultsRequest { - - /** ListBackupVaultsRequest parent */ - parent?: (string|null); - - /** ListBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupVaultsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupVaultsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListBackupVaultsRequest. */ - class ListBackupVaultsRequest implements IListBackupVaultsRequest { - - /** - * Constructs a new ListBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListBackupVaultsRequest); - - /** ListBackupVaultsRequest parent. */ - public parent: string; - - /** ListBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** ListBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** ListBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** ListBackupVaultsRequest filter. */ - public filter: string; - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListBackupVaultsRequest): google.cloud.netapp.v1.ListBackupVaultsRequest; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.IListBackupVaultsResponse); - - /** ListBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsResponse): google.cloud.netapp.v1.ListBackupVaultsResponse; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 CreateBackupVaultRequest. */ - interface ICreateBackupVaultRequest { - - /** CreateBackupVaultRequest parent */ - parent?: (string|null); - - /** CreateBackupVaultRequest backupVaultId */ - backupVaultId?: (string|null); - - /** CreateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.netapp.v1.IBackupVault|null); - } - - /** Represents a CreateBackupVaultRequest. */ - class CreateBackupVaultRequest implements ICreateBackupVaultRequest { - - /** - * Constructs a new CreateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateBackupVaultRequest); - - /** CreateBackupVaultRequest parent. */ - public parent: string; - - /** CreateBackupVaultRequest backupVaultId. */ - public backupVaultId: string; - - /** CreateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.netapp.v1.IBackupVault|null); - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateBackupVaultRequest): google.cloud.netapp.v1.CreateBackupVaultRequest; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 DeleteBackupVaultRequest. */ - interface IDeleteBackupVaultRequest { - - /** DeleteBackupVaultRequest name */ - name?: (string|null); - } - - /** Represents a DeleteBackupVaultRequest. */ - class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { - - /** - * Constructs a new DeleteBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteBackupVaultRequest); - - /** DeleteBackupVaultRequest name. */ - public name: string; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupVaultRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteBackupVaultRequest): google.cloud.netapp.v1.DeleteBackupVaultRequest; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 an UpdateBackupVaultRequest. */ - interface IUpdateBackupVaultRequest { - - /** UpdateBackupVaultRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.netapp.v1.IBackupVault|null); - } - - /** Represents an UpdateBackupVaultRequest. */ - class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { - - /** - * Constructs a new UpdateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateBackupVaultRequest); - - /** UpdateBackupVaultRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.netapp.v1.IBackupVault|null); - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateBackupVaultRequest): google.cloud.netapp.v1.UpdateBackupVaultRequest; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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; - } - - /** Represents a NetApp */ - class NetApp extends $protobuf.rpc.Service { - - /** - * Constructs a new NetApp 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 NetApp 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): NetApp; - - /** - * Calls ListStoragePools. - * @param request ListStoragePoolsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListStoragePoolsResponse - */ - public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest, callback: google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback): void; - - /** - * Calls ListStoragePools. - * @param request ListStoragePoolsRequest message or plain object - * @returns Promise - */ - public listStoragePools(request: google.cloud.netapp.v1.IListStoragePoolsRequest): Promise; - - /** - * Calls CreateStoragePool. - * @param request CreateStoragePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback): void; - - /** - * Calls CreateStoragePool. - * @param request CreateStoragePoolRequest message or plain object - * @returns Promise - */ - public createStoragePool(request: google.cloud.netapp.v1.ICreateStoragePoolRequest): Promise; - - /** - * Calls GetStoragePool. - * @param request GetStoragePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StoragePool - */ - public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.GetStoragePoolCallback): void; - - /** - * Calls GetStoragePool. - * @param request GetStoragePoolRequest message or plain object - * @returns Promise - */ - public getStoragePool(request: google.cloud.netapp.v1.IGetStoragePoolRequest): Promise; - - /** - * Calls UpdateStoragePool. - * @param request UpdateStoragePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback): void; - - /** - * Calls UpdateStoragePool. - * @param request UpdateStoragePoolRequest message or plain object - * @returns Promise - */ - public updateStoragePool(request: google.cloud.netapp.v1.IUpdateStoragePoolRequest): Promise; - - /** - * Calls DeleteStoragePool. - * @param request DeleteStoragePoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest, callback: google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback): void; - - /** - * Calls DeleteStoragePool. - * @param request DeleteStoragePoolRequest message or plain object - * @returns Promise - */ - public deleteStoragePool(request: google.cloud.netapp.v1.IDeleteStoragePoolRequest): Promise; - - /** - * Calls ValidateDirectoryService. - * @param request ValidateDirectoryServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public validateDirectoryService(request: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, callback: google.cloud.netapp.v1.NetApp.ValidateDirectoryServiceCallback): void; - - /** - * Calls ValidateDirectoryService. - * @param request ValidateDirectoryServiceRequest message or plain object - * @returns Promise - */ - public validateDirectoryService(request: google.cloud.netapp.v1.IValidateDirectoryServiceRequest): Promise; - - /** - * Calls SwitchActiveReplicaZone. - * @param request SwitchActiveReplicaZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public switchActiveReplicaZone(request: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, callback: google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZoneCallback): void; - - /** - * Calls SwitchActiveReplicaZone. - * @param request SwitchActiveReplicaZoneRequest message or plain object - * @returns Promise - */ - public switchActiveReplicaZone(request: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest): Promise; - - /** - * Calls ListVolumes. - * @param request ListVolumesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVolumesResponse - */ - public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest, callback: google.cloud.netapp.v1.NetApp.ListVolumesCallback): void; - - /** - * Calls ListVolumes. - * @param request ListVolumesRequest message or plain object - * @returns Promise - */ - public listVolumes(request: google.cloud.netapp.v1.IListVolumesRequest): Promise; - - /** - * Calls GetVolume. - * @param request GetVolumeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Volume - */ - public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest, callback: google.cloud.netapp.v1.NetApp.GetVolumeCallback): void; - - /** - * Calls GetVolume. - * @param request GetVolumeRequest message or plain object - * @returns Promise - */ - public getVolume(request: google.cloud.netapp.v1.IGetVolumeRequest): Promise; - - /** - * Calls CreateVolume. - * @param request CreateVolumeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.CreateVolumeCallback): void; - - /** - * Calls CreateVolume. - * @param request CreateVolumeRequest message or plain object - * @returns Promise - */ - public createVolume(request: google.cloud.netapp.v1.ICreateVolumeRequest): Promise; - - /** - * Calls UpdateVolume. - * @param request UpdateVolumeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest, callback: google.cloud.netapp.v1.NetApp.UpdateVolumeCallback): void; - - /** - * Calls UpdateVolume. - * @param request UpdateVolumeRequest message or plain object - * @returns Promise - */ - public updateVolume(request: google.cloud.netapp.v1.IUpdateVolumeRequest): Promise; - - /** - * Calls DeleteVolume. - * @param request DeleteVolumeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest, callback: google.cloud.netapp.v1.NetApp.DeleteVolumeCallback): void; - - /** - * Calls DeleteVolume. - * @param request DeleteVolumeRequest message or plain object - * @returns Promise - */ - public deleteVolume(request: google.cloud.netapp.v1.IDeleteVolumeRequest): Promise; - - /** - * Calls RevertVolume. - * @param request RevertVolumeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest, callback: google.cloud.netapp.v1.NetApp.RevertVolumeCallback): void; - - /** - * Calls RevertVolume. - * @param request RevertVolumeRequest message or plain object - * @returns Promise - */ - public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest): Promise; - - /** - * Calls EstablishVolumePeering. - * @param request EstablishVolumePeeringRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, callback: google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback): void; - - /** - * Calls EstablishVolumePeering. - * @param request EstablishVolumePeeringRequest message or plain object - * @returns Promise - */ - public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): Promise; - - /** - * Calls ListSnapshots. - * @param request ListSnapshotsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSnapshotsResponse - */ - public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest, callback: google.cloud.netapp.v1.NetApp.ListSnapshotsCallback): void; - - /** - * Calls ListSnapshots. - * @param request ListSnapshotsRequest message or plain object - * @returns Promise - */ - public listSnapshots(request: google.cloud.netapp.v1.IListSnapshotsRequest): Promise; - - /** - * Calls GetSnapshot. - * @param request GetSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Snapshot - */ - public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.GetSnapshotCallback): void; - - /** - * Calls GetSnapshot. - * @param request GetSnapshotRequest message or plain object - * @returns Promise - */ - public getSnapshot(request: google.cloud.netapp.v1.IGetSnapshotRequest): Promise; - - /** - * Calls CreateSnapshot. - * @param request CreateSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.CreateSnapshotCallback): void; - - /** - * Calls CreateSnapshot. - * @param request CreateSnapshotRequest message or plain object - * @returns Promise - */ - public createSnapshot(request: google.cloud.netapp.v1.ICreateSnapshotRequest): Promise; - - /** - * Calls DeleteSnapshot. - * @param request DeleteSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback): void; - - /** - * Calls DeleteSnapshot. - * @param request DeleteSnapshotRequest message or plain object - * @returns Promise - */ - public deleteSnapshot(request: google.cloud.netapp.v1.IDeleteSnapshotRequest): Promise; - - /** - * Calls UpdateSnapshot. - * @param request UpdateSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest, callback: google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback): void; - - /** - * Calls UpdateSnapshot. - * @param request UpdateSnapshotRequest message or plain object - * @returns Promise - */ - public updateSnapshot(request: google.cloud.netapp.v1.IUpdateSnapshotRequest): Promise; - - /** - * Calls ListActiveDirectories. - * @param request ListActiveDirectoriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse - */ - public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest, callback: google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback): void; - - /** - * Calls ListActiveDirectories. - * @param request ListActiveDirectoriesRequest message or plain object - * @returns Promise - */ - public listActiveDirectories(request: google.cloud.netapp.v1.IListActiveDirectoriesRequest): Promise; - - /** - * Calls GetActiveDirectory. - * @param request GetActiveDirectoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ActiveDirectory - */ - public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback): void; - - /** - * Calls GetActiveDirectory. - * @param request GetActiveDirectoryRequest message or plain object - * @returns Promise - */ - public getActiveDirectory(request: google.cloud.netapp.v1.IGetActiveDirectoryRequest): Promise; - - /** - * Calls CreateActiveDirectory. - * @param request CreateActiveDirectoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback): void; - - /** - * Calls CreateActiveDirectory. - * @param request CreateActiveDirectoryRequest message or plain object - * @returns Promise - */ - public createActiveDirectory(request: google.cloud.netapp.v1.ICreateActiveDirectoryRequest): Promise; - - /** - * Calls UpdateActiveDirectory. - * @param request UpdateActiveDirectoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback): void; - - /** - * Calls UpdateActiveDirectory. - * @param request UpdateActiveDirectoryRequest message or plain object - * @returns Promise - */ - public updateActiveDirectory(request: google.cloud.netapp.v1.IUpdateActiveDirectoryRequest): Promise; - - /** - * Calls DeleteActiveDirectory. - * @param request DeleteActiveDirectoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, callback: google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback): void; - - /** - * Calls DeleteActiveDirectory. - * @param request DeleteActiveDirectoryRequest message or plain object - * @returns Promise - */ - public deleteActiveDirectory(request: google.cloud.netapp.v1.IDeleteActiveDirectoryRequest): Promise; - - /** - * Calls ListKmsConfigs. - * @param request ListKmsConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListKmsConfigsResponse - */ - public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest, callback: google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback): void; - - /** - * Calls ListKmsConfigs. - * @param request ListKmsConfigsRequest message or plain object - * @returns Promise - */ - public listKmsConfigs(request: google.cloud.netapp.v1.IListKmsConfigsRequest): Promise; - - /** - * Calls CreateKmsConfig. - * @param request CreateKmsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback): void; - - /** - * Calls CreateKmsConfig. - * @param request CreateKmsConfigRequest message or plain object - * @returns Promise - */ - public createKmsConfig(request: google.cloud.netapp.v1.ICreateKmsConfigRequest): Promise; - - /** - * Calls GetKmsConfig. - * @param request GetKmsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and KmsConfig - */ - public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.GetKmsConfigCallback): void; - - /** - * Calls GetKmsConfig. - * @param request GetKmsConfigRequest message or plain object - * @returns Promise - */ - public getKmsConfig(request: google.cloud.netapp.v1.IGetKmsConfigRequest): Promise; - - /** - * Calls UpdateKmsConfig. - * @param request UpdateKmsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback): void; - - /** - * Calls UpdateKmsConfig. - * @param request UpdateKmsConfigRequest message or plain object - * @returns Promise - */ - public updateKmsConfig(request: google.cloud.netapp.v1.IUpdateKmsConfigRequest): Promise; - - /** - * Calls EncryptVolumes. - * @param request EncryptVolumesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest, callback: google.cloud.netapp.v1.NetApp.EncryptVolumesCallback): void; - - /** - * Calls EncryptVolumes. - * @param request EncryptVolumesRequest message or plain object - * @returns Promise - */ - public encryptVolumes(request: google.cloud.netapp.v1.IEncryptVolumesRequest): Promise; - - /** - * Calls VerifyKmsConfig. - * @param request VerifyKmsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse - */ - public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback): void; - - /** - * Calls VerifyKmsConfig. - * @param request VerifyKmsConfigRequest message or plain object - * @returns Promise - */ - public verifyKmsConfig(request: google.cloud.netapp.v1.IVerifyKmsConfigRequest): Promise; - - /** - * Calls DeleteKmsConfig. - * @param request DeleteKmsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest, callback: google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback): void; - - /** - * Calls DeleteKmsConfig. - * @param request DeleteKmsConfigRequest message or plain object - * @returns Promise - */ - public deleteKmsConfig(request: google.cloud.netapp.v1.IDeleteKmsConfigRequest): Promise; - - /** - * Calls ListReplications. - * @param request ListReplicationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListReplicationsResponse - */ - public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest, callback: google.cloud.netapp.v1.NetApp.ListReplicationsCallback): void; - - /** - * Calls ListReplications. - * @param request ListReplicationsRequest message or plain object - * @returns Promise - */ - public listReplications(request: google.cloud.netapp.v1.IListReplicationsRequest): Promise; - - /** - * Calls GetReplication. - * @param request GetReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Replication - */ - public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest, callback: google.cloud.netapp.v1.NetApp.GetReplicationCallback): void; - - /** - * Calls GetReplication. - * @param request GetReplicationRequest message or plain object - * @returns Promise - */ - public getReplication(request: google.cloud.netapp.v1.IGetReplicationRequest): Promise; - - /** - * Calls CreateReplication. - * @param request CreateReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.CreateReplicationCallback): void; - - /** - * Calls CreateReplication. - * @param request CreateReplicationRequest message or plain object - * @returns Promise - */ - public createReplication(request: google.cloud.netapp.v1.ICreateReplicationRequest): Promise; - - /** - * Calls DeleteReplication. - * @param request DeleteReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest, callback: google.cloud.netapp.v1.NetApp.DeleteReplicationCallback): void; - - /** - * Calls DeleteReplication. - * @param request DeleteReplicationRequest message or plain object - * @returns Promise - */ - public deleteReplication(request: google.cloud.netapp.v1.IDeleteReplicationRequest): Promise; - - /** - * Calls UpdateReplication. - * @param request UpdateReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest, callback: google.cloud.netapp.v1.NetApp.UpdateReplicationCallback): void; - - /** - * Calls UpdateReplication. - * @param request UpdateReplicationRequest message or plain object - * @returns Promise - */ - public updateReplication(request: google.cloud.netapp.v1.IUpdateReplicationRequest): Promise; - - /** - * Calls StopReplication. - * @param request StopReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest, callback: google.cloud.netapp.v1.NetApp.StopReplicationCallback): void; - - /** - * Calls StopReplication. - * @param request StopReplicationRequest message or plain object - * @returns Promise - */ - public stopReplication(request: google.cloud.netapp.v1.IStopReplicationRequest): Promise; - - /** - * Calls ResumeReplication. - * @param request ResumeReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest, callback: google.cloud.netapp.v1.NetApp.ResumeReplicationCallback): void; - - /** - * Calls ResumeReplication. - * @param request ResumeReplicationRequest message or plain object - * @returns Promise - */ - public resumeReplication(request: google.cloud.netapp.v1.IResumeReplicationRequest): Promise; - - /** - * Calls ReverseReplicationDirection. - * @param request ReverseReplicationDirectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, callback: google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback): void; - - /** - * Calls ReverseReplicationDirection. - * @param request ReverseReplicationDirectionRequest message or plain object - * @returns Promise - */ - public reverseReplicationDirection(request: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): Promise; - - /** - * Calls EstablishPeering. - * @param request EstablishPeeringRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public establishPeering(request: google.cloud.netapp.v1.IEstablishPeeringRequest, callback: google.cloud.netapp.v1.NetApp.EstablishPeeringCallback): void; - - /** - * Calls EstablishPeering. - * @param request EstablishPeeringRequest message or plain object - * @returns Promise - */ - public establishPeering(request: google.cloud.netapp.v1.IEstablishPeeringRequest): Promise; - - /** - * Calls SyncReplication. - * @param request SyncReplicationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public syncReplication(request: google.cloud.netapp.v1.ISyncReplicationRequest, callback: google.cloud.netapp.v1.NetApp.SyncReplicationCallback): void; - - /** - * Calls SyncReplication. - * @param request SyncReplicationRequest message or plain object - * @returns Promise - */ - public syncReplication(request: google.cloud.netapp.v1.ISyncReplicationRequest): 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.netapp.v1.ICreateBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupVaultCallback): void; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @returns Promise - */ - public createBackupVault(request: google.cloud.netapp.v1.ICreateBackupVaultRequest): 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.netapp.v1.IGetBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupVaultCallback): void; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @returns Promise - */ - public getBackupVault(request: google.cloud.netapp.v1.IGetBackupVaultRequest): 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.netapp.v1.IListBackupVaultsRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupVaultsCallback): void; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @returns Promise - */ - public listBackupVaults(request: google.cloud.netapp.v1.IListBackupVaultsRequest): 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.netapp.v1.IUpdateBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupVaultCallback): void; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @returns Promise - */ - public updateBackupVault(request: google.cloud.netapp.v1.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.netapp.v1.IDeleteBackupVaultRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupVaultCallback): void; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @returns Promise - */ - public deleteBackupVault(request: google.cloud.netapp.v1.IDeleteBackupVaultRequest): Promise; - - /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackup(request: google.cloud.netapp.v1.ICreateBackupRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupCallback): void; - - /** - * Calls CreateBackup. - * @param request CreateBackupRequest message or plain object - * @returns Promise - */ - public createBackup(request: google.cloud.netapp.v1.ICreateBackupRequest): 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.netapp.v1.IGetBackupRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupCallback): void; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise - */ - public getBackup(request: google.cloud.netapp.v1.IGetBackupRequest): 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.netapp.v1.IListBackupsRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupsCallback): void; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise - */ - public listBackups(request: google.cloud.netapp.v1.IListBackupsRequest): 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.netapp.v1.IDeleteBackupRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupCallback): void; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise - */ - public deleteBackup(request: google.cloud.netapp.v1.IDeleteBackupRequest): 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.netapp.v1.IUpdateBackupRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupCallback): void; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @returns Promise - */ - public updateBackup(request: google.cloud.netapp.v1.IUpdateBackupRequest): Promise; - - /** - * Calls CreateBackupPolicy. - * @param request CreateBackupPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPolicy(request: google.cloud.netapp.v1.ICreateBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.CreateBackupPolicyCallback): void; - - /** - * Calls CreateBackupPolicy. - * @param request CreateBackupPolicyRequest message or plain object - * @returns Promise - */ - public createBackupPolicy(request: google.cloud.netapp.v1.ICreateBackupPolicyRequest): Promise; - - /** - * Calls GetBackupPolicy. - * @param request GetBackupPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPolicy - */ - public getBackupPolicy(request: google.cloud.netapp.v1.IGetBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.GetBackupPolicyCallback): void; - - /** - * Calls GetBackupPolicy. - * @param request GetBackupPolicyRequest message or plain object - * @returns Promise - */ - public getBackupPolicy(request: google.cloud.netapp.v1.IGetBackupPolicyRequest): Promise; - - /** - * Calls ListBackupPolicies. - * @param request ListBackupPoliciesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPoliciesResponse - */ - public listBackupPolicies(request: google.cloud.netapp.v1.IListBackupPoliciesRequest, callback: google.cloud.netapp.v1.NetApp.ListBackupPoliciesCallback): void; - - /** - * Calls ListBackupPolicies. - * @param request ListBackupPoliciesRequest message or plain object - * @returns Promise - */ - public listBackupPolicies(request: google.cloud.netapp.v1.IListBackupPoliciesRequest): Promise; - - /** - * Calls UpdateBackupPolicy. - * @param request UpdateBackupPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackupPolicy(request: google.cloud.netapp.v1.IUpdateBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.UpdateBackupPolicyCallback): void; - - /** - * Calls UpdateBackupPolicy. - * @param request UpdateBackupPolicyRequest message or plain object - * @returns Promise - */ - public updateBackupPolicy(request: google.cloud.netapp.v1.IUpdateBackupPolicyRequest): Promise; - - /** - * Calls DeleteBackupPolicy. - * @param request DeleteBackupPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPolicy(request: google.cloud.netapp.v1.IDeleteBackupPolicyRequest, callback: google.cloud.netapp.v1.NetApp.DeleteBackupPolicyCallback): void; - - /** - * Calls DeleteBackupPolicy. - * @param request DeleteBackupPolicyRequest message or plain object - * @returns Promise - */ - public deleteBackupPolicy(request: google.cloud.netapp.v1.IDeleteBackupPolicyRequest): Promise; - - /** - * Calls ListQuotaRules. - * @param request ListQuotaRulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListQuotaRulesResponse - */ - public listQuotaRules(request: google.cloud.netapp.v1.IListQuotaRulesRequest, callback: google.cloud.netapp.v1.NetApp.ListQuotaRulesCallback): void; - - /** - * Calls ListQuotaRules. - * @param request ListQuotaRulesRequest message or plain object - * @returns Promise - */ - public listQuotaRules(request: google.cloud.netapp.v1.IListQuotaRulesRequest): Promise; - - /** - * Calls GetQuotaRule. - * @param request GetQuotaRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QuotaRule - */ - public getQuotaRule(request: google.cloud.netapp.v1.IGetQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.GetQuotaRuleCallback): void; - - /** - * Calls GetQuotaRule. - * @param request GetQuotaRuleRequest message or plain object - * @returns Promise - */ - public getQuotaRule(request: google.cloud.netapp.v1.IGetQuotaRuleRequest): Promise; - - /** - * Calls CreateQuotaRule. - * @param request CreateQuotaRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createQuotaRule(request: google.cloud.netapp.v1.ICreateQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.CreateQuotaRuleCallback): void; - - /** - * Calls CreateQuotaRule. - * @param request CreateQuotaRuleRequest message or plain object - * @returns Promise - */ - public createQuotaRule(request: google.cloud.netapp.v1.ICreateQuotaRuleRequest): Promise; - - /** - * Calls UpdateQuotaRule. - * @param request UpdateQuotaRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateQuotaRule(request: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.UpdateQuotaRuleCallback): void; - - /** - * Calls UpdateQuotaRule. - * @param request UpdateQuotaRuleRequest message or plain object - * @returns Promise - */ - public updateQuotaRule(request: google.cloud.netapp.v1.IUpdateQuotaRuleRequest): Promise; - - /** - * Calls DeleteQuotaRule. - * @param request DeleteQuotaRuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteQuotaRule(request: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, callback: google.cloud.netapp.v1.NetApp.DeleteQuotaRuleCallback): void; - - /** - * Calls DeleteQuotaRule. - * @param request DeleteQuotaRuleRequest message or plain object - * @returns Promise - */ - public deleteQuotaRule(request: google.cloud.netapp.v1.IDeleteQuotaRuleRequest): Promise; - - /** - * Calls RestoreBackupFiles. - * @param request RestoreBackupFilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restoreBackupFiles(request: google.cloud.netapp.v1.IRestoreBackupFilesRequest, callback: google.cloud.netapp.v1.NetApp.RestoreBackupFilesCallback): void; - - /** - * Calls RestoreBackupFiles. - * @param request RestoreBackupFilesRequest message or plain object - * @returns Promise - */ - public restoreBackupFiles(request: google.cloud.netapp.v1.IRestoreBackupFilesRequest): Promise; - - /** - * Calls ListHostGroups. - * @param request ListHostGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListHostGroupsResponse - */ - public listHostGroups(request: google.cloud.netapp.v1.IListHostGroupsRequest, callback: google.cloud.netapp.v1.NetApp.ListHostGroupsCallback): void; - - /** - * Calls ListHostGroups. - * @param request ListHostGroupsRequest message or plain object - * @returns Promise - */ - public listHostGroups(request: google.cloud.netapp.v1.IListHostGroupsRequest): Promise; - - /** - * Calls GetHostGroup. - * @param request GetHostGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and HostGroup - */ - public getHostGroup(request: google.cloud.netapp.v1.IGetHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.GetHostGroupCallback): void; - - /** - * Calls GetHostGroup. - * @param request GetHostGroupRequest message or plain object - * @returns Promise - */ - public getHostGroup(request: google.cloud.netapp.v1.IGetHostGroupRequest): Promise; - - /** - * Calls CreateHostGroup. - * @param request CreateHostGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createHostGroup(request: google.cloud.netapp.v1.ICreateHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.CreateHostGroupCallback): void; - - /** - * Calls CreateHostGroup. - * @param request CreateHostGroupRequest message or plain object - * @returns Promise - */ - public createHostGroup(request: google.cloud.netapp.v1.ICreateHostGroupRequest): Promise; - - /** - * Calls UpdateHostGroup. - * @param request UpdateHostGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateHostGroup(request: google.cloud.netapp.v1.IUpdateHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.UpdateHostGroupCallback): void; - - /** - * Calls UpdateHostGroup. - * @param request UpdateHostGroupRequest message or plain object - * @returns Promise - */ - public updateHostGroup(request: google.cloud.netapp.v1.IUpdateHostGroupRequest): Promise; - - /** - * Calls DeleteHostGroup. - * @param request DeleteHostGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteHostGroup(request: google.cloud.netapp.v1.IDeleteHostGroupRequest, callback: google.cloud.netapp.v1.NetApp.DeleteHostGroupCallback): void; - - /** - * Calls DeleteHostGroup. - * @param request DeleteHostGroupRequest message or plain object - * @returns Promise - */ - public deleteHostGroup(request: google.cloud.netapp.v1.IDeleteHostGroupRequest): Promise; - - /** - * Calls ExecuteOntapPost. - * @param request ExecuteOntapPostRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse - */ - public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback): void; - - /** - * Calls ExecuteOntapPost. - * @param request ExecuteOntapPostRequest message or plain object - * @returns Promise - */ - public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest): Promise; - - /** - * Calls ExecuteOntapGet. - * @param request ExecuteOntapGetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse - */ - public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback): void; - - /** - * Calls ExecuteOntapGet. - * @param request ExecuteOntapGetRequest message or plain object - * @returns Promise - */ - public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest): Promise; - - /** - * Calls ExecuteOntapDelete. - * @param request ExecuteOntapDeleteRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse - */ - public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback): void; - - /** - * Calls ExecuteOntapDelete. - * @param request ExecuteOntapDeleteRequest message or plain object - * @returns Promise - */ - public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): Promise; - - /** - * Calls ExecuteOntapPatch. - * @param request ExecuteOntapPatchRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse - */ - public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback): void; - - /** - * Calls ExecuteOntapPatch. - * @param request ExecuteOntapPatchRequest message or plain object - * @returns Promise - */ - public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest): Promise; - } - - namespace NetApp { - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. - * @param error Error, if any - * @param [response] ListStoragePoolsResponse - */ - type ListStoragePoolsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListStoragePoolsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. - * @param error Error, if any - * @param [response] StoragePool - */ - type GetStoragePoolCallback = (error: (Error|null), response?: google.cloud.netapp.v1.StoragePool) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteStoragePoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|validateDirectoryService}. - * @param error Error, if any - * @param [response] Operation - */ - type ValidateDirectoryServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|switchActiveReplicaZone}. - * @param error Error, if any - * @param [response] Operation - */ - type SwitchActiveReplicaZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. - * @param error Error, if any - * @param [response] ListVolumesResponse - */ - type ListVolumesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListVolumesResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. - * @param error Error, if any - * @param [response] Volume - */ - type GetVolumeCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Volume) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. - * @param error Error, if any - * @param [response] Operation - */ - type RevertVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. - * @param error Error, if any - * @param [response] Operation - */ - type EstablishVolumePeeringCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. - * @param error Error, if any - * @param [response] ListSnapshotsResponse - */ - type ListSnapshotsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListSnapshotsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. - * @param error Error, if any - * @param [response] Snapshot - */ - type GetSnapshotCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Snapshot) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. - * @param error Error, if any - * @param [response] ListActiveDirectoriesResponse - */ - type ListActiveDirectoriesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListActiveDirectoriesResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. - * @param error Error, if any - * @param [response] ActiveDirectory - */ - type GetActiveDirectoryCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ActiveDirectory) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteActiveDirectoryCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. - * @param error Error, if any - * @param [response] ListKmsConfigsResponse - */ - type ListKmsConfigsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListKmsConfigsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. - * @param error Error, if any - * @param [response] KmsConfig - */ - type GetKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.KmsConfig) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. - * @param error Error, if any - * @param [response] Operation - */ - type EncryptVolumesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. - * @param error Error, if any - * @param [response] VerifyKmsConfigResponse - */ - type VerifyKmsConfigCallback = (error: (Error|null), response?: google.cloud.netapp.v1.VerifyKmsConfigResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteKmsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. - * @param error Error, if any - * @param [response] ListReplicationsResponse - */ - type ListReplicationsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListReplicationsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. - * @param error Error, if any - * @param [response] Replication - */ - type GetReplicationCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Replication) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type StopReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type ResumeReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. - * @param error Error, if any - * @param [response] Operation - */ - type ReverseReplicationDirectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishPeering}. - * @param error Error, if any - * @param [response] Operation - */ - type EstablishPeeringCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|syncReplication}. - * @param error Error, if any - * @param [response] Operation - */ - type SyncReplicationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|getBackupVault}. - * @param error Error, if any - * @param [response] BackupVault - */ - type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.netapp.v1.BackupVault) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupVaults}. - * @param error Error, if any - * @param [response] ListBackupVaultsResponse - */ - type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|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.netapp.v1.NetApp|createBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackup}. - * @param error Error, if any - * @param [response] Backup - */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.netapp.v1.Backup) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse - */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|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.netapp.v1.NetApp|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.netapp.v1.NetApp|createBackupPolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupPolicy}. - * @param error Error, if any - * @param [response] BackupPolicy - */ - type GetBackupPolicyCallback = (error: (Error|null), response?: google.cloud.netapp.v1.BackupPolicy) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupPolicies}. - * @param error Error, if any - * @param [response] ListBackupPoliciesResponse - */ - type ListBackupPoliciesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListBackupPoliciesResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupPolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupPolicy}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listQuotaRules}. - * @param error Error, if any - * @param [response] ListQuotaRulesResponse - */ - type ListQuotaRulesCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListQuotaRulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getQuotaRule}. - * @param error Error, if any - * @param [response] QuotaRule - */ - type GetQuotaRuleCallback = (error: (Error|null), response?: google.cloud.netapp.v1.QuotaRule) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createQuotaRule}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateQuotaRule}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteQuotaRule}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteQuotaRuleCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|restoreBackupFiles}. - * @param error Error, if any - * @param [response] Operation - */ - type RestoreBackupFilesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listHostGroups}. - * @param error Error, if any - * @param [response] ListHostGroupsResponse - */ - type ListHostGroupsCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ListHostGroupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getHostGroup}. - * @param error Error, if any - * @param [response] HostGroup - */ - type GetHostGroupCallback = (error: (Error|null), response?: google.cloud.netapp.v1.HostGroup) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createHostGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateHostGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteHostGroup}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. - * @param error Error, if any - * @param [response] ExecuteOntapPostResponse - */ - type ExecuteOntapPostCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPostResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. - * @param error Error, if any - * @param [response] ExecuteOntapGetResponse - */ - type ExecuteOntapGetCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapGetResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. - * @param error Error, if any - * @param [response] ExecuteOntapDeleteResponse - */ - type ExecuteOntapDeleteCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapDeleteResponse) => void; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. - * @param error Error, if any - * @param [response] ExecuteOntapPatchResponse - */ - type ExecuteOntapPatchCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPatchResponse) => void; - } - - /** 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); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.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; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.netapp.v1.IOperationMetadata): google.cloud.netapp.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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.netapp.v1.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 ListHostGroupsRequest. */ - interface IListHostGroupsRequest { - - /** ListHostGroupsRequest parent */ - parent?: (string|null); - - /** ListHostGroupsRequest pageSize */ - pageSize?: (number|null); - - /** ListHostGroupsRequest pageToken */ - pageToken?: (string|null); - - /** ListHostGroupsRequest filter */ - filter?: (string|null); - - /** ListHostGroupsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListHostGroupsRequest. */ - class ListHostGroupsRequest implements IListHostGroupsRequest { - - /** - * Constructs a new ListHostGroupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListHostGroupsRequest); - - /** ListHostGroupsRequest parent. */ - public parent: string; - - /** ListHostGroupsRequest pageSize. */ - public pageSize: number; - - /** ListHostGroupsRequest pageToken. */ - public pageToken: string; - - /** ListHostGroupsRequest filter. */ - public filter: string; - - /** ListHostGroupsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListHostGroupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListHostGroupsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListHostGroupsRequest): google.cloud.netapp.v1.ListHostGroupsRequest; - - /** - * Encodes the specified ListHostGroupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. - * @param message ListHostGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListHostGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListHostGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. - * @param message ListHostGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListHostGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListHostGroupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListHostGroupsRequest - * @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.netapp.v1.ListHostGroupsRequest; - - /** - * Decodes a ListHostGroupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListHostGroupsRequest - * @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.netapp.v1.ListHostGroupsRequest; - - /** - * Verifies a ListHostGroupsRequest 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 ListHostGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListHostGroupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListHostGroupsRequest; - - /** - * Creates a plain object from a ListHostGroupsRequest message. Also converts values to other types if specified. - * @param message ListHostGroupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListHostGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListHostGroupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListHostGroupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListHostGroupsResponse. */ - interface IListHostGroupsResponse { - - /** ListHostGroupsResponse hostGroups */ - hostGroups?: (google.cloud.netapp.v1.IHostGroup[]|null); - - /** ListHostGroupsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListHostGroupsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListHostGroupsResponse. */ - class ListHostGroupsResponse implements IListHostGroupsResponse { - - /** - * Constructs a new ListHostGroupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListHostGroupsResponse); - - /** ListHostGroupsResponse hostGroups. */ - public hostGroups: google.cloud.netapp.v1.IHostGroup[]; - - /** ListHostGroupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListHostGroupsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListHostGroupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListHostGroupsResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListHostGroupsResponse): google.cloud.netapp.v1.ListHostGroupsResponse; - - /** - * Encodes the specified ListHostGroupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. - * @param message ListHostGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListHostGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListHostGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. - * @param message ListHostGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListHostGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListHostGroupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListHostGroupsResponse - * @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.netapp.v1.ListHostGroupsResponse; - - /** - * Decodes a ListHostGroupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListHostGroupsResponse - * @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.netapp.v1.ListHostGroupsResponse; - - /** - * Verifies a ListHostGroupsResponse 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 ListHostGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListHostGroupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListHostGroupsResponse; - - /** - * Creates a plain object from a ListHostGroupsResponse message. Also converts values to other types if specified. - * @param message ListHostGroupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListHostGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListHostGroupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListHostGroupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetHostGroupRequest. */ - interface IGetHostGroupRequest { - - /** GetHostGroupRequest name */ - name?: (string|null); - } - - /** Represents a GetHostGroupRequest. */ - class GetHostGroupRequest implements IGetHostGroupRequest { - - /** - * Constructs a new GetHostGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetHostGroupRequest); - - /** GetHostGroupRequest name. */ - public name: string; - - /** - * Creates a new GetHostGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetHostGroupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetHostGroupRequest): google.cloud.netapp.v1.GetHostGroupRequest; - - /** - * Encodes the specified GetHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. - * @param message GetHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. - * @param message GetHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetHostGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetHostGroupRequest - * @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.netapp.v1.GetHostGroupRequest; - - /** - * Decodes a GetHostGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetHostGroupRequest - * @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.netapp.v1.GetHostGroupRequest; - - /** - * Verifies a GetHostGroupRequest 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 GetHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetHostGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetHostGroupRequest; - - /** - * Creates a plain object from a GetHostGroupRequest message. Also converts values to other types if specified. - * @param message GetHostGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetHostGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetHostGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateHostGroupRequest. */ - interface ICreateHostGroupRequest { - - /** CreateHostGroupRequest parent */ - parent?: (string|null); - - /** CreateHostGroupRequest hostGroup */ - hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); - - /** CreateHostGroupRequest hostGroupId */ - hostGroupId?: (string|null); - } - - /** Represents a CreateHostGroupRequest. */ - class CreateHostGroupRequest implements ICreateHostGroupRequest { - - /** - * Constructs a new CreateHostGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateHostGroupRequest); - - /** CreateHostGroupRequest parent. */ - public parent: string; - - /** CreateHostGroupRequest hostGroup. */ - public hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); - - /** CreateHostGroupRequest hostGroupId. */ - public hostGroupId: string; - - /** - * Creates a new CreateHostGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateHostGroupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateHostGroupRequest): google.cloud.netapp.v1.CreateHostGroupRequest; - - /** - * Encodes the specified CreateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. - * @param message CreateHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. - * @param message CreateHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateHostGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateHostGroupRequest - * @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.netapp.v1.CreateHostGroupRequest; - - /** - * Decodes a CreateHostGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateHostGroupRequest - * @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.netapp.v1.CreateHostGroupRequest; - - /** - * Verifies a CreateHostGroupRequest 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 CreateHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateHostGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateHostGroupRequest; - - /** - * Creates a plain object from a CreateHostGroupRequest message. Also converts values to other types if specified. - * @param message CreateHostGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateHostGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateHostGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateHostGroupRequest. */ - interface IUpdateHostGroupRequest { - - /** UpdateHostGroupRequest hostGroup */ - hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); - - /** UpdateHostGroupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateHostGroupRequest. */ - class UpdateHostGroupRequest implements IUpdateHostGroupRequest { - - /** - * Constructs a new UpdateHostGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateHostGroupRequest); - - /** UpdateHostGroupRequest hostGroup. */ - public hostGroup?: (google.cloud.netapp.v1.IHostGroup|null); - - /** UpdateHostGroupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateHostGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateHostGroupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateHostGroupRequest): google.cloud.netapp.v1.UpdateHostGroupRequest; - - /** - * Encodes the specified UpdateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. - * @param message UpdateHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. - * @param message UpdateHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateHostGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateHostGroupRequest - * @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.netapp.v1.UpdateHostGroupRequest; - - /** - * Decodes an UpdateHostGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateHostGroupRequest - * @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.netapp.v1.UpdateHostGroupRequest; - - /** - * Verifies an UpdateHostGroupRequest 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 UpdateHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateHostGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateHostGroupRequest; - - /** - * Creates a plain object from an UpdateHostGroupRequest message. Also converts values to other types if specified. - * @param message UpdateHostGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateHostGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateHostGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteHostGroupRequest. */ - interface IDeleteHostGroupRequest { - - /** DeleteHostGroupRequest name */ - name?: (string|null); - } - - /** Represents a DeleteHostGroupRequest. */ - class DeleteHostGroupRequest implements IDeleteHostGroupRequest { - - /** - * Constructs a new DeleteHostGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteHostGroupRequest); - - /** DeleteHostGroupRequest name. */ - public name: string; - - /** - * Creates a new DeleteHostGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteHostGroupRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteHostGroupRequest): google.cloud.netapp.v1.DeleteHostGroupRequest; - - /** - * Encodes the specified DeleteHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. - * @param message DeleteHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. - * @param message DeleteHostGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteHostGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteHostGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteHostGroupRequest - * @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.netapp.v1.DeleteHostGroupRequest; - - /** - * Decodes a DeleteHostGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteHostGroupRequest - * @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.netapp.v1.DeleteHostGroupRequest; - - /** - * Verifies a DeleteHostGroupRequest 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 DeleteHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteHostGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteHostGroupRequest; - - /** - * Creates a plain object from a DeleteHostGroupRequest message. Also converts values to other types if specified. - * @param message DeleteHostGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteHostGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteHostGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteHostGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HostGroup. */ - interface IHostGroup { - - /** HostGroup name */ - name?: (string|null); - - /** HostGroup type */ - type?: (google.cloud.netapp.v1.HostGroup.Type|keyof typeof google.cloud.netapp.v1.HostGroup.Type|null); - - /** HostGroup state */ - state?: (google.cloud.netapp.v1.HostGroup.State|keyof typeof google.cloud.netapp.v1.HostGroup.State|null); - - /** HostGroup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** HostGroup hosts */ - hosts?: (string[]|null); - - /** HostGroup osType */ - osType?: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType|null); - - /** HostGroup description */ - description?: (string|null); - - /** HostGroup labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a HostGroup. */ - class HostGroup implements IHostGroup { - - /** - * Constructs a new HostGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IHostGroup); - - /** HostGroup name. */ - public name: string; - - /** HostGroup type. */ - public type: (google.cloud.netapp.v1.HostGroup.Type|keyof typeof google.cloud.netapp.v1.HostGroup.Type); - - /** HostGroup state. */ - public state: (google.cloud.netapp.v1.HostGroup.State|keyof typeof google.cloud.netapp.v1.HostGroup.State); - - /** HostGroup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** HostGroup hosts. */ - public hosts: string[]; - - /** HostGroup osType. */ - public osType: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType); - - /** HostGroup description. */ - public description: string; - - /** HostGroup labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new HostGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns HostGroup instance - */ - public static create(properties?: google.cloud.netapp.v1.IHostGroup): google.cloud.netapp.v1.HostGroup; - - /** - * Encodes the specified HostGroup message. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. - * @param message HostGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IHostGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HostGroup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. - * @param message HostGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IHostGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HostGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HostGroup - * @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.netapp.v1.HostGroup; - - /** - * Decodes a HostGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HostGroup - * @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.netapp.v1.HostGroup; - - /** - * Verifies a HostGroup 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 HostGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HostGroup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HostGroup; - - /** - * Creates a plain object from a HostGroup message. Also converts values to other types if specified. - * @param message HostGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.HostGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HostGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HostGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace HostGroup { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ISCSI_INITIATOR = 1 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - DISABLED = 5 - } - } - - /** ServiceLevel enum. */ - enum ServiceLevel { - SERVICE_LEVEL_UNSPECIFIED = 0, - PREMIUM = 1, - EXTREME = 2, - STANDARD = 3, - FLEX = 4 - } - - /** FlexPerformance enum. */ - enum FlexPerformance { - FLEX_PERFORMANCE_UNSPECIFIED = 0, - FLEX_PERFORMANCE_DEFAULT = 1, - FLEX_PERFORMANCE_CUSTOM = 2 - } - - /** EncryptionType enum. */ - enum EncryptionType { - ENCRYPTION_TYPE_UNSPECIFIED = 0, - SERVICE_MANAGED = 1, - CLOUD_KMS = 2 - } - - /** DirectoryServiceType enum. */ - enum DirectoryServiceType { - DIRECTORY_SERVICE_TYPE_UNSPECIFIED = 0, - ACTIVE_DIRECTORY = 1 - } - - /** StoragePoolType enum. */ - enum StoragePoolType { - STORAGE_POOL_TYPE_UNSPECIFIED = 0, - FILE = 1, - UNIFIED = 2 - } - - /** HybridReplicationSchedule enum. */ - enum HybridReplicationSchedule { - HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED = 0, - EVERY_10_MINUTES = 1, - HOURLY = 2, - DAILY = 3 - } - - /** QosType enum. */ - enum QosType { - QOS_TYPE_UNSPECIFIED = 0, - AUTO = 1, - MANUAL = 2 - } - - /** OsType enum. */ - enum OsType { - OS_TYPE_UNSPECIFIED = 0, - LINUX = 1, - WINDOWS = 2, - ESXI = 3 - } - - /** Properties of a LocationMetadata. */ - interface ILocationMetadata { - - /** LocationMetadata supportedServiceLevels */ - supportedServiceLevels?: (google.cloud.netapp.v1.ServiceLevel[]|null); - - /** LocationMetadata supportedFlexPerformance */ - supportedFlexPerformance?: (google.cloud.netapp.v1.FlexPerformance[]|null); - - /** LocationMetadata hasVcp */ - hasVcp?: (boolean|null); - - /** LocationMetadata hasOntapProxy */ - hasOntapProxy?: (boolean|null); - } - - /** Represents a LocationMetadata. */ - class LocationMetadata implements ILocationMetadata { - - /** - * Constructs a new LocationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ILocationMetadata); - - /** LocationMetadata supportedServiceLevels. */ - public supportedServiceLevels: google.cloud.netapp.v1.ServiceLevel[]; - - /** LocationMetadata supportedFlexPerformance. */ - public supportedFlexPerformance: google.cloud.netapp.v1.FlexPerformance[]; - - /** LocationMetadata hasVcp. */ - public hasVcp: boolean; - - /** LocationMetadata hasOntapProxy. */ - public hasOntapProxy: boolean; - - /** - * Creates a new LocationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationMetadata instance - */ - public static create(properties?: google.cloud.netapp.v1.ILocationMetadata): google.cloud.netapp.v1.LocationMetadata; - - /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. - * @param message LocationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ILocationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationMetadata - * @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.netapp.v1.LocationMetadata; - - /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationMetadata - * @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.netapp.v1.LocationMetadata; - - /** - * Verifies a LocationMetadata 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 LocationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.LocationMetadata; - - /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @param message LocationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserCommands. */ - interface IUserCommands { - - /** UserCommands commands */ - commands?: (string[]|null); - } - - /** Represents a UserCommands. */ - class UserCommands implements IUserCommands { - - /** - * Constructs a new UserCommands. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUserCommands); - - /** UserCommands commands. */ - public commands: string[]; - - /** - * Creates a new UserCommands instance using the specified properties. - * @param [properties] Properties to set - * @returns UserCommands instance - */ - public static create(properties?: google.cloud.netapp.v1.IUserCommands): google.cloud.netapp.v1.UserCommands; - - /** - * Encodes the specified UserCommands message. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. - * @param message UserCommands message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUserCommands, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserCommands message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. - * @param message UserCommands message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUserCommands, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserCommands message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserCommands - * @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.netapp.v1.UserCommands; - - /** - * Decodes a UserCommands message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserCommands - * @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.netapp.v1.UserCommands; - - /** - * Verifies a UserCommands 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 UserCommands message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserCommands - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UserCommands; - - /** - * Creates a plain object from a UserCommands message. Also converts values to other types if specified. - * @param message UserCommands - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UserCommands, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserCommands to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserCommands - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetKmsConfigRequest. */ - interface IGetKmsConfigRequest { - - /** GetKmsConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetKmsConfigRequest. */ - class GetKmsConfigRequest implements IGetKmsConfigRequest { - - /** - * Constructs a new GetKmsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest); - - /** GetKmsConfigRequest name. */ - public name: string; - - /** - * Creates a new GetKmsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKmsConfigRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetKmsConfigRequest): google.cloud.netapp.v1.GetKmsConfigRequest; - - /** - * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. - * @param message GetKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. - * @param message GetKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKmsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKmsConfigRequest - * @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.netapp.v1.GetKmsConfigRequest; - - /** - * Decodes a GetKmsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKmsConfigRequest - * @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.netapp.v1.GetKmsConfigRequest; - - /** - * Verifies a GetKmsConfigRequest 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 GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKmsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetKmsConfigRequest; - - /** - * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. - * @param message GetKmsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKmsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetKmsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListKmsConfigsRequest. */ - interface IListKmsConfigsRequest { - - /** ListKmsConfigsRequest parent */ - parent?: (string|null); - - /** ListKmsConfigsRequest pageSize */ - pageSize?: (number|null); - - /** ListKmsConfigsRequest pageToken */ - pageToken?: (string|null); - - /** ListKmsConfigsRequest orderBy */ - orderBy?: (string|null); - - /** ListKmsConfigsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListKmsConfigsRequest. */ - class ListKmsConfigsRequest implements IListKmsConfigsRequest { - - /** - * Constructs a new ListKmsConfigsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest); - - /** ListKmsConfigsRequest parent. */ - public parent: string; - - /** ListKmsConfigsRequest pageSize. */ - public pageSize: number; - - /** ListKmsConfigsRequest pageToken. */ - public pageToken: string; - - /** ListKmsConfigsRequest orderBy. */ - public orderBy: string; - - /** ListKmsConfigsRequest filter. */ - public filter: string; - - /** - * Creates a new ListKmsConfigsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListKmsConfigsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsRequest): google.cloud.netapp.v1.ListKmsConfigsRequest; - - /** - * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. - * @param message ListKmsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. - * @param message ListKmsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListKmsConfigsRequest - * @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.netapp.v1.ListKmsConfigsRequest; - - /** - * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListKmsConfigsRequest - * @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.netapp.v1.ListKmsConfigsRequest; - - /** - * Verifies a ListKmsConfigsRequest 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 ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListKmsConfigsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsRequest; - - /** - * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. - * @param message ListKmsConfigsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListKmsConfigsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListKmsConfigsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListKmsConfigsResponse. */ - interface IListKmsConfigsResponse { - - /** ListKmsConfigsResponse kmsConfigs */ - kmsConfigs?: (google.cloud.netapp.v1.IKmsConfig[]|null); - - /** ListKmsConfigsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListKmsConfigsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListKmsConfigsResponse. */ - class ListKmsConfigsResponse implements IListKmsConfigsResponse { - - /** - * Constructs a new ListKmsConfigsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse); - - /** ListKmsConfigsResponse kmsConfigs. */ - public kmsConfigs: google.cloud.netapp.v1.IKmsConfig[]; - - /** ListKmsConfigsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListKmsConfigsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListKmsConfigsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListKmsConfigsResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListKmsConfigsResponse): google.cloud.netapp.v1.ListKmsConfigsResponse; - - /** - * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. - * @param message ListKmsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. - * @param message ListKmsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListKmsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListKmsConfigsResponse - * @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.netapp.v1.ListKmsConfigsResponse; - - /** - * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListKmsConfigsResponse - * @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.netapp.v1.ListKmsConfigsResponse; - - /** - * Verifies a ListKmsConfigsResponse 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 ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListKmsConfigsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListKmsConfigsResponse; - - /** - * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. - * @param message ListKmsConfigsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListKmsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListKmsConfigsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListKmsConfigsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateKmsConfigRequest. */ - interface ICreateKmsConfigRequest { - - /** CreateKmsConfigRequest parent */ - parent?: (string|null); - - /** CreateKmsConfigRequest kmsConfigId */ - kmsConfigId?: (string|null); - - /** CreateKmsConfigRequest kmsConfig */ - kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); - } - - /** Represents a CreateKmsConfigRequest. */ - class CreateKmsConfigRequest implements ICreateKmsConfigRequest { - - /** - * Constructs a new CreateKmsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest); - - /** CreateKmsConfigRequest parent. */ - public parent: string; - - /** CreateKmsConfigRequest kmsConfigId. */ - public kmsConfigId: string; - - /** CreateKmsConfigRequest kmsConfig. */ - public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); - - /** - * Creates a new CreateKmsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateKmsConfigRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateKmsConfigRequest): google.cloud.netapp.v1.CreateKmsConfigRequest; - - /** - * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. - * @param message CreateKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. - * @param message CreateKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateKmsConfigRequest - * @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.netapp.v1.CreateKmsConfigRequest; - - /** - * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateKmsConfigRequest - * @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.netapp.v1.CreateKmsConfigRequest; - - /** - * Verifies a CreateKmsConfigRequest 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 CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateKmsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateKmsConfigRequest; - - /** - * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. - * @param message CreateKmsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateKmsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateKmsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateKmsConfigRequest. */ - interface IUpdateKmsConfigRequest { - - /** UpdateKmsConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateKmsConfigRequest kmsConfig */ - kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); - } - - /** Represents an UpdateKmsConfigRequest. */ - class UpdateKmsConfigRequest implements IUpdateKmsConfigRequest { - - /** - * Constructs a new UpdateKmsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest); - - /** UpdateKmsConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateKmsConfigRequest kmsConfig. */ - public kmsConfig?: (google.cloud.netapp.v1.IKmsConfig|null); - - /** - * Creates a new UpdateKmsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateKmsConfigRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateKmsConfigRequest): google.cloud.netapp.v1.UpdateKmsConfigRequest; - - /** - * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. - * @param message UpdateKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. - * @param message UpdateKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateKmsConfigRequest - * @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.netapp.v1.UpdateKmsConfigRequest; - - /** - * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateKmsConfigRequest - * @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.netapp.v1.UpdateKmsConfigRequest; - - /** - * Verifies an UpdateKmsConfigRequest 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 UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateKmsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateKmsConfigRequest; - - /** - * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. - * @param message UpdateKmsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateKmsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateKmsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteKmsConfigRequest. */ - interface IDeleteKmsConfigRequest { - - /** DeleteKmsConfigRequest name */ - name?: (string|null); - } - - /** Represents a DeleteKmsConfigRequest. */ - class DeleteKmsConfigRequest implements IDeleteKmsConfigRequest { - - /** - * Constructs a new DeleteKmsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest); - - /** DeleteKmsConfigRequest name. */ - public name: string; - - /** - * Creates a new DeleteKmsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKmsConfigRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteKmsConfigRequest): google.cloud.netapp.v1.DeleteKmsConfigRequest; - - /** - * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. - * @param message DeleteKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. - * @param message DeleteKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteKmsConfigRequest - * @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.netapp.v1.DeleteKmsConfigRequest; - - /** - * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKmsConfigRequest - * @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.netapp.v1.DeleteKmsConfigRequest; - - /** - * Verifies a DeleteKmsConfigRequest 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 DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteKmsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteKmsConfigRequest; - - /** - * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. - * @param message DeleteKmsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteKmsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteKmsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EncryptVolumesRequest. */ - interface IEncryptVolumesRequest { - - /** EncryptVolumesRequest name */ - name?: (string|null); - } - - /** Represents an EncryptVolumesRequest. */ - class EncryptVolumesRequest implements IEncryptVolumesRequest { - - /** - * Constructs a new EncryptVolumesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest); - - /** EncryptVolumesRequest name. */ - public name: string; - - /** - * Creates a new EncryptVolumesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EncryptVolumesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IEncryptVolumesRequest): google.cloud.netapp.v1.EncryptVolumesRequest; - - /** - * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. - * @param message EncryptVolumesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. - * @param message EncryptVolumesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IEncryptVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EncryptVolumesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EncryptVolumesRequest - * @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.netapp.v1.EncryptVolumesRequest; - - /** - * Decodes an EncryptVolumesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EncryptVolumesRequest - * @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.netapp.v1.EncryptVolumesRequest; - - /** - * Verifies an EncryptVolumesRequest 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 EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EncryptVolumesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EncryptVolumesRequest; - - /** - * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. - * @param message EncryptVolumesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.EncryptVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EncryptVolumesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EncryptVolumesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VerifyKmsConfigRequest. */ - interface IVerifyKmsConfigRequest { - - /** VerifyKmsConfigRequest name */ - name?: (string|null); - } - - /** Represents a VerifyKmsConfigRequest. */ - class VerifyKmsConfigRequest implements IVerifyKmsConfigRequest { - - /** - * Constructs a new VerifyKmsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest); - - /** VerifyKmsConfigRequest name. */ - public name: string; - - /** - * Creates a new VerifyKmsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns VerifyKmsConfigRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigRequest): google.cloud.netapp.v1.VerifyKmsConfigRequest; - - /** - * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. - * @param message VerifyKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. - * @param message VerifyKmsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerifyKmsConfigRequest - * @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.netapp.v1.VerifyKmsConfigRequest; - - /** - * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerifyKmsConfigRequest - * @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.netapp.v1.VerifyKmsConfigRequest; - - /** - * Verifies a VerifyKmsConfigRequest 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 VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerifyKmsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigRequest; - - /** - * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. - * @param message VerifyKmsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerifyKmsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VerifyKmsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VerifyKmsConfigResponse. */ - interface IVerifyKmsConfigResponse { - - /** VerifyKmsConfigResponse healthy */ - healthy?: (boolean|null); - - /** VerifyKmsConfigResponse healthError */ - healthError?: (string|null); - - /** VerifyKmsConfigResponse instructions */ - instructions?: (string|null); - } - - /** Represents a VerifyKmsConfigResponse. */ - class VerifyKmsConfigResponse implements IVerifyKmsConfigResponse { - - /** - * Constructs a new VerifyKmsConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse); - - /** VerifyKmsConfigResponse healthy. */ - public healthy: boolean; - - /** VerifyKmsConfigResponse healthError. */ - public healthError: string; - - /** VerifyKmsConfigResponse instructions. */ - public instructions: string; - - /** - * Creates a new VerifyKmsConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns VerifyKmsConfigResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IVerifyKmsConfigResponse): google.cloud.netapp.v1.VerifyKmsConfigResponse; - - /** - * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. - * @param message VerifyKmsConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. - * @param message VerifyKmsConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IVerifyKmsConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerifyKmsConfigResponse - * @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.netapp.v1.VerifyKmsConfigResponse; - - /** - * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerifyKmsConfigResponse - * @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.netapp.v1.VerifyKmsConfigResponse; - - /** - * Verifies a VerifyKmsConfigResponse 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 VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerifyKmsConfigResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.VerifyKmsConfigResponse; - - /** - * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. - * @param message VerifyKmsConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.VerifyKmsConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerifyKmsConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VerifyKmsConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KmsConfig. */ - interface IKmsConfig { - - /** KmsConfig name */ - name?: (string|null); - - /** KmsConfig cryptoKeyName */ - cryptoKeyName?: (string|null); - - /** KmsConfig state */ - state?: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State|null); - - /** KmsConfig stateDetails */ - stateDetails?: (string|null); - - /** KmsConfig createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** KmsConfig description */ - description?: (string|null); - - /** KmsConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** KmsConfig instructions */ - instructions?: (string|null); - - /** KmsConfig serviceAccount */ - serviceAccount?: (string|null); - } - - /** Represents a KmsConfig. */ - class KmsConfig implements IKmsConfig { - - /** - * Constructs a new KmsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IKmsConfig); - - /** KmsConfig name. */ - public name: string; - - /** KmsConfig cryptoKeyName. */ - public cryptoKeyName: string; - - /** KmsConfig state. */ - public state: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State); - - /** KmsConfig stateDetails. */ - public stateDetails: string; - - /** KmsConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** KmsConfig description. */ - public description: string; - - /** KmsConfig labels. */ - public labels: { [k: string]: string }; - - /** KmsConfig instructions. */ - public instructions: string; - - /** KmsConfig serviceAccount. */ - public serviceAccount: string; - - /** - * Creates a new KmsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns KmsConfig instance - */ - public static create(properties?: google.cloud.netapp.v1.IKmsConfig): google.cloud.netapp.v1.KmsConfig; - - /** - * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @param message KmsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @param message KmsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KmsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KmsConfig - * @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.netapp.v1.KmsConfig; - - /** - * Decodes a KmsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KmsConfig - * @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.netapp.v1.KmsConfig; - - /** - * Verifies a KmsConfig 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 KmsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KmsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.KmsConfig; - - /** - * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. - * @param message KmsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.KmsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KmsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KmsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace KmsConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - CREATING = 2, - DELETING = 3, - UPDATING = 4, - IN_USE = 5, - ERROR = 6, - KEY_CHECK_PENDING = 7, - KEY_NOT_REACHABLE = 8, - DISABLING = 9, - DISABLED = 10, - MIGRATING = 11 - } - } - - /** Properties of an ExecuteOntapPostRequest. */ - interface IExecuteOntapPostRequest { - - /** ExecuteOntapPostRequest body */ - body?: (google.protobuf.IStruct|null); - - /** ExecuteOntapPostRequest ontapPath */ - ontapPath?: (string|null); - } - - /** Represents an ExecuteOntapPostRequest. */ - class ExecuteOntapPostRequest implements IExecuteOntapPostRequest { - - /** - * Constructs a new ExecuteOntapPostRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest); - - /** ExecuteOntapPostRequest body. */ - public body?: (google.protobuf.IStruct|null); - - /** ExecuteOntapPostRequest ontapPath. */ - public ontapPath: string; - - /** - * Creates a new ExecuteOntapPostRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapPostRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest): google.cloud.netapp.v1.ExecuteOntapPostRequest; - - /** - * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. - * @param message ExecuteOntapPostRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. - * @param message ExecuteOntapPostRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapPostRequest - * @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.netapp.v1.ExecuteOntapPostRequest; - - /** - * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapPostRequest - * @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.netapp.v1.ExecuteOntapPostRequest; - - /** - * Verifies an ExecuteOntapPostRequest 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 ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapPostRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostRequest; - - /** - * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. - * @param message ExecuteOntapPostRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapPostRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapPostRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapPostResponse. */ - interface IExecuteOntapPostResponse { - - /** ExecuteOntapPostResponse body */ - body?: (google.protobuf.IStruct|null); - } - - /** Represents an ExecuteOntapPostResponse. */ - class ExecuteOntapPostResponse implements IExecuteOntapPostResponse { - - /** - * Constructs a new ExecuteOntapPostResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse); - - /** ExecuteOntapPostResponse body. */ - public body?: (google.protobuf.IStruct|null); - - /** - * Creates a new ExecuteOntapPostResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapPostResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse): google.cloud.netapp.v1.ExecuteOntapPostResponse; - - /** - * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. - * @param message ExecuteOntapPostResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. - * @param message ExecuteOntapPostResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapPostResponse - * @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.netapp.v1.ExecuteOntapPostResponse; - - /** - * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapPostResponse - * @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.netapp.v1.ExecuteOntapPostResponse; - - /** - * Verifies an ExecuteOntapPostResponse 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 ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapPostResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostResponse; - - /** - * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. - * @param message ExecuteOntapPostResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapPostResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapPostResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapGetRequest. */ - interface IExecuteOntapGetRequest { - - /** ExecuteOntapGetRequest ontapPath */ - ontapPath?: (string|null); - } - - /** Represents an ExecuteOntapGetRequest. */ - class ExecuteOntapGetRequest implements IExecuteOntapGetRequest { - - /** - * Constructs a new ExecuteOntapGetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest); - - /** ExecuteOntapGetRequest ontapPath. */ - public ontapPath: string; - - /** - * Creates a new ExecuteOntapGetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapGetRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest): google.cloud.netapp.v1.ExecuteOntapGetRequest; - - /** - * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. - * @param message ExecuteOntapGetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. - * @param message ExecuteOntapGetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapGetRequest - * @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.netapp.v1.ExecuteOntapGetRequest; - - /** - * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapGetRequest - * @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.netapp.v1.ExecuteOntapGetRequest; - - /** - * Verifies an ExecuteOntapGetRequest 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 ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapGetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetRequest; - - /** - * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. - * @param message ExecuteOntapGetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapGetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapGetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapGetResponse. */ - interface IExecuteOntapGetResponse { - - /** ExecuteOntapGetResponse body */ - body?: (google.protobuf.IStruct|null); - } - - /** Represents an ExecuteOntapGetResponse. */ - class ExecuteOntapGetResponse implements IExecuteOntapGetResponse { - - /** - * Constructs a new ExecuteOntapGetResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse); - - /** ExecuteOntapGetResponse body. */ - public body?: (google.protobuf.IStruct|null); - - /** - * Creates a new ExecuteOntapGetResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapGetResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse): google.cloud.netapp.v1.ExecuteOntapGetResponse; - - /** - * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. - * @param message ExecuteOntapGetResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. - * @param message ExecuteOntapGetResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapGetResponse - * @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.netapp.v1.ExecuteOntapGetResponse; - - /** - * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapGetResponse - * @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.netapp.v1.ExecuteOntapGetResponse; - - /** - * Verifies an ExecuteOntapGetResponse 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 ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapGetResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetResponse; - - /** - * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. - * @param message ExecuteOntapGetResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapGetResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapGetResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapDeleteRequest. */ - interface IExecuteOntapDeleteRequest { - - /** ExecuteOntapDeleteRequest ontapPath */ - ontapPath?: (string|null); - } - - /** Represents an ExecuteOntapDeleteRequest. */ - class ExecuteOntapDeleteRequest implements IExecuteOntapDeleteRequest { - - /** - * Constructs a new ExecuteOntapDeleteRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest); - - /** ExecuteOntapDeleteRequest ontapPath. */ - public ontapPath: string; - - /** - * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapDeleteRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; - - /** - * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. - * @param message ExecuteOntapDeleteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. - * @param message ExecuteOntapDeleteRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapDeleteRequest - * @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.netapp.v1.ExecuteOntapDeleteRequest; - - /** - * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapDeleteRequest - * @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.netapp.v1.ExecuteOntapDeleteRequest; - - /** - * Verifies an ExecuteOntapDeleteRequest 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 ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapDeleteRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; - - /** - * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. - * @param message ExecuteOntapDeleteRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapDeleteRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapDeleteRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapDeleteResponse. */ - interface IExecuteOntapDeleteResponse { - - /** ExecuteOntapDeleteResponse body */ - body?: (google.protobuf.IStruct|null); - } - - /** Represents an ExecuteOntapDeleteResponse. */ - class ExecuteOntapDeleteResponse implements IExecuteOntapDeleteResponse { - - /** - * Constructs a new ExecuteOntapDeleteResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse); - - /** ExecuteOntapDeleteResponse body. */ - public body?: (google.protobuf.IStruct|null); - - /** - * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapDeleteResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; - - /** - * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. - * @param message ExecuteOntapDeleteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. - * @param message ExecuteOntapDeleteResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapDeleteResponse - * @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.netapp.v1.ExecuteOntapDeleteResponse; - - /** - * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapDeleteResponse - * @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.netapp.v1.ExecuteOntapDeleteResponse; - - /** - * Verifies an ExecuteOntapDeleteResponse 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 ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapDeleteResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; - - /** - * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. - * @param message ExecuteOntapDeleteResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapDeleteResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapDeleteResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapPatchRequest. */ - interface IExecuteOntapPatchRequest { - - /** ExecuteOntapPatchRequest body */ - body?: (google.protobuf.IStruct|null); - - /** ExecuteOntapPatchRequest ontapPath */ - ontapPath?: (string|null); - } - - /** Represents an ExecuteOntapPatchRequest. */ - class ExecuteOntapPatchRequest implements IExecuteOntapPatchRequest { - - /** - * Constructs a new ExecuteOntapPatchRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest); - - /** ExecuteOntapPatchRequest body. */ - public body?: (google.protobuf.IStruct|null); - - /** ExecuteOntapPatchRequest ontapPath. */ - public ontapPath: string; - - /** - * Creates a new ExecuteOntapPatchRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapPatchRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest): google.cloud.netapp.v1.ExecuteOntapPatchRequest; - - /** - * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. - * @param message ExecuteOntapPatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. - * @param message ExecuteOntapPatchRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapPatchRequest - * @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.netapp.v1.ExecuteOntapPatchRequest; - - /** - * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapPatchRequest - * @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.netapp.v1.ExecuteOntapPatchRequest; - - /** - * Verifies an ExecuteOntapPatchRequest 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 ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapPatchRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchRequest; - - /** - * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. - * @param message ExecuteOntapPatchRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapPatchRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapPatchRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteOntapPatchResponse. */ - interface IExecuteOntapPatchResponse { - - /** ExecuteOntapPatchResponse body */ - body?: (google.protobuf.IStruct|null); - } - - /** Represents an ExecuteOntapPatchResponse. */ - class ExecuteOntapPatchResponse implements IExecuteOntapPatchResponse { - - /** - * Constructs a new ExecuteOntapPatchResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse); - - /** ExecuteOntapPatchResponse body. */ - public body?: (google.protobuf.IStruct|null); - - /** - * Creates a new ExecuteOntapPatchResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteOntapPatchResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse): google.cloud.netapp.v1.ExecuteOntapPatchResponse; - - /** - * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. - * @param message ExecuteOntapPatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. - * @param message ExecuteOntapPatchResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteOntapPatchResponse - * @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.netapp.v1.ExecuteOntapPatchResponse; - - /** - * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteOntapPatchResponse - * @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.netapp.v1.ExecuteOntapPatchResponse; - - /** - * Verifies an ExecuteOntapPatchResponse 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 ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteOntapPatchResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchResponse; - - /** - * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. - * @param message ExecuteOntapPatchResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteOntapPatchResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteOntapPatchResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListQuotaRulesRequest. */ - interface IListQuotaRulesRequest { - - /** ListQuotaRulesRequest parent */ - parent?: (string|null); - - /** ListQuotaRulesRequest pageSize */ - pageSize?: (number|null); - - /** ListQuotaRulesRequest pageToken */ - pageToken?: (string|null); - - /** ListQuotaRulesRequest filter */ - filter?: (string|null); - - /** ListQuotaRulesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListQuotaRulesRequest. */ - class ListQuotaRulesRequest implements IListQuotaRulesRequest { - - /** - * Constructs a new ListQuotaRulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListQuotaRulesRequest); - - /** ListQuotaRulesRequest parent. */ - public parent: string; - - /** ListQuotaRulesRequest pageSize. */ - public pageSize: number; - - /** ListQuotaRulesRequest pageToken. */ - public pageToken: string; - - /** ListQuotaRulesRequest filter. */ - public filter: string; - - /** ListQuotaRulesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListQuotaRulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListQuotaRulesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListQuotaRulesRequest): google.cloud.netapp.v1.ListQuotaRulesRequest; - - /** - * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. - * @param message ListQuotaRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListQuotaRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. - * @param message ListQuotaRulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListQuotaRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListQuotaRulesRequest - * @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.netapp.v1.ListQuotaRulesRequest; - - /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListQuotaRulesRequest - * @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.netapp.v1.ListQuotaRulesRequest; - - /** - * Verifies a ListQuotaRulesRequest 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 ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListQuotaRulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListQuotaRulesRequest; - - /** - * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. - * @param message ListQuotaRulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListQuotaRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListQuotaRulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListQuotaRulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListQuotaRulesResponse. */ - interface IListQuotaRulesResponse { - - /** ListQuotaRulesResponse quotaRules */ - quotaRules?: (google.cloud.netapp.v1.IQuotaRule[]|null); - - /** ListQuotaRulesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListQuotaRulesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListQuotaRulesResponse. */ - class ListQuotaRulesResponse implements IListQuotaRulesResponse { - - /** - * Constructs a new ListQuotaRulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListQuotaRulesResponse); - - /** ListQuotaRulesResponse quotaRules. */ - public quotaRules: google.cloud.netapp.v1.IQuotaRule[]; - - /** ListQuotaRulesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListQuotaRulesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListQuotaRulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListQuotaRulesResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListQuotaRulesResponse): google.cloud.netapp.v1.ListQuotaRulesResponse; - - /** - * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. - * @param message ListQuotaRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListQuotaRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. - * @param message ListQuotaRulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListQuotaRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListQuotaRulesResponse - * @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.netapp.v1.ListQuotaRulesResponse; - - /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListQuotaRulesResponse - * @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.netapp.v1.ListQuotaRulesResponse; - - /** - * Verifies a ListQuotaRulesResponse 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 ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListQuotaRulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListQuotaRulesResponse; - - /** - * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. - * @param message ListQuotaRulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListQuotaRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListQuotaRulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListQuotaRulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetQuotaRuleRequest. */ - interface IGetQuotaRuleRequest { - - /** GetQuotaRuleRequest name */ - name?: (string|null); - } - - /** Represents a GetQuotaRuleRequest. */ - class GetQuotaRuleRequest implements IGetQuotaRuleRequest { - - /** - * Constructs a new GetQuotaRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetQuotaRuleRequest); - - /** GetQuotaRuleRequest name. */ - public name: string; - - /** - * Creates a new GetQuotaRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetQuotaRuleRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetQuotaRuleRequest): google.cloud.netapp.v1.GetQuotaRuleRequest; - - /** - * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. - * @param message GetQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. - * @param message GetQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetQuotaRuleRequest - * @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.netapp.v1.GetQuotaRuleRequest; - - /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetQuotaRuleRequest - * @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.netapp.v1.GetQuotaRuleRequest; - - /** - * Verifies a GetQuotaRuleRequest 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 GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetQuotaRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetQuotaRuleRequest; - - /** - * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. - * @param message GetQuotaRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetQuotaRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetQuotaRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateQuotaRuleRequest. */ - interface ICreateQuotaRuleRequest { - - /** CreateQuotaRuleRequest parent */ - parent?: (string|null); - - /** CreateQuotaRuleRequest quotaRule */ - quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); - - /** CreateQuotaRuleRequest quotaRuleId */ - quotaRuleId?: (string|null); - } - - /** Represents a CreateQuotaRuleRequest. */ - class CreateQuotaRuleRequest implements ICreateQuotaRuleRequest { - - /** - * Constructs a new CreateQuotaRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateQuotaRuleRequest); - - /** CreateQuotaRuleRequest parent. */ - public parent: string; - - /** CreateQuotaRuleRequest quotaRule. */ - public quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); - - /** CreateQuotaRuleRequest quotaRuleId. */ - public quotaRuleId: string; - - /** - * Creates a new CreateQuotaRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateQuotaRuleRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateQuotaRuleRequest): google.cloud.netapp.v1.CreateQuotaRuleRequest; - - /** - * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. - * @param message CreateQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. - * @param message CreateQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateQuotaRuleRequest - * @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.netapp.v1.CreateQuotaRuleRequest; - - /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateQuotaRuleRequest - * @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.netapp.v1.CreateQuotaRuleRequest; - - /** - * Verifies a CreateQuotaRuleRequest 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 CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateQuotaRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateQuotaRuleRequest; - - /** - * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. - * @param message CreateQuotaRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateQuotaRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateQuotaRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateQuotaRuleRequest. */ - interface IUpdateQuotaRuleRequest { - - /** UpdateQuotaRuleRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateQuotaRuleRequest quotaRule */ - quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); - } - - /** Represents an UpdateQuotaRuleRequest. */ - class UpdateQuotaRuleRequest implements IUpdateQuotaRuleRequest { - - /** - * Constructs a new UpdateQuotaRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateQuotaRuleRequest); - - /** UpdateQuotaRuleRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateQuotaRuleRequest quotaRule. */ - public quotaRule?: (google.cloud.netapp.v1.IQuotaRule|null); - - /** - * Creates a new UpdateQuotaRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateQuotaRuleRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateQuotaRuleRequest): google.cloud.netapp.v1.UpdateQuotaRuleRequest; - - /** - * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. - * @param message UpdateQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. - * @param message UpdateQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateQuotaRuleRequest - * @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.netapp.v1.UpdateQuotaRuleRequest; - - /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateQuotaRuleRequest - * @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.netapp.v1.UpdateQuotaRuleRequest; - - /** - * Verifies an UpdateQuotaRuleRequest 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 UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateQuotaRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateQuotaRuleRequest; - - /** - * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. - * @param message UpdateQuotaRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateQuotaRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateQuotaRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteQuotaRuleRequest. */ - interface IDeleteQuotaRuleRequest { - - /** DeleteQuotaRuleRequest name */ - name?: (string|null); - } - - /** Represents a DeleteQuotaRuleRequest. */ - class DeleteQuotaRuleRequest implements IDeleteQuotaRuleRequest { - - /** - * Constructs a new DeleteQuotaRuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteQuotaRuleRequest); - - /** DeleteQuotaRuleRequest name. */ - public name: string; - - /** - * Creates a new DeleteQuotaRuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteQuotaRuleRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteQuotaRuleRequest): google.cloud.netapp.v1.DeleteQuotaRuleRequest; - - /** - * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. - * @param message DeleteQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. - * @param message DeleteQuotaRuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteQuotaRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteQuotaRuleRequest - * @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.netapp.v1.DeleteQuotaRuleRequest; - - /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteQuotaRuleRequest - * @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.netapp.v1.DeleteQuotaRuleRequest; - - /** - * Verifies a DeleteQuotaRuleRequest 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 DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteQuotaRuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteQuotaRuleRequest; - - /** - * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. - * @param message DeleteQuotaRuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteQuotaRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteQuotaRuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteQuotaRuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QuotaRule. */ - interface IQuotaRule { - - /** QuotaRule name */ - name?: (string|null); - - /** QuotaRule target */ - target?: (string|null); - - /** QuotaRule type */ - type?: (google.cloud.netapp.v1.QuotaRule.Type|keyof typeof google.cloud.netapp.v1.QuotaRule.Type|null); - - /** QuotaRule diskLimitMib */ - diskLimitMib?: (number|null); - - /** QuotaRule state */ - state?: (google.cloud.netapp.v1.QuotaRule.State|keyof typeof google.cloud.netapp.v1.QuotaRule.State|null); - - /** QuotaRule stateDetails */ - stateDetails?: (string|null); - - /** QuotaRule createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** QuotaRule description */ - description?: (string|null); - - /** QuotaRule labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a QuotaRule. */ - class QuotaRule implements IQuotaRule { - - /** - * Constructs a new QuotaRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IQuotaRule); - - /** QuotaRule name. */ - public name: string; - - /** QuotaRule target. */ - public target: string; - - /** QuotaRule type. */ - public type: (google.cloud.netapp.v1.QuotaRule.Type|keyof typeof google.cloud.netapp.v1.QuotaRule.Type); - - /** QuotaRule diskLimitMib. */ - public diskLimitMib: number; - - /** QuotaRule state. */ - public state: (google.cloud.netapp.v1.QuotaRule.State|keyof typeof google.cloud.netapp.v1.QuotaRule.State); - - /** QuotaRule stateDetails. */ - public stateDetails: string; - - /** QuotaRule createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** QuotaRule description. */ - public description: string; - - /** QuotaRule labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new QuotaRule instance using the specified properties. - * @param [properties] Properties to set - * @returns QuotaRule instance - */ - public static create(properties?: google.cloud.netapp.v1.IQuotaRule): google.cloud.netapp.v1.QuotaRule; - - /** - * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. - * @param message QuotaRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IQuotaRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. - * @param message QuotaRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IQuotaRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuotaRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuotaRule - * @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.netapp.v1.QuotaRule; - - /** - * Decodes a QuotaRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuotaRule - * @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.netapp.v1.QuotaRule; - - /** - * Verifies a QuotaRule 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 QuotaRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuotaRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.QuotaRule; - - /** - * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. - * @param message QuotaRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.QuotaRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuotaRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QuotaRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace QuotaRule { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INDIVIDUAL_USER_QUOTA = 1, - INDIVIDUAL_GROUP_QUOTA = 2, - DEFAULT_USER_QUOTA = 3, - DEFAULT_GROUP_QUOTA = 4 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - UPDATING = 2, - DELETING = 3, - READY = 4, - ERROR = 5 - } - } - - /** Properties of a TransferStats. */ - interface ITransferStats { - - /** TransferStats transferBytes */ - transferBytes?: (number|Long|string|null); - - /** TransferStats totalTransferDuration */ - totalTransferDuration?: (google.protobuf.IDuration|null); - - /** TransferStats lastTransferBytes */ - lastTransferBytes?: (number|Long|string|null); - - /** TransferStats lastTransferDuration */ - lastTransferDuration?: (google.protobuf.IDuration|null); - - /** TransferStats lagDuration */ - lagDuration?: (google.protobuf.IDuration|null); - - /** TransferStats updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** TransferStats lastTransferEndTime */ - lastTransferEndTime?: (google.protobuf.ITimestamp|null); - - /** TransferStats lastTransferError */ - lastTransferError?: (string|null); - } - - /** Represents a TransferStats. */ - class TransferStats implements ITransferStats { - - /** - * Constructs a new TransferStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ITransferStats); - - /** TransferStats transferBytes. */ - public transferBytes?: (number|Long|string|null); - - /** TransferStats totalTransferDuration. */ - public totalTransferDuration?: (google.protobuf.IDuration|null); - - /** TransferStats lastTransferBytes. */ - public lastTransferBytes?: (number|Long|string|null); - - /** TransferStats lastTransferDuration. */ - public lastTransferDuration?: (google.protobuf.IDuration|null); - - /** TransferStats lagDuration. */ - public lagDuration?: (google.protobuf.IDuration|null); - - /** TransferStats updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** TransferStats lastTransferEndTime. */ - public lastTransferEndTime?: (google.protobuf.ITimestamp|null); - - /** TransferStats lastTransferError. */ - public lastTransferError?: (string|null); - - /** - * Creates a new TransferStats instance using the specified properties. - * @param [properties] Properties to set - * @returns TransferStats instance - */ - public static create(properties?: google.cloud.netapp.v1.ITransferStats): google.cloud.netapp.v1.TransferStats; - - /** - * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. - * @param message TransferStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. - * @param message TransferStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ITransferStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TransferStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TransferStats - * @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.netapp.v1.TransferStats; - - /** - * Decodes a TransferStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TransferStats - * @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.netapp.v1.TransferStats; - - /** - * Verifies a TransferStats 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 TransferStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TransferStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.TransferStats; - - /** - * Creates a plain object from a TransferStats message. Also converts values to other types if specified. - * @param message TransferStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.TransferStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TransferStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TransferStats - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Replication. */ - interface IReplication { - - /** Replication name */ - name?: (string|null); - - /** Replication state */ - state?: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State|null); - - /** Replication stateDetails */ - stateDetails?: (string|null); - - /** Replication role */ - role?: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole|null); - - /** Replication replicationSchedule */ - replicationSchedule?: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule|null); - - /** Replication mirrorState */ - mirrorState?: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState|null); - - /** Replication healthy */ - healthy?: (boolean|null); - - /** Replication createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Replication destinationVolume */ - destinationVolume?: (string|null); - - /** Replication transferStats */ - transferStats?: (google.cloud.netapp.v1.ITransferStats|null); - - /** Replication labels */ - labels?: ({ [k: string]: string }|null); - - /** Replication description */ - description?: (string|null); - - /** Replication destinationVolumeParameters */ - destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); - - /** Replication sourceVolume */ - sourceVolume?: (string|null); - - /** Replication hybridPeeringDetails */ - hybridPeeringDetails?: (google.cloud.netapp.v1.IHybridPeeringDetails|null); - - /** Replication clusterLocation */ - clusterLocation?: (string|null); - - /** Replication hybridReplicationType */ - hybridReplicationType?: (google.cloud.netapp.v1.Replication.HybridReplicationType|keyof typeof google.cloud.netapp.v1.Replication.HybridReplicationType|null); - - /** Replication hybridReplicationUserCommands */ - hybridReplicationUserCommands?: (google.cloud.netapp.v1.IUserCommands|null); - } - - /** Represents a Replication. */ - class Replication implements IReplication { - - /** - * Constructs a new Replication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IReplication); - - /** Replication name. */ - public name: string; - - /** Replication state. */ - public state: (google.cloud.netapp.v1.Replication.State|keyof typeof google.cloud.netapp.v1.Replication.State); - - /** Replication stateDetails. */ - public stateDetails: string; - - /** Replication role. */ - public role: (google.cloud.netapp.v1.Replication.ReplicationRole|keyof typeof google.cloud.netapp.v1.Replication.ReplicationRole); - - /** Replication replicationSchedule. */ - public replicationSchedule: (google.cloud.netapp.v1.Replication.ReplicationSchedule|keyof typeof google.cloud.netapp.v1.Replication.ReplicationSchedule); - - /** Replication mirrorState. */ - public mirrorState: (google.cloud.netapp.v1.Replication.MirrorState|keyof typeof google.cloud.netapp.v1.Replication.MirrorState); - - /** Replication healthy. */ - public healthy?: (boolean|null); - - /** Replication createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Replication destinationVolume. */ - public destinationVolume: string; - - /** Replication transferStats. */ - public transferStats?: (google.cloud.netapp.v1.ITransferStats|null); - - /** Replication labels. */ - public labels: { [k: string]: string }; - - /** Replication description. */ - public description?: (string|null); - - /** Replication destinationVolumeParameters. */ - public destinationVolumeParameters?: (google.cloud.netapp.v1.IDestinationVolumeParameters|null); - - /** Replication sourceVolume. */ - public sourceVolume: string; - - /** Replication hybridPeeringDetails. */ - public hybridPeeringDetails?: (google.cloud.netapp.v1.IHybridPeeringDetails|null); - - /** Replication clusterLocation. */ - public clusterLocation: string; - - /** Replication hybridReplicationType. */ - public hybridReplicationType: (google.cloud.netapp.v1.Replication.HybridReplicationType|keyof typeof google.cloud.netapp.v1.Replication.HybridReplicationType); - - /** Replication hybridReplicationUserCommands. */ - public hybridReplicationUserCommands?: (google.cloud.netapp.v1.IUserCommands|null); - - /** - * Creates a new Replication instance using the specified properties. - * @param [properties] Properties to set - * @returns Replication instance - */ - public static create(properties?: google.cloud.netapp.v1.IReplication): google.cloud.netapp.v1.Replication; - - /** - * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. - * @param message Replication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. - * @param message Replication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IReplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Replication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Replication - * @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.netapp.v1.Replication; - - /** - * Decodes a Replication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Replication - * @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.netapp.v1.Replication; - - /** - * Verifies a Replication 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 Replication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Replication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Replication; - - /** - * Creates a plain object from a Replication message. Also converts values to other types if specified. - * @param message Replication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.Replication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Replication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Replication - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Replication { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 5, - ERROR = 6, - PENDING_CLUSTER_PEERING = 8, - PENDING_SVM_PEERING = 9, - PENDING_REMOTE_RESYNC = 10, - EXTERNALLY_MANAGED_REPLICATION = 11 - } - - /** ReplicationRole enum. */ - enum ReplicationRole { - REPLICATION_ROLE_UNSPECIFIED = 0, - SOURCE = 1, - DESTINATION = 2 - } - - /** ReplicationSchedule enum. */ - enum ReplicationSchedule { - REPLICATION_SCHEDULE_UNSPECIFIED = 0, - EVERY_10_MINUTES = 1, - HOURLY = 2, - DAILY = 3 - } - - /** MirrorState enum. */ - enum MirrorState { - MIRROR_STATE_UNSPECIFIED = 0, - PREPARING = 1, - MIRRORED = 2, - STOPPED = 3, - TRANSFERRING = 4, - BASELINE_TRANSFERRING = 5, - ABORTED = 6, - EXTERNALLY_MANAGED = 7, - PENDING_PEERING = 8 - } - - /** HybridReplicationType enum. */ - enum HybridReplicationType { - HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0, - MIGRATION = 1, - CONTINUOUS_REPLICATION = 2, - ONPREM_REPLICATION = 3, - REVERSE_ONPREM_REPLICATION = 4 - } - } - - /** Properties of a HybridPeeringDetails. */ - interface IHybridPeeringDetails { - - /** HybridPeeringDetails subnetIp */ - subnetIp?: (string|null); - - /** HybridPeeringDetails command */ - command?: (string|null); - - /** HybridPeeringDetails commandExpiryTime */ - commandExpiryTime?: (google.protobuf.ITimestamp|null); - - /** HybridPeeringDetails passphrase */ - passphrase?: (string|null); - - /** HybridPeeringDetails peerVolumeName */ - peerVolumeName?: (string|null); - - /** HybridPeeringDetails peerClusterName */ - peerClusterName?: (string|null); - - /** HybridPeeringDetails peerSvmName */ - peerSvmName?: (string|null); - } - - /** Represents a HybridPeeringDetails. */ - class HybridPeeringDetails implements IHybridPeeringDetails { - - /** - * Constructs a new HybridPeeringDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IHybridPeeringDetails); - - /** HybridPeeringDetails subnetIp. */ - public subnetIp: string; - - /** HybridPeeringDetails command. */ - public command: string; - - /** HybridPeeringDetails commandExpiryTime. */ - public commandExpiryTime?: (google.protobuf.ITimestamp|null); - - /** HybridPeeringDetails passphrase. */ - public passphrase: string; - - /** HybridPeeringDetails peerVolumeName. */ - public peerVolumeName: string; - - /** HybridPeeringDetails peerClusterName. */ - public peerClusterName: string; - - /** HybridPeeringDetails peerSvmName. */ - public peerSvmName: string; - - /** - * Creates a new HybridPeeringDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns HybridPeeringDetails instance - */ - public static create(properties?: google.cloud.netapp.v1.IHybridPeeringDetails): google.cloud.netapp.v1.HybridPeeringDetails; - - /** - * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. - * @param message HybridPeeringDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IHybridPeeringDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. - * @param message HybridPeeringDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IHybridPeeringDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HybridPeeringDetails - * @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.netapp.v1.HybridPeeringDetails; - - /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HybridPeeringDetails - * @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.netapp.v1.HybridPeeringDetails; - - /** - * Verifies a HybridPeeringDetails 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 HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HybridPeeringDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HybridPeeringDetails; - - /** - * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. - * @param message HybridPeeringDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.HybridPeeringDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HybridPeeringDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HybridPeeringDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListReplicationsRequest. */ - interface IListReplicationsRequest { - - /** ListReplicationsRequest parent */ - parent?: (string|null); - - /** ListReplicationsRequest pageSize */ - pageSize?: (number|null); - - /** ListReplicationsRequest pageToken */ - pageToken?: (string|null); - - /** ListReplicationsRequest orderBy */ - orderBy?: (string|null); - - /** ListReplicationsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListReplicationsRequest. */ - class ListReplicationsRequest implements IListReplicationsRequest { - - /** - * Constructs a new ListReplicationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListReplicationsRequest); - - /** ListReplicationsRequest parent. */ - public parent: string; - - /** ListReplicationsRequest pageSize. */ - public pageSize: number; - - /** ListReplicationsRequest pageToken. */ - public pageToken: string; - - /** ListReplicationsRequest orderBy. */ - public orderBy: string; - - /** ListReplicationsRequest filter. */ - public filter: string; - - /** - * Creates a new ListReplicationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListReplicationsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListReplicationsRequest): google.cloud.netapp.v1.ListReplicationsRequest; - - /** - * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. - * @param message ListReplicationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. - * @param message ListReplicationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListReplicationsRequest - * @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.netapp.v1.ListReplicationsRequest; - - /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListReplicationsRequest - * @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.netapp.v1.ListReplicationsRequest; - - /** - * Verifies a ListReplicationsRequest 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 ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListReplicationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsRequest; - - /** - * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. - * @param message ListReplicationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListReplicationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListReplicationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListReplicationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListReplicationsResponse. */ - interface IListReplicationsResponse { - - /** ListReplicationsResponse replications */ - replications?: (google.cloud.netapp.v1.IReplication[]|null); - - /** ListReplicationsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListReplicationsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListReplicationsResponse. */ - class ListReplicationsResponse implements IListReplicationsResponse { - - /** - * Constructs a new ListReplicationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListReplicationsResponse); - - /** ListReplicationsResponse replications. */ - public replications: google.cloud.netapp.v1.IReplication[]; - - /** ListReplicationsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListReplicationsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListReplicationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListReplicationsResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListReplicationsResponse): google.cloud.netapp.v1.ListReplicationsResponse; - - /** - * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. - * @param message ListReplicationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. - * @param message ListReplicationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListReplicationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListReplicationsResponse - * @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.netapp.v1.ListReplicationsResponse; - - /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListReplicationsResponse - * @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.netapp.v1.ListReplicationsResponse; - - /** - * Verifies a ListReplicationsResponse 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 ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListReplicationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListReplicationsResponse; - - /** - * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. - * @param message ListReplicationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListReplicationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListReplicationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListReplicationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetReplicationRequest. */ - interface IGetReplicationRequest { - - /** GetReplicationRequest name */ - name?: (string|null); - } - - /** Represents a GetReplicationRequest. */ - class GetReplicationRequest implements IGetReplicationRequest { - - /** - * Constructs a new GetReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetReplicationRequest); - - /** GetReplicationRequest name. */ - public name: string; - - /** - * Creates a new GetReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetReplicationRequest): google.cloud.netapp.v1.GetReplicationRequest; - - /** - * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. - * @param message GetReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. - * @param message GetReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetReplicationRequest - * @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.netapp.v1.GetReplicationRequest; - - /** - * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetReplicationRequest - * @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.netapp.v1.GetReplicationRequest; - - /** - * Verifies a GetReplicationRequest 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 GetReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetReplicationRequest; - - /** - * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. - * @param message GetReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DestinationVolumeParameters. */ - interface IDestinationVolumeParameters { - - /** DestinationVolumeParameters storagePool */ - storagePool?: (string|null); - - /** DestinationVolumeParameters volumeId */ - volumeId?: (string|null); - - /** DestinationVolumeParameters shareName */ - shareName?: (string|null); - - /** DestinationVolumeParameters description */ - description?: (string|null); - - /** DestinationVolumeParameters tieringPolicy */ - tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); - } - - /** Represents a DestinationVolumeParameters. */ - class DestinationVolumeParameters implements IDestinationVolumeParameters { - - /** - * Constructs a new DestinationVolumeParameters. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters); - - /** DestinationVolumeParameters storagePool. */ - public storagePool: string; - - /** DestinationVolumeParameters volumeId. */ - public volumeId: string; - - /** DestinationVolumeParameters shareName. */ - public shareName: string; - - /** DestinationVolumeParameters description. */ - public description?: (string|null); - - /** DestinationVolumeParameters tieringPolicy. */ - public tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); - - /** - * Creates a new DestinationVolumeParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns DestinationVolumeParameters instance - */ - public static create(properties?: google.cloud.netapp.v1.IDestinationVolumeParameters): google.cloud.netapp.v1.DestinationVolumeParameters; - - /** - * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. - * @param message DestinationVolumeParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. - * @param message DestinationVolumeParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDestinationVolumeParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DestinationVolumeParameters - * @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.netapp.v1.DestinationVolumeParameters; - - /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestinationVolumeParameters - * @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.netapp.v1.DestinationVolumeParameters; - - /** - * Verifies a DestinationVolumeParameters 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 DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DestinationVolumeParameters - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DestinationVolumeParameters; - - /** - * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. - * @param message DestinationVolumeParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DestinationVolumeParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DestinationVolumeParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DestinationVolumeParameters - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateReplicationRequest. */ - interface ICreateReplicationRequest { - - /** CreateReplicationRequest parent */ - parent?: (string|null); - - /** CreateReplicationRequest replication */ - replication?: (google.cloud.netapp.v1.IReplication|null); - - /** CreateReplicationRequest replicationId */ - replicationId?: (string|null); - } - - /** Represents a CreateReplicationRequest. */ - class CreateReplicationRequest implements ICreateReplicationRequest { - - /** - * Constructs a new CreateReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateReplicationRequest); - - /** CreateReplicationRequest parent. */ - public parent: string; - - /** CreateReplicationRequest replication. */ - public replication?: (google.cloud.netapp.v1.IReplication|null); - - /** CreateReplicationRequest replicationId. */ - public replicationId: string; - - /** - * Creates a new CreateReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateReplicationRequest): google.cloud.netapp.v1.CreateReplicationRequest; - - /** - * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. - * @param message CreateReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. - * @param message CreateReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateReplicationRequest - * @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.netapp.v1.CreateReplicationRequest; - - /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateReplicationRequest - * @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.netapp.v1.CreateReplicationRequest; - - /** - * Verifies a CreateReplicationRequest 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 CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateReplicationRequest; - - /** - * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. - * @param message CreateReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteReplicationRequest. */ - interface IDeleteReplicationRequest { - - /** DeleteReplicationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteReplicationRequest. */ - class DeleteReplicationRequest implements IDeleteReplicationRequest { - - /** - * Constructs a new DeleteReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest); - - /** DeleteReplicationRequest name. */ - public name: string; - - /** - * Creates a new DeleteReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteReplicationRequest): google.cloud.netapp.v1.DeleteReplicationRequest; - - /** - * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @param message DeleteReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @param message DeleteReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteReplicationRequest - * @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.netapp.v1.DeleteReplicationRequest; - - /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteReplicationRequest - * @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.netapp.v1.DeleteReplicationRequest; - - /** - * Verifies a DeleteReplicationRequest 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 DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteReplicationRequest; - - /** - * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. - * @param message DeleteReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateReplicationRequest. */ - interface IUpdateReplicationRequest { - - /** UpdateReplicationRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateReplicationRequest replication */ - replication?: (google.cloud.netapp.v1.IReplication|null); - } - - /** Represents an UpdateReplicationRequest. */ - class UpdateReplicationRequest implements IUpdateReplicationRequest { - - /** - * Constructs a new UpdateReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest); - - /** UpdateReplicationRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateReplicationRequest replication. */ - public replication?: (google.cloud.netapp.v1.IReplication|null); - - /** - * Creates a new UpdateReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateReplicationRequest): google.cloud.netapp.v1.UpdateReplicationRequest; - - /** - * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. - * @param message UpdateReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. - * @param message UpdateReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateReplicationRequest - * @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.netapp.v1.UpdateReplicationRequest; - - /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateReplicationRequest - * @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.netapp.v1.UpdateReplicationRequest; - - /** - * Verifies an UpdateReplicationRequest 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 UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateReplicationRequest; - - /** - * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. - * @param message UpdateReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopReplicationRequest. */ - interface IStopReplicationRequest { - - /** StopReplicationRequest name */ - name?: (string|null); - - /** StopReplicationRequest force */ - force?: (boolean|null); - } - - /** Represents a StopReplicationRequest. */ - class StopReplicationRequest implements IStopReplicationRequest { - - /** - * Constructs a new StopReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IStopReplicationRequest); - - /** StopReplicationRequest name. */ - public name: string; - - /** StopReplicationRequest force. */ - public force: boolean; - - /** - * Creates a new StopReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IStopReplicationRequest): google.cloud.netapp.v1.StopReplicationRequest; - - /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. - * @param message StopReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IStopReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopReplicationRequest - * @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.netapp.v1.StopReplicationRequest; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopReplicationRequest - * @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.netapp.v1.StopReplicationRequest; - - /** - * Verifies a StopReplicationRequest 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 StopReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StopReplicationRequest; - - /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. - * @param message StopReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.StopReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResumeReplicationRequest. */ - interface IResumeReplicationRequest { - - /** ResumeReplicationRequest name */ - name?: (string|null); - } - - /** Represents a ResumeReplicationRequest. */ - class ResumeReplicationRequest implements IResumeReplicationRequest { - - /** - * Constructs a new ResumeReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IResumeReplicationRequest); - - /** ResumeReplicationRequest name. */ - public name: string; - - /** - * Creates a new ResumeReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ResumeReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IResumeReplicationRequest): google.cloud.netapp.v1.ResumeReplicationRequest; - - /** - * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. - * @param message ResumeReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. - * @param message ResumeReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IResumeReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResumeReplicationRequest - * @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.netapp.v1.ResumeReplicationRequest; - - /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResumeReplicationRequest - * @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.netapp.v1.ResumeReplicationRequest; - - /** - * Verifies a ResumeReplicationRequest 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 ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResumeReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ResumeReplicationRequest; - - /** - * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. - * @param message ResumeReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ResumeReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResumeReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResumeReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReverseReplicationDirectionRequest. */ - interface IReverseReplicationDirectionRequest { - - /** ReverseReplicationDirectionRequest name */ - name?: (string|null); - } - - /** Represents a ReverseReplicationDirectionRequest. */ - class ReverseReplicationDirectionRequest implements IReverseReplicationDirectionRequest { - - /** - * Constructs a new ReverseReplicationDirectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest); - - /** ReverseReplicationDirectionRequest name. */ - public name: string; - - /** - * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReverseReplicationDirectionRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IReverseReplicationDirectionRequest): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; - - /** - * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. - * @param message ReverseReplicationDirectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. - * @param message ReverseReplicationDirectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IReverseReplicationDirectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReverseReplicationDirectionRequest - * @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.netapp.v1.ReverseReplicationDirectionRequest; - - /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReverseReplicationDirectionRequest - * @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.netapp.v1.ReverseReplicationDirectionRequest; - - /** - * Verifies a ReverseReplicationDirectionRequest 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 ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReverseReplicationDirectionRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ReverseReplicationDirectionRequest; - - /** - * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. - * @param message ReverseReplicationDirectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ReverseReplicationDirectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReverseReplicationDirectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReverseReplicationDirectionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EstablishPeeringRequest. */ - interface IEstablishPeeringRequest { - - /** EstablishPeeringRequest name */ - name?: (string|null); - - /** EstablishPeeringRequest peerClusterName */ - peerClusterName?: (string|null); - - /** EstablishPeeringRequest peerSvmName */ - peerSvmName?: (string|null); - - /** EstablishPeeringRequest peerIpAddresses */ - peerIpAddresses?: (string[]|null); - - /** EstablishPeeringRequest peerVolumeName */ - peerVolumeName?: (string|null); - } - - /** Represents an EstablishPeeringRequest. */ - class EstablishPeeringRequest implements IEstablishPeeringRequest { - - /** - * Constructs a new EstablishPeeringRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IEstablishPeeringRequest); - - /** EstablishPeeringRequest name. */ - public name: string; - - /** EstablishPeeringRequest peerClusterName. */ - public peerClusterName: string; - - /** EstablishPeeringRequest peerSvmName. */ - public peerSvmName: string; - - /** EstablishPeeringRequest peerIpAddresses. */ - public peerIpAddresses: string[]; - - /** EstablishPeeringRequest peerVolumeName. */ - public peerVolumeName: string; - - /** - * Creates a new EstablishPeeringRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EstablishPeeringRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IEstablishPeeringRequest): google.cloud.netapp.v1.EstablishPeeringRequest; - - /** - * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. - * @param message EstablishPeeringRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IEstablishPeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. - * @param message EstablishPeeringRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IEstablishPeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EstablishPeeringRequest - * @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.netapp.v1.EstablishPeeringRequest; - - /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EstablishPeeringRequest - * @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.netapp.v1.EstablishPeeringRequest; - - /** - * Verifies an EstablishPeeringRequest 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 EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EstablishPeeringRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EstablishPeeringRequest; - - /** - * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. - * @param message EstablishPeeringRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.EstablishPeeringRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EstablishPeeringRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EstablishPeeringRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SyncReplicationRequest. */ - interface ISyncReplicationRequest { - - /** SyncReplicationRequest name */ - name?: (string|null); - } - - /** Represents a SyncReplicationRequest. */ - class SyncReplicationRequest implements ISyncReplicationRequest { - - /** - * Constructs a new SyncReplicationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ISyncReplicationRequest); - - /** SyncReplicationRequest name. */ - public name: string; - - /** - * Creates a new SyncReplicationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncReplicationRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ISyncReplicationRequest): google.cloud.netapp.v1.SyncReplicationRequest; - - /** - * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. - * @param message SyncReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ISyncReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. - * @param message SyncReplicationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ISyncReplicationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncReplicationRequest - * @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.netapp.v1.SyncReplicationRequest; - - /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncReplicationRequest - * @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.netapp.v1.SyncReplicationRequest; - - /** - * Verifies a SyncReplicationRequest 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 SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncReplicationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SyncReplicationRequest; - - /** - * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. - * @param message SyncReplicationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.SyncReplicationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncReplicationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SyncReplicationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Protocols enum. */ - enum Protocols { - PROTOCOLS_UNSPECIFIED = 0, - NFSV3 = 1, - NFSV4 = 2, - SMB = 3, - ISCSI = 4 - } - - /** AccessType enum. */ - enum AccessType { - ACCESS_TYPE_UNSPECIFIED = 0, - READ_ONLY = 1, - READ_WRITE = 2, - READ_NONE = 3 - } - - /** SMBSettings enum. */ - enum SMBSettings { - SMB_SETTINGS_UNSPECIFIED = 0, - ENCRYPT_DATA = 1, - BROWSABLE = 2, - CHANGE_NOTIFY = 3, - NON_BROWSABLE = 4, - OPLOCKS = 5, - SHOW_SNAPSHOT = 6, - SHOW_PREVIOUS_VERSIONS = 7, - ACCESS_BASED_ENUMERATION = 8, - CONTINUOUSLY_AVAILABLE = 9 - } - - /** SecurityStyle enum. */ - enum SecurityStyle { - SECURITY_STYLE_UNSPECIFIED = 0, - NTFS = 1, - UNIX = 2 - } - - /** RestrictedAction enum. */ - enum RestrictedAction { - RESTRICTED_ACTION_UNSPECIFIED = 0, - DELETE = 1 - } - - /** Properties of a ListVolumesRequest. */ - interface IListVolumesRequest { - - /** ListVolumesRequest parent */ - parent?: (string|null); - - /** ListVolumesRequest pageSize */ - pageSize?: (number|null); - - /** ListVolumesRequest pageToken */ - pageToken?: (string|null); - - /** ListVolumesRequest filter */ - filter?: (string|null); - - /** ListVolumesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListVolumesRequest. */ - class ListVolumesRequest implements IListVolumesRequest { - - /** - * Constructs a new ListVolumesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListVolumesRequest); - - /** ListVolumesRequest parent. */ - public parent: string; - - /** ListVolumesRequest pageSize. */ - public pageSize: number; - - /** ListVolumesRequest pageToken. */ - public pageToken: string; - - /** ListVolumesRequest filter. */ - public filter: string; - - /** ListVolumesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListVolumesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVolumesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListVolumesRequest): google.cloud.netapp.v1.ListVolumesRequest; - - /** - * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. - * @param message ListVolumesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. - * @param message ListVolumesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVolumesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVolumesRequest - * @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.netapp.v1.ListVolumesRequest; - - /** - * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVolumesRequest - * @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.netapp.v1.ListVolumesRequest; - - /** - * Verifies a ListVolumesRequest 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 ListVolumesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVolumesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesRequest; - - /** - * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. - * @param message ListVolumesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListVolumesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVolumesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVolumesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVolumesResponse. */ - interface IListVolumesResponse { - - /** ListVolumesResponse volumes */ - volumes?: (google.cloud.netapp.v1.IVolume[]|null); - - /** ListVolumesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListVolumesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListVolumesResponse. */ - class ListVolumesResponse implements IListVolumesResponse { - - /** - * Constructs a new ListVolumesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListVolumesResponse); - - /** ListVolumesResponse volumes. */ - public volumes: google.cloud.netapp.v1.IVolume[]; - - /** ListVolumesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListVolumesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListVolumesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVolumesResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListVolumesResponse): google.cloud.netapp.v1.ListVolumesResponse; - - /** - * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. - * @param message ListVolumesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. - * @param message ListVolumesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListVolumesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVolumesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVolumesResponse - * @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.netapp.v1.ListVolumesResponse; - - /** - * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVolumesResponse - * @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.netapp.v1.ListVolumesResponse; - - /** - * Verifies a ListVolumesResponse 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 ListVolumesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVolumesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListVolumesResponse; - - /** - * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. - * @param message ListVolumesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListVolumesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVolumesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVolumesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetVolumeRequest. */ - interface IGetVolumeRequest { - - /** GetVolumeRequest name */ - name?: (string|null); - } - - /** Represents a GetVolumeRequest. */ - class GetVolumeRequest implements IGetVolumeRequest { - - /** - * Constructs a new GetVolumeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetVolumeRequest); - - /** GetVolumeRequest name. */ - public name: string; - - /** - * Creates a new GetVolumeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVolumeRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetVolumeRequest): google.cloud.netapp.v1.GetVolumeRequest; - - /** - * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. - * @param message GetVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. - * @param message GetVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVolumeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVolumeRequest - * @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.netapp.v1.GetVolumeRequest; - - /** - * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVolumeRequest - * @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.netapp.v1.GetVolumeRequest; - - /** - * Verifies a GetVolumeRequest 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 GetVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVolumeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetVolumeRequest; - - /** - * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. - * @param message GetVolumeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVolumeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVolumeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateVolumeRequest. */ - interface ICreateVolumeRequest { - - /** CreateVolumeRequest parent */ - parent?: (string|null); - - /** CreateVolumeRequest volumeId */ - volumeId?: (string|null); - - /** CreateVolumeRequest volume */ - volume?: (google.cloud.netapp.v1.IVolume|null); - } - - /** Represents a CreateVolumeRequest. */ - class CreateVolumeRequest implements ICreateVolumeRequest { - - /** - * Constructs a new CreateVolumeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateVolumeRequest); - - /** CreateVolumeRequest parent. */ - public parent: string; - - /** CreateVolumeRequest volumeId. */ - public volumeId: string; - - /** CreateVolumeRequest volume. */ - public volume?: (google.cloud.netapp.v1.IVolume|null); - - /** - * Creates a new CreateVolumeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateVolumeRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateVolumeRequest): google.cloud.netapp.v1.CreateVolumeRequest; - - /** - * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. - * @param message CreateVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. - * @param message CreateVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateVolumeRequest - * @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.netapp.v1.CreateVolumeRequest; - - /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateVolumeRequest - * @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.netapp.v1.CreateVolumeRequest; - - /** - * Verifies a CreateVolumeRequest 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 CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateVolumeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateVolumeRequest; - - /** - * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. - * @param message CreateVolumeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateVolumeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateVolumeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateVolumeRequest. */ - interface IUpdateVolumeRequest { - - /** UpdateVolumeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVolumeRequest volume */ - volume?: (google.cloud.netapp.v1.IVolume|null); - } - - /** Represents an UpdateVolumeRequest. */ - class UpdateVolumeRequest implements IUpdateVolumeRequest { - - /** - * Constructs a new UpdateVolumeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest); - - /** UpdateVolumeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVolumeRequest volume. */ - public volume?: (google.cloud.netapp.v1.IVolume|null); - - /** - * Creates a new UpdateVolumeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateVolumeRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateVolumeRequest): google.cloud.netapp.v1.UpdateVolumeRequest; - - /** - * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. - * @param message UpdateVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. - * @param message UpdateVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateVolumeRequest - * @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.netapp.v1.UpdateVolumeRequest; - - /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateVolumeRequest - * @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.netapp.v1.UpdateVolumeRequest; - - /** - * Verifies an UpdateVolumeRequest 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 UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateVolumeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateVolumeRequest; - - /** - * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. - * @param message UpdateVolumeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateVolumeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateVolumeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteVolumeRequest. */ - interface IDeleteVolumeRequest { - - /** DeleteVolumeRequest name */ - name?: (string|null); - - /** DeleteVolumeRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteVolumeRequest. */ - class DeleteVolumeRequest implements IDeleteVolumeRequest { - - /** - * Constructs a new DeleteVolumeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest); - - /** DeleteVolumeRequest name. */ - public name: string; - - /** DeleteVolumeRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteVolumeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVolumeRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteVolumeRequest): google.cloud.netapp.v1.DeleteVolumeRequest; - - /** - * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. - * @param message DeleteVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. - * @param message DeleteVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVolumeRequest - * @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.netapp.v1.DeleteVolumeRequest; - - /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVolumeRequest - * @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.netapp.v1.DeleteVolumeRequest; - - /** - * Verifies a DeleteVolumeRequest 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 DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVolumeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteVolumeRequest; - - /** - * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. - * @param message DeleteVolumeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteVolumeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteVolumeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RevertVolumeRequest. */ - interface IRevertVolumeRequest { - - /** RevertVolumeRequest name */ - name?: (string|null); - - /** RevertVolumeRequest snapshotId */ - snapshotId?: (string|null); - } - - /** Represents a RevertVolumeRequest. */ - class RevertVolumeRequest implements IRevertVolumeRequest { - - /** - * Constructs a new RevertVolumeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IRevertVolumeRequest); - - /** RevertVolumeRequest name. */ - public name: string; - - /** RevertVolumeRequest snapshotId. */ - public snapshotId: string; - - /** - * Creates a new RevertVolumeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RevertVolumeRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IRevertVolumeRequest): google.cloud.netapp.v1.RevertVolumeRequest; - - /** - * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. - * @param message RevertVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. - * @param message RevertVolumeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IRevertVolumeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RevertVolumeRequest - * @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.netapp.v1.RevertVolumeRequest; - - /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RevertVolumeRequest - * @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.netapp.v1.RevertVolumeRequest; - - /** - * Verifies a RevertVolumeRequest 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 RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RevertVolumeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RevertVolumeRequest; - - /** - * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. - * @param message RevertVolumeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.RevertVolumeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RevertVolumeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RevertVolumeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Volume. */ - interface IVolume { - - /** Volume name */ - name?: (string|null); - - /** Volume state */ - state?: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State|null); - - /** Volume stateDetails */ - stateDetails?: (string|null); - - /** Volume createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Volume shareName */ - shareName?: (string|null); - - /** Volume psaRange */ - psaRange?: (string|null); - - /** Volume storagePool */ - storagePool?: (string|null); - - /** Volume network */ - network?: (string|null); - - /** Volume serviceLevel */ - serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); - - /** Volume capacityGib */ - capacityGib?: (number|Long|string|null); - - /** Volume exportPolicy */ - exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); - - /** Volume protocols */ - protocols?: (google.cloud.netapp.v1.Protocols[]|null); - - /** Volume smbSettings */ - smbSettings?: (google.cloud.netapp.v1.SMBSettings[]|null); - - /** Volume mountOptions */ - mountOptions?: (google.cloud.netapp.v1.IMountOption[]|null); - - /** Volume unixPermissions */ - unixPermissions?: (string|null); - - /** Volume labels */ - labels?: ({ [k: string]: string }|null); - - /** Volume description */ - description?: (string|null); - - /** Volume snapshotPolicy */ - snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); - - /** Volume snapReserve */ - snapReserve?: (number|null); - - /** Volume snapshotDirectory */ - snapshotDirectory?: (boolean|null); - - /** Volume usedGib */ - usedGib?: (number|Long|string|null); - - /** Volume securityStyle */ - securityStyle?: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle|null); - - /** Volume kerberosEnabled */ - kerberosEnabled?: (boolean|null); - - /** Volume ldapEnabled */ - ldapEnabled?: (boolean|null); - - /** Volume activeDirectory */ - activeDirectory?: (string|null); - - /** Volume restoreParameters */ - restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); - - /** Volume kmsConfig */ - kmsConfig?: (string|null); - - /** Volume encryptionType */ - encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); - - /** Volume hasReplication */ - hasReplication?: (boolean|null); - - /** Volume backupConfig */ - backupConfig?: (google.cloud.netapp.v1.IBackupConfig|null); - - /** Volume restrictedActions */ - restrictedActions?: (google.cloud.netapp.v1.RestrictedAction[]|null); - - /** Volume largeCapacity */ - largeCapacity?: (boolean|null); - - /** Volume multipleEndpoints */ - multipleEndpoints?: (boolean|null); - - /** Volume tieringPolicy */ - tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); - - /** Volume replicaZone */ - replicaZone?: (string|null); - - /** Volume zone */ - zone?: (string|null); - - /** Volume coldTierSizeGib */ - coldTierSizeGib?: (number|Long|string|null); - - /** Volume hybridReplicationParameters */ - hybridReplicationParameters?: (google.cloud.netapp.v1.IHybridReplicationParameters|null); - - /** Volume throughputMibps */ - throughputMibps?: (number|null); - - /** Volume cacheParameters */ - cacheParameters?: (google.cloud.netapp.v1.ICacheParameters|null); - - /** Volume hotTierSizeUsedGib */ - hotTierSizeUsedGib?: (number|Long|string|null); - - /** Volume blockDevices */ - blockDevices?: (google.cloud.netapp.v1.IBlockDevice[]|null); - - /** Volume cloneDetails */ - cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); - } - - /** Represents a Volume. */ - class Volume implements IVolume { - - /** - * Constructs a new Volume. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IVolume); - - /** Volume name. */ - public name: string; - - /** Volume state. */ - public state: (google.cloud.netapp.v1.Volume.State|keyof typeof google.cloud.netapp.v1.Volume.State); - - /** Volume stateDetails. */ - public stateDetails: string; - - /** Volume createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Volume shareName. */ - public shareName: string; - - /** Volume psaRange. */ - public psaRange: string; - - /** Volume storagePool. */ - public storagePool: string; - - /** Volume network. */ - public network: string; - - /** Volume serviceLevel. */ - public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); - - /** Volume capacityGib. */ - public capacityGib: (number|Long|string); - - /** Volume exportPolicy. */ - public exportPolicy?: (google.cloud.netapp.v1.IExportPolicy|null); - - /** Volume protocols. */ - public protocols: google.cloud.netapp.v1.Protocols[]; - - /** Volume smbSettings. */ - public smbSettings: google.cloud.netapp.v1.SMBSettings[]; - - /** Volume mountOptions. */ - public mountOptions: google.cloud.netapp.v1.IMountOption[]; - - /** Volume unixPermissions. */ - public unixPermissions: string; - - /** Volume labels. */ - public labels: { [k: string]: string }; - - /** Volume description. */ - public description: string; - - /** Volume snapshotPolicy. */ - public snapshotPolicy?: (google.cloud.netapp.v1.ISnapshotPolicy|null); - - /** Volume snapReserve. */ - public snapReserve: number; - - /** Volume snapshotDirectory. */ - public snapshotDirectory: boolean; - - /** Volume usedGib. */ - public usedGib: (number|Long|string); - - /** Volume securityStyle. */ - public securityStyle: (google.cloud.netapp.v1.SecurityStyle|keyof typeof google.cloud.netapp.v1.SecurityStyle); - - /** Volume kerberosEnabled. */ - public kerberosEnabled: boolean; - - /** Volume ldapEnabled. */ - public ldapEnabled: boolean; - - /** Volume activeDirectory. */ - public activeDirectory: string; - - /** Volume restoreParameters. */ - public restoreParameters?: (google.cloud.netapp.v1.IRestoreParameters|null); - - /** Volume kmsConfig. */ - public kmsConfig: string; - - /** Volume encryptionType. */ - public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); - - /** Volume hasReplication. */ - public hasReplication: boolean; - - /** Volume backupConfig. */ - public backupConfig?: (google.cloud.netapp.v1.IBackupConfig|null); - - /** Volume restrictedActions. */ - public restrictedActions: google.cloud.netapp.v1.RestrictedAction[]; - - /** Volume largeCapacity. */ - public largeCapacity: boolean; - - /** Volume multipleEndpoints. */ - public multipleEndpoints: boolean; - - /** Volume tieringPolicy. */ - public tieringPolicy?: (google.cloud.netapp.v1.ITieringPolicy|null); - - /** Volume replicaZone. */ - public replicaZone: string; - - /** Volume zone. */ - public zone: string; - - /** Volume coldTierSizeGib. */ - public coldTierSizeGib: (number|Long|string); - - /** Volume hybridReplicationParameters. */ - public hybridReplicationParameters?: (google.cloud.netapp.v1.IHybridReplicationParameters|null); - - /** Volume throughputMibps. */ - public throughputMibps: number; - - /** Volume cacheParameters. */ - public cacheParameters?: (google.cloud.netapp.v1.ICacheParameters|null); - - /** Volume hotTierSizeUsedGib. */ - public hotTierSizeUsedGib: (number|Long|string); - - /** Volume blockDevices. */ - public blockDevices: google.cloud.netapp.v1.IBlockDevice[]; - - /** Volume cloneDetails. */ - public cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); - - /** - * Creates a new Volume instance using the specified properties. - * @param [properties] Properties to set - * @returns Volume instance - */ - public static create(properties?: google.cloud.netapp.v1.IVolume): google.cloud.netapp.v1.Volume; - - /** - * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. - * @param message Volume message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. - * @param message Volume message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Volume message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Volume - * @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.netapp.v1.Volume; - - /** - * Decodes a Volume message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Volume - * @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.netapp.v1.Volume; - - /** - * Verifies a Volume 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 Volume message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Volume - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume; - - /** - * Creates a plain object from a Volume message. Also converts values to other types if specified. - * @param message Volume - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.Volume, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Volume to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Volume - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Volume { - - /** Properties of a CloneDetails. */ - interface ICloneDetails { - - /** CloneDetails sourceSnapshot */ - sourceSnapshot?: (string|null); - - /** CloneDetails sourceVolume */ - sourceVolume?: (string|null); - - /** CloneDetails sharedSpaceGib */ - sharedSpaceGib?: (number|Long|string|null); - } - - /** Represents a CloneDetails. */ - class CloneDetails implements ICloneDetails { - - /** - * Constructs a new CloneDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.Volume.ICloneDetails); - - /** CloneDetails sourceSnapshot. */ - public sourceSnapshot: string; - - /** CloneDetails sourceVolume. */ - public sourceVolume: string; - - /** CloneDetails sharedSpaceGib. */ - public sharedSpaceGib: (number|Long|string); - - /** - * Creates a new CloneDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns CloneDetails instance - */ - public static create(properties?: google.cloud.netapp.v1.Volume.ICloneDetails): google.cloud.netapp.v1.Volume.CloneDetails; - - /** - * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. - * @param message CloneDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. - * @param message CloneDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloneDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloneDetails - * @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.netapp.v1.Volume.CloneDetails; - - /** - * Decodes a CloneDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloneDetails - * @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.netapp.v1.Volume.CloneDetails; - - /** - * Verifies a CloneDetails 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 CloneDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloneDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume.CloneDetails; - - /** - * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. - * @param message CloneDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.Volume.CloneDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloneDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloneDetails - * @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, - READY = 1, - CREATING = 2, - DELETING = 3, - UPDATING = 4, - RESTORING = 5, - DISABLED = 6, - ERROR = 7, - PREPARING = 8, - READ_ONLY = 9 - } - } - - /** Properties of an ExportPolicy. */ - interface IExportPolicy { - - /** ExportPolicy rules */ - rules?: (google.cloud.netapp.v1.ISimpleExportPolicyRule[]|null); - } - - /** Represents an ExportPolicy. */ - class ExportPolicy implements IExportPolicy { - - /** - * Constructs a new ExportPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IExportPolicy); - - /** ExportPolicy rules. */ - public rules: google.cloud.netapp.v1.ISimpleExportPolicyRule[]; - - /** - * Creates a new ExportPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportPolicy instance - */ - public static create(properties?: google.cloud.netapp.v1.IExportPolicy): google.cloud.netapp.v1.ExportPolicy; - - /** - * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. - * @param message ExportPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. - * @param message ExportPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IExportPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportPolicy - * @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.netapp.v1.ExportPolicy; - - /** - * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportPolicy - * @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.netapp.v1.ExportPolicy; - - /** - * Verifies an ExportPolicy 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 ExportPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExportPolicy; - - /** - * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. - * @param message ExportPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ExportPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SimpleExportPolicyRule. */ - interface ISimpleExportPolicyRule { - - /** SimpleExportPolicyRule allowedClients */ - allowedClients?: (string|null); - - /** SimpleExportPolicyRule hasRootAccess */ - hasRootAccess?: (string|null); - - /** SimpleExportPolicyRule accessType */ - accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); - - /** SimpleExportPolicyRule nfsv3 */ - nfsv3?: (boolean|null); - - /** SimpleExportPolicyRule nfsv4 */ - nfsv4?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5ReadOnly */ - kerberos_5ReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5ReadWrite */ - kerberos_5ReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5iReadOnly */ - kerberos_5iReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5iReadWrite */ - kerberos_5iReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5pReadOnly */ - kerberos_5pReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5pReadWrite */ - kerberos_5pReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule squashMode */ - squashMode?: (google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|keyof typeof google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null); - - /** SimpleExportPolicyRule anonUid */ - anonUid?: (number|Long|string|null); - } - - /** Represents a SimpleExportPolicyRule. */ - class SimpleExportPolicyRule implements ISimpleExportPolicyRule { - - /** - * Constructs a new SimpleExportPolicyRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule); - - /** SimpleExportPolicyRule allowedClients. */ - public allowedClients?: (string|null); - - /** SimpleExportPolicyRule hasRootAccess. */ - public hasRootAccess?: (string|null); - - /** SimpleExportPolicyRule accessType. */ - public accessType?: (google.cloud.netapp.v1.AccessType|keyof typeof google.cloud.netapp.v1.AccessType|null); - - /** SimpleExportPolicyRule nfsv3. */ - public nfsv3?: (boolean|null); - - /** SimpleExportPolicyRule nfsv4. */ - public nfsv4?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5ReadOnly. */ - public kerberos_5ReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5ReadWrite. */ - public kerberos_5ReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5iReadOnly. */ - public kerberos_5iReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5iReadWrite. */ - public kerberos_5iReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5pReadOnly. */ - public kerberos_5pReadOnly?: (boolean|null); - - /** SimpleExportPolicyRule kerberos_5pReadWrite. */ - public kerberos_5pReadWrite?: (boolean|null); - - /** SimpleExportPolicyRule squashMode. */ - public squashMode?: (google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|keyof typeof google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null); - - /** SimpleExportPolicyRule anonUid. */ - public anonUid?: (number|Long|string|null); - - /** - * Creates a new SimpleExportPolicyRule instance using the specified properties. - * @param [properties] Properties to set - * @returns SimpleExportPolicyRule instance - */ - public static create(properties?: google.cloud.netapp.v1.ISimpleExportPolicyRule): google.cloud.netapp.v1.SimpleExportPolicyRule; - - /** - * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. - * @param message SimpleExportPolicyRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. - * @param message SimpleExportPolicyRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ISimpleExportPolicyRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimpleExportPolicyRule - * @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.netapp.v1.SimpleExportPolicyRule; - - /** - * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimpleExportPolicyRule - * @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.netapp.v1.SimpleExportPolicyRule; - - /** - * Verifies a SimpleExportPolicyRule 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 SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimpleExportPolicyRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SimpleExportPolicyRule; - - /** - * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. - * @param message SimpleExportPolicyRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.SimpleExportPolicyRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimpleExportPolicyRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimpleExportPolicyRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SimpleExportPolicyRule { - - /** SquashMode enum. */ - enum SquashMode { - SQUASH_MODE_UNSPECIFIED = 0, - NO_ROOT_SQUASH = 1, - ROOT_SQUASH = 2, - ALL_SQUASH = 3 - } - } - - /** Properties of a SnapshotPolicy. */ - interface ISnapshotPolicy { - - /** SnapshotPolicy enabled */ - enabled?: (boolean|null); - - /** SnapshotPolicy hourlySchedule */ - hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); - - /** SnapshotPolicy dailySchedule */ - dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); - - /** SnapshotPolicy weeklySchedule */ - weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); - - /** SnapshotPolicy monthlySchedule */ - monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); - } - - /** Represents a SnapshotPolicy. */ - class SnapshotPolicy implements ISnapshotPolicy { - - /** - * Constructs a new SnapshotPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ISnapshotPolicy); - - /** SnapshotPolicy enabled. */ - public enabled?: (boolean|null); - - /** SnapshotPolicy hourlySchedule. */ - public hourlySchedule?: (google.cloud.netapp.v1.IHourlySchedule|null); - - /** SnapshotPolicy dailySchedule. */ - public dailySchedule?: (google.cloud.netapp.v1.IDailySchedule|null); - - /** SnapshotPolicy weeklySchedule. */ - public weeklySchedule?: (google.cloud.netapp.v1.IWeeklySchedule|null); - - /** SnapshotPolicy monthlySchedule. */ - public monthlySchedule?: (google.cloud.netapp.v1.IMonthlySchedule|null); - - /** - * Creates a new SnapshotPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns SnapshotPolicy instance - */ - public static create(properties?: google.cloud.netapp.v1.ISnapshotPolicy): google.cloud.netapp.v1.SnapshotPolicy; - - /** - * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. - * @param message SnapshotPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. - * @param message SnapshotPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshotPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SnapshotPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SnapshotPolicy - * @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.netapp.v1.SnapshotPolicy; - - /** - * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SnapshotPolicy - * @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.netapp.v1.SnapshotPolicy; - - /** - * Verifies a SnapshotPolicy 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 SnapshotPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SnapshotPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SnapshotPolicy; - - /** - * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. - * @param message SnapshotPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.SnapshotPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SnapshotPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SnapshotPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an HourlySchedule. */ - interface IHourlySchedule { - - /** HourlySchedule snapshotsToKeep */ - snapshotsToKeep?: (number|null); - - /** HourlySchedule minute */ - minute?: (number|null); - } - - /** Represents an HourlySchedule. */ - class HourlySchedule implements IHourlySchedule { - - /** - * Constructs a new HourlySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IHourlySchedule); - - /** HourlySchedule snapshotsToKeep. */ - public snapshotsToKeep?: (number|null); - - /** HourlySchedule minute. */ - public minute?: (number|null); - - /** - * Creates a new HourlySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns HourlySchedule instance - */ - public static create(properties?: google.cloud.netapp.v1.IHourlySchedule): google.cloud.netapp.v1.HourlySchedule; - - /** - * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. - * @param message HourlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. - * @param message HourlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IHourlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an HourlySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HourlySchedule - * @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.netapp.v1.HourlySchedule; - - /** - * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HourlySchedule - * @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.netapp.v1.HourlySchedule; - - /** - * Verifies an HourlySchedule 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 HourlySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HourlySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HourlySchedule; - - /** - * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. - * @param message HourlySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.HourlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HourlySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HourlySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DailySchedule. */ - interface IDailySchedule { - - /** DailySchedule snapshotsToKeep */ - snapshotsToKeep?: (number|null); - - /** DailySchedule minute */ - minute?: (number|null); - - /** DailySchedule hour */ - hour?: (number|null); - } - - /** Represents a DailySchedule. */ - class DailySchedule implements IDailySchedule { - - /** - * Constructs a new DailySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDailySchedule); - - /** DailySchedule snapshotsToKeep. */ - public snapshotsToKeep?: (number|null); - - /** DailySchedule minute. */ - public minute?: (number|null); - - /** DailySchedule hour. */ - public hour?: (number|null); - - /** - * Creates a new DailySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns DailySchedule instance - */ - public static create(properties?: google.cloud.netapp.v1.IDailySchedule): google.cloud.netapp.v1.DailySchedule; - - /** - * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. - * @param message DailySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. - * @param message DailySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDailySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DailySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DailySchedule - * @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.netapp.v1.DailySchedule; - - /** - * Decodes a DailySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DailySchedule - * @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.netapp.v1.DailySchedule; - - /** - * Verifies a DailySchedule 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 DailySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DailySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DailySchedule; - - /** - * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. - * @param message DailySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DailySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DailySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DailySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WeeklySchedule. */ - interface IWeeklySchedule { - - /** WeeklySchedule snapshotsToKeep */ - snapshotsToKeep?: (number|null); - - /** WeeklySchedule minute */ - minute?: (number|null); - - /** WeeklySchedule hour */ - hour?: (number|null); - - /** WeeklySchedule day */ - day?: (string|null); - } - - /** Represents a WeeklySchedule. */ - class WeeklySchedule implements IWeeklySchedule { - - /** - * Constructs a new WeeklySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IWeeklySchedule); - - /** WeeklySchedule snapshotsToKeep. */ - public snapshotsToKeep?: (number|null); - - /** WeeklySchedule minute. */ - public minute?: (number|null); - - /** WeeklySchedule hour. */ - public hour?: (number|null); - - /** WeeklySchedule day. */ - public day?: (string|null); - - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns WeeklySchedule instance - */ - public static create(properties?: google.cloud.netapp.v1.IWeeklySchedule): google.cloud.netapp.v1.WeeklySchedule; - - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. - * @param message WeeklySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IWeeklySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeeklySchedule - * @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.netapp.v1.WeeklySchedule; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeeklySchedule - * @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.netapp.v1.WeeklySchedule; - - /** - * Verifies a WeeklySchedule 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 WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeeklySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.WeeklySchedule; - - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @param message WeeklySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.WeeklySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeeklySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WeeklySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MonthlySchedule. */ - interface IMonthlySchedule { - - /** MonthlySchedule snapshotsToKeep */ - snapshotsToKeep?: (number|null); - - /** MonthlySchedule minute */ - minute?: (number|null); - - /** MonthlySchedule hour */ - hour?: (number|null); - - /** MonthlySchedule daysOfMonth */ - daysOfMonth?: (string|null); - } - - /** Represents a MonthlySchedule. */ - class MonthlySchedule implements IMonthlySchedule { - - /** - * Constructs a new MonthlySchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IMonthlySchedule); - - /** MonthlySchedule snapshotsToKeep. */ - public snapshotsToKeep?: (number|null); - - /** MonthlySchedule minute. */ - public minute?: (number|null); - - /** MonthlySchedule hour. */ - public hour?: (number|null); - - /** MonthlySchedule daysOfMonth. */ - public daysOfMonth?: (string|null); - - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns MonthlySchedule instance - */ - public static create(properties?: google.cloud.netapp.v1.IMonthlySchedule): google.cloud.netapp.v1.MonthlySchedule; - - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. - * @param message MonthlySchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IMonthlySchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MonthlySchedule - * @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.netapp.v1.MonthlySchedule; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MonthlySchedule - * @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.netapp.v1.MonthlySchedule; - - /** - * Verifies a MonthlySchedule 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 MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MonthlySchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.MonthlySchedule; - - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @param message MonthlySchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.MonthlySchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MonthlySchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MonthlySchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MountOption. */ - interface IMountOption { - - /** MountOption export */ - "export"?: (string|null); - - /** MountOption exportFull */ - exportFull?: (string|null); - - /** MountOption protocol */ - protocol?: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols|null); - - /** MountOption instructions */ - instructions?: (string|null); - - /** MountOption ipAddress */ - ipAddress?: (string|null); - } - - /** Represents a MountOption. */ - class MountOption implements IMountOption { - - /** - * Constructs a new MountOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IMountOption); - - /** MountOption export. */ - public export: string; - - /** MountOption exportFull. */ - public exportFull: string; - - /** MountOption protocol. */ - public protocol: (google.cloud.netapp.v1.Protocols|keyof typeof google.cloud.netapp.v1.Protocols); - - /** MountOption instructions. */ - public instructions: string; - - /** MountOption ipAddress. */ - public ipAddress: string; - - /** - * Creates a new MountOption instance using the specified properties. - * @param [properties] Properties to set - * @returns MountOption instance - */ - public static create(properties?: google.cloud.netapp.v1.IMountOption): google.cloud.netapp.v1.MountOption; - - /** - * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. - * @param message MountOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. - * @param message MountOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IMountOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MountOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MountOption - * @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.netapp.v1.MountOption; - - /** - * Decodes a MountOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MountOption - * @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.netapp.v1.MountOption; - - /** - * Verifies a MountOption 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 MountOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MountOption - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.MountOption; - - /** - * Creates a plain object from a MountOption message. Also converts values to other types if specified. - * @param message MountOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.MountOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MountOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MountOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreParameters. */ - interface IRestoreParameters { - - /** RestoreParameters sourceSnapshot */ - sourceSnapshot?: (string|null); - - /** RestoreParameters sourceBackup */ - sourceBackup?: (string|null); - } - - /** Represents a RestoreParameters. */ - class RestoreParameters implements IRestoreParameters { - - /** - * Constructs a new RestoreParameters. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IRestoreParameters); - - /** RestoreParameters sourceSnapshot. */ - public sourceSnapshot?: (string|null); - - /** RestoreParameters sourceBackup. */ - public sourceBackup?: (string|null); - - /** RestoreParameters source. */ - public source?: ("sourceSnapshot"|"sourceBackup"); - - /** - * Creates a new RestoreParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreParameters instance - */ - public static create(properties?: google.cloud.netapp.v1.IRestoreParameters): google.cloud.netapp.v1.RestoreParameters; - - /** - * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. - * @param message RestoreParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. - * @param message RestoreParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreParameters - * @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.netapp.v1.RestoreParameters; - - /** - * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreParameters - * @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.netapp.v1.RestoreParameters; - - /** - * Verifies a RestoreParameters 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 RestoreParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreParameters - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreParameters; - - /** - * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. - * @param message RestoreParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.RestoreParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreParameters - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupConfig. */ - interface IBackupConfig { - - /** BackupConfig backupPolicies */ - backupPolicies?: (string[]|null); - - /** BackupConfig backupVault */ - backupVault?: (string|null); - - /** BackupConfig scheduledBackupEnabled */ - scheduledBackupEnabled?: (boolean|null); - - /** BackupConfig backupChainBytes */ - backupChainBytes?: (number|Long|string|null); - } - - /** Represents a BackupConfig. */ - class BackupConfig implements IBackupConfig { - - /** - * Constructs a new BackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IBackupConfig); - - /** BackupConfig backupPolicies. */ - public backupPolicies: string[]; - - /** BackupConfig backupVault. */ - public backupVault: string; - - /** BackupConfig scheduledBackupEnabled. */ - public scheduledBackupEnabled?: (boolean|null); - - /** BackupConfig backupChainBytes. */ - public backupChainBytes?: (number|Long|string|null); - - /** - * Creates a new BackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupConfig instance - */ - public static create(properties?: google.cloud.netapp.v1.IBackupConfig): google.cloud.netapp.v1.BackupConfig; - - /** - * Encodes the specified BackupConfig message. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. - * @param message BackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. - * @param message BackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupConfig - * @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.netapp.v1.BackupConfig; - - /** - * Decodes a BackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupConfig - * @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.netapp.v1.BackupConfig; - - /** - * Verifies a BackupConfig 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 BackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BackupConfig; - - /** - * Creates a plain object from a BackupConfig message. Also converts values to other types if specified. - * @param message BackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.BackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TieringPolicy. */ - interface ITieringPolicy { - - /** TieringPolicy tierAction */ - tierAction?: (google.cloud.netapp.v1.TieringPolicy.TierAction|keyof typeof google.cloud.netapp.v1.TieringPolicy.TierAction|null); - - /** TieringPolicy coolingThresholdDays */ - coolingThresholdDays?: (number|null); - - /** TieringPolicy hotTierBypassModeEnabled */ - hotTierBypassModeEnabled?: (boolean|null); - } - - /** Represents a TieringPolicy. */ - class TieringPolicy implements ITieringPolicy { - - /** - * Constructs a new TieringPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ITieringPolicy); - - /** TieringPolicy tierAction. */ - public tierAction?: (google.cloud.netapp.v1.TieringPolicy.TierAction|keyof typeof google.cloud.netapp.v1.TieringPolicy.TierAction|null); - - /** TieringPolicy coolingThresholdDays. */ - public coolingThresholdDays?: (number|null); - - /** TieringPolicy hotTierBypassModeEnabled. */ - public hotTierBypassModeEnabled?: (boolean|null); - - /** - * Creates a new TieringPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns TieringPolicy instance - */ - public static create(properties?: google.cloud.netapp.v1.ITieringPolicy): google.cloud.netapp.v1.TieringPolicy; - - /** - * Encodes the specified TieringPolicy message. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. - * @param message TieringPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ITieringPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TieringPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. - * @param message TieringPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ITieringPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TieringPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TieringPolicy - * @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.netapp.v1.TieringPolicy; - - /** - * Decodes a TieringPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TieringPolicy - * @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.netapp.v1.TieringPolicy; - - /** - * Verifies a TieringPolicy 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 TieringPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TieringPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.TieringPolicy; - - /** - * Creates a plain object from a TieringPolicy message. Also converts values to other types if specified. - * @param message TieringPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.TieringPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TieringPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TieringPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TieringPolicy { - - /** TierAction enum. */ - enum TierAction { - TIER_ACTION_UNSPECIFIED = 0, - ENABLED = 1, - PAUSED = 2 - } - } - - /** Properties of a HybridReplicationParameters. */ - interface IHybridReplicationParameters { - - /** HybridReplicationParameters replication */ - replication?: (string|null); - - /** HybridReplicationParameters peerVolumeName */ - peerVolumeName?: (string|null); - - /** HybridReplicationParameters peerClusterName */ - peerClusterName?: (string|null); - - /** HybridReplicationParameters peerSvmName */ - peerSvmName?: (string|null); - - /** HybridReplicationParameters peerIpAddresses */ - peerIpAddresses?: (string[]|null); - - /** HybridReplicationParameters clusterLocation */ - clusterLocation?: (string|null); - - /** HybridReplicationParameters description */ - description?: (string|null); - - /** HybridReplicationParameters labels */ - labels?: ({ [k: string]: string }|null); - - /** HybridReplicationParameters replicationSchedule */ - replicationSchedule?: (google.cloud.netapp.v1.HybridReplicationSchedule|keyof typeof google.cloud.netapp.v1.HybridReplicationSchedule|null); - - /** HybridReplicationParameters hybridReplicationType */ - hybridReplicationType?: (google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|keyof typeof google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|null); - - /** HybridReplicationParameters largeVolumeConstituentCount */ - largeVolumeConstituentCount?: (number|null); - } - - /** Represents a HybridReplicationParameters. */ - class HybridReplicationParameters implements IHybridReplicationParameters { - - /** - * Constructs a new HybridReplicationParameters. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IHybridReplicationParameters); - - /** HybridReplicationParameters replication. */ - public replication: string; - - /** HybridReplicationParameters peerVolumeName. */ - public peerVolumeName: string; - - /** HybridReplicationParameters peerClusterName. */ - public peerClusterName: string; - - /** HybridReplicationParameters peerSvmName. */ - public peerSvmName: string; - - /** HybridReplicationParameters peerIpAddresses. */ - public peerIpAddresses: string[]; - - /** HybridReplicationParameters clusterLocation. */ - public clusterLocation: string; - - /** HybridReplicationParameters description. */ - public description: string; - - /** HybridReplicationParameters labels. */ - public labels: { [k: string]: string }; - - /** HybridReplicationParameters replicationSchedule. */ - public replicationSchedule: (google.cloud.netapp.v1.HybridReplicationSchedule|keyof typeof google.cloud.netapp.v1.HybridReplicationSchedule); - - /** HybridReplicationParameters hybridReplicationType. */ - public hybridReplicationType: (google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|keyof typeof google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType); - - /** HybridReplicationParameters largeVolumeConstituentCount. */ - public largeVolumeConstituentCount: number; - - /** - * Creates a new HybridReplicationParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns HybridReplicationParameters instance - */ - public static create(properties?: google.cloud.netapp.v1.IHybridReplicationParameters): google.cloud.netapp.v1.HybridReplicationParameters; - - /** - * Encodes the specified HybridReplicationParameters message. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. - * @param message HybridReplicationParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IHybridReplicationParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HybridReplicationParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. - * @param message HybridReplicationParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IHybridReplicationParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HybridReplicationParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HybridReplicationParameters - * @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.netapp.v1.HybridReplicationParameters; - - /** - * Decodes a HybridReplicationParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HybridReplicationParameters - * @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.netapp.v1.HybridReplicationParameters; - - /** - * Verifies a HybridReplicationParameters 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 HybridReplicationParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HybridReplicationParameters - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.HybridReplicationParameters; - - /** - * Creates a plain object from a HybridReplicationParameters message. Also converts values to other types if specified. - * @param message HybridReplicationParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.HybridReplicationParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HybridReplicationParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HybridReplicationParameters - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace HybridReplicationParameters { - - /** VolumeHybridReplicationType enum. */ - enum VolumeHybridReplicationType { - VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0, - MIGRATION = 1, - CONTINUOUS_REPLICATION = 2, - ONPREM_REPLICATION = 3, - REVERSE_ONPREM_REPLICATION = 4 - } - } - - /** Properties of a CacheParameters. */ - interface ICacheParameters { - - /** CacheParameters peerVolumeName */ - peerVolumeName?: (string|null); - - /** CacheParameters peerClusterName */ - peerClusterName?: (string|null); - - /** CacheParameters peerSvmName */ - peerSvmName?: (string|null); - - /** CacheParameters peerIpAddresses */ - peerIpAddresses?: (string[]|null); - - /** CacheParameters enableGlobalFileLock */ - enableGlobalFileLock?: (boolean|null); - - /** CacheParameters cacheConfig */ - cacheConfig?: (google.cloud.netapp.v1.ICacheConfig|null); - - /** CacheParameters cacheState */ - cacheState?: (google.cloud.netapp.v1.CacheParameters.CacheState|keyof typeof google.cloud.netapp.v1.CacheParameters.CacheState|null); - - /** CacheParameters command */ - command?: (string|null); - - /** CacheParameters peeringCommandExpiryTime */ - peeringCommandExpiryTime?: (google.protobuf.ITimestamp|null); - - /** CacheParameters passphrase */ - passphrase?: (string|null); - - /** CacheParameters stateDetails */ - stateDetails?: (string|null); - } - - /** Represents a CacheParameters. */ - class CacheParameters implements ICacheParameters { - - /** - * Constructs a new CacheParameters. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICacheParameters); - - /** CacheParameters peerVolumeName. */ - public peerVolumeName: string; - - /** CacheParameters peerClusterName. */ - public peerClusterName: string; - - /** CacheParameters peerSvmName. */ - public peerSvmName: string; - - /** CacheParameters peerIpAddresses. */ - public peerIpAddresses: string[]; - - /** CacheParameters enableGlobalFileLock. */ - public enableGlobalFileLock?: (boolean|null); - - /** CacheParameters cacheConfig. */ - public cacheConfig?: (google.cloud.netapp.v1.ICacheConfig|null); - - /** CacheParameters cacheState. */ - public cacheState: (google.cloud.netapp.v1.CacheParameters.CacheState|keyof typeof google.cloud.netapp.v1.CacheParameters.CacheState); - - /** CacheParameters command. */ - public command: string; - - /** CacheParameters peeringCommandExpiryTime. */ - public peeringCommandExpiryTime?: (google.protobuf.ITimestamp|null); - - /** CacheParameters passphrase. */ - public passphrase: string; - - /** CacheParameters stateDetails. */ - public stateDetails: string; - - /** - * Creates a new CacheParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns CacheParameters instance - */ - public static create(properties?: google.cloud.netapp.v1.ICacheParameters): google.cloud.netapp.v1.CacheParameters; - - /** - * Encodes the specified CacheParameters message. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. - * @param message CacheParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICacheParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CacheParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. - * @param message CacheParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICacheParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CacheParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CacheParameters - * @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.netapp.v1.CacheParameters; - - /** - * Decodes a CacheParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CacheParameters - * @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.netapp.v1.CacheParameters; - - /** - * Verifies a CacheParameters 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 CacheParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CacheParameters - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CacheParameters; - - /** - * Creates a plain object from a CacheParameters message. Also converts values to other types if specified. - * @param message CacheParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CacheParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CacheParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CacheParameters - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CacheParameters { - - /** CacheState enum. */ - enum CacheState { - CACHE_STATE_UNSPECIFIED = 0, - PENDING_CLUSTER_PEERING = 1, - PENDING_SVM_PEERING = 2, - PEERED = 3, - ERROR = 4 - } - } - - /** Properties of a CacheConfig. */ - interface ICacheConfig { - - /** CacheConfig cachePrePopulate */ - cachePrePopulate?: (google.cloud.netapp.v1.ICachePrePopulate|null); - - /** CacheConfig writebackEnabled */ - writebackEnabled?: (boolean|null); - - /** CacheConfig cifsChangeNotifyEnabled */ - cifsChangeNotifyEnabled?: (boolean|null); - - /** CacheConfig cachePrePopulateState */ - cachePrePopulateState?: (google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|keyof typeof google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|null); - } - - /** Represents a CacheConfig. */ - class CacheConfig implements ICacheConfig { - - /** - * Constructs a new CacheConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICacheConfig); - - /** CacheConfig cachePrePopulate. */ - public cachePrePopulate?: (google.cloud.netapp.v1.ICachePrePopulate|null); - - /** CacheConfig writebackEnabled. */ - public writebackEnabled?: (boolean|null); - - /** CacheConfig cifsChangeNotifyEnabled. */ - public cifsChangeNotifyEnabled?: (boolean|null); - - /** CacheConfig cachePrePopulateState. */ - public cachePrePopulateState: (google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|keyof typeof google.cloud.netapp.v1.CacheConfig.CachePrePopulateState); - - /** - * Creates a new CacheConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CacheConfig instance - */ - public static create(properties?: google.cloud.netapp.v1.ICacheConfig): google.cloud.netapp.v1.CacheConfig; - - /** - * Encodes the specified CacheConfig message. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. - * @param message CacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CacheConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. - * @param message CacheConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICacheConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CacheConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CacheConfig - * @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.netapp.v1.CacheConfig; - - /** - * Decodes a CacheConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CacheConfig - * @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.netapp.v1.CacheConfig; - - /** - * Verifies a CacheConfig 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 CacheConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CacheConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CacheConfig; - - /** - * Creates a plain object from a CacheConfig message. Also converts values to other types if specified. - * @param message CacheConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CacheConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CacheConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CacheConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CacheConfig { - - /** CachePrePopulateState enum. */ - enum CachePrePopulateState { - CACHE_PRE_POPULATE_STATE_UNSPECIFIED = 0, - NOT_NEEDED = 1, - IN_PROGRESS = 2, - COMPLETE = 3, - ERROR = 4 - } - } - - /** Properties of a CachePrePopulate. */ - interface ICachePrePopulate { - - /** CachePrePopulate pathList */ - pathList?: (string[]|null); - - /** CachePrePopulate excludePathList */ - excludePathList?: (string[]|null); - - /** CachePrePopulate recursion */ - recursion?: (boolean|null); - } - - /** Represents a CachePrePopulate. */ - class CachePrePopulate implements ICachePrePopulate { - - /** - * Constructs a new CachePrePopulate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICachePrePopulate); - - /** CachePrePopulate pathList. */ - public pathList: string[]; - - /** CachePrePopulate excludePathList. */ - public excludePathList: string[]; - - /** CachePrePopulate recursion. */ - public recursion?: (boolean|null); - - /** - * Creates a new CachePrePopulate instance using the specified properties. - * @param [properties] Properties to set - * @returns CachePrePopulate instance - */ - public static create(properties?: google.cloud.netapp.v1.ICachePrePopulate): google.cloud.netapp.v1.CachePrePopulate; - - /** - * Encodes the specified CachePrePopulate message. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. - * @param message CachePrePopulate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICachePrePopulate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CachePrePopulate message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. - * @param message CachePrePopulate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICachePrePopulate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CachePrePopulate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CachePrePopulate - * @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.netapp.v1.CachePrePopulate; - - /** - * Decodes a CachePrePopulate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CachePrePopulate - * @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.netapp.v1.CachePrePopulate; - - /** - * Verifies a CachePrePopulate 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 CachePrePopulate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CachePrePopulate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CachePrePopulate; - - /** - * Creates a plain object from a CachePrePopulate message. Also converts values to other types if specified. - * @param message CachePrePopulate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CachePrePopulate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CachePrePopulate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CachePrePopulate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BlockDevice. */ - interface IBlockDevice { - - /** BlockDevice name */ - name?: (string|null); - - /** BlockDevice hostGroups */ - hostGroups?: (string[]|null); - - /** BlockDevice identifier */ - identifier?: (string|null); - - /** BlockDevice sizeGib */ - sizeGib?: (number|Long|string|null); - - /** BlockDevice osType */ - osType?: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType|null); - } - - /** Represents a BlockDevice. */ - class BlockDevice implements IBlockDevice { - - /** - * Constructs a new BlockDevice. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IBlockDevice); - - /** BlockDevice name. */ - public name?: (string|null); - - /** BlockDevice hostGroups. */ - public hostGroups: string[]; - - /** BlockDevice identifier. */ - public identifier: string; - - /** BlockDevice sizeGib. */ - public sizeGib?: (number|Long|string|null); - - /** BlockDevice osType. */ - public osType: (google.cloud.netapp.v1.OsType|keyof typeof google.cloud.netapp.v1.OsType); - - /** - * Creates a new BlockDevice instance using the specified properties. - * @param [properties] Properties to set - * @returns BlockDevice instance - */ - public static create(properties?: google.cloud.netapp.v1.IBlockDevice): google.cloud.netapp.v1.BlockDevice; - - /** - * Encodes the specified BlockDevice message. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. - * @param message BlockDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IBlockDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockDevice message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. - * @param message BlockDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IBlockDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlockDevice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlockDevice - * @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.netapp.v1.BlockDevice; - - /** - * Decodes a BlockDevice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlockDevice - * @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.netapp.v1.BlockDevice; - - /** - * Verifies a BlockDevice 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 BlockDevice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockDevice - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.BlockDevice; - - /** - * Creates a plain object from a BlockDevice message. Also converts values to other types if specified. - * @param message BlockDevice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.BlockDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockDevice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlockDevice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupFilesRequest. */ - interface IRestoreBackupFilesRequest { - - /** RestoreBackupFilesRequest name */ - name?: (string|null); - - /** RestoreBackupFilesRequest backup */ - backup?: (string|null); - - /** RestoreBackupFilesRequest fileList */ - fileList?: (string[]|null); - - /** RestoreBackupFilesRequest restoreDestinationPath */ - restoreDestinationPath?: (string|null); - } - - /** Represents a RestoreBackupFilesRequest. */ - class RestoreBackupFilesRequest implements IRestoreBackupFilesRequest { - - /** - * Constructs a new RestoreBackupFilesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesRequest); - - /** RestoreBackupFilesRequest name. */ - public name: string; - - /** RestoreBackupFilesRequest backup. */ - public backup: string; - - /** RestoreBackupFilesRequest fileList. */ - public fileList: string[]; - - /** RestoreBackupFilesRequest restoreDestinationPath. */ - public restoreDestinationPath: string; - - /** - * Creates a new RestoreBackupFilesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupFilesRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesRequest): google.cloud.netapp.v1.RestoreBackupFilesRequest; - - /** - * Encodes the specified RestoreBackupFilesRequest message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. - * @param message RestoreBackupFilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupFilesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. - * @param message RestoreBackupFilesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupFilesRequest - * @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.netapp.v1.RestoreBackupFilesRequest; - - /** - * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupFilesRequest - * @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.netapp.v1.RestoreBackupFilesRequest; - - /** - * Verifies a RestoreBackupFilesRequest 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 RestoreBackupFilesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupFilesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesRequest; - - /** - * Creates a plain object from a RestoreBackupFilesRequest message. Also converts values to other types if specified. - * @param message RestoreBackupFilesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupFilesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupFilesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupFilesResponse. */ - interface IRestoreBackupFilesResponse { - } - - /** Represents a RestoreBackupFilesResponse. */ - class RestoreBackupFilesResponse implements IRestoreBackupFilesResponse { - - /** - * Constructs a new RestoreBackupFilesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse); - - /** - * Creates a new RestoreBackupFilesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupFilesResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse): google.cloud.netapp.v1.RestoreBackupFilesResponse; - - /** - * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @param message RestoreBackupFilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @param message RestoreBackupFilesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupFilesResponse - * @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.netapp.v1.RestoreBackupFilesResponse; - - /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupFilesResponse - * @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.netapp.v1.RestoreBackupFilesResponse; - - /** - * Verifies a RestoreBackupFilesResponse 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 RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupFilesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesResponse; - - /** - * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. - * @param message RestoreBackupFilesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupFilesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupFilesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EstablishVolumePeeringRequest. */ - interface IEstablishVolumePeeringRequest { - - /** EstablishVolumePeeringRequest name */ - name?: (string|null); - - /** EstablishVolumePeeringRequest peerClusterName */ - peerClusterName?: (string|null); - - /** EstablishVolumePeeringRequest peerSvmName */ - peerSvmName?: (string|null); - - /** EstablishVolumePeeringRequest peerIpAddresses */ - peerIpAddresses?: (string[]|null); - - /** EstablishVolumePeeringRequest peerVolumeName */ - peerVolumeName?: (string|null); - } - - /** Represents an EstablishVolumePeeringRequest. */ - class EstablishVolumePeeringRequest implements IEstablishVolumePeeringRequest { - - /** - * Constructs a new EstablishVolumePeeringRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest); - - /** EstablishVolumePeeringRequest name. */ - public name: string; - - /** EstablishVolumePeeringRequest peerClusterName. */ - public peerClusterName: string; - - /** EstablishVolumePeeringRequest peerSvmName. */ - public peerSvmName: string; - - /** EstablishVolumePeeringRequest peerIpAddresses. */ - public peerIpAddresses: string[]; - - /** EstablishVolumePeeringRequest peerVolumeName. */ - public peerVolumeName: string; - - /** - * Creates a new EstablishVolumePeeringRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EstablishVolumePeeringRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): google.cloud.netapp.v1.EstablishVolumePeeringRequest; - - /** - * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. - * @param message EstablishVolumePeeringRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. - * @param message EstablishVolumePeeringRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EstablishVolumePeeringRequest - * @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.netapp.v1.EstablishVolumePeeringRequest; - - /** - * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EstablishVolumePeeringRequest - * @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.netapp.v1.EstablishVolumePeeringRequest; - - /** - * Verifies an EstablishVolumePeeringRequest 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 EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EstablishVolumePeeringRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EstablishVolumePeeringRequest; - - /** - * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. - * @param message EstablishVolumePeeringRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.EstablishVolumePeeringRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EstablishVolumePeeringRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EstablishVolumePeeringRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSnapshotsRequest. */ - interface IListSnapshotsRequest { - - /** ListSnapshotsRequest parent */ - parent?: (string|null); - - /** ListSnapshotsRequest pageSize */ - pageSize?: (number|null); - - /** ListSnapshotsRequest pageToken */ - pageToken?: (string|null); - - /** ListSnapshotsRequest orderBy */ - orderBy?: (string|null); - - /** ListSnapshotsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListSnapshotsRequest. */ - class ListSnapshotsRequest implements IListSnapshotsRequest { - - /** - * Constructs a new ListSnapshotsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListSnapshotsRequest); - - /** ListSnapshotsRequest parent. */ - public parent: string; - - /** ListSnapshotsRequest pageSize. */ - public pageSize: number; - - /** ListSnapshotsRequest pageToken. */ - public pageToken: string; - - /** ListSnapshotsRequest orderBy. */ - public orderBy: string; - - /** ListSnapshotsRequest filter. */ - public filter: string; - - /** - * Creates a new ListSnapshotsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSnapshotsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListSnapshotsRequest): google.cloud.netapp.v1.ListSnapshotsRequest; - - /** - * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. - * @param message ListSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. - * @param message ListSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSnapshotsRequest - * @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.netapp.v1.ListSnapshotsRequest; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSnapshotsRequest - * @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.netapp.v1.ListSnapshotsRequest; - - /** - * Verifies a ListSnapshotsRequest 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 ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSnapshotsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsRequest; - - /** - * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. - * @param message ListSnapshotsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSnapshotsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSnapshotsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSnapshotsResponse. */ - interface IListSnapshotsResponse { - - /** ListSnapshotsResponse snapshots */ - snapshots?: (google.cloud.netapp.v1.ISnapshot[]|null); - - /** ListSnapshotsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListSnapshotsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListSnapshotsResponse. */ - class ListSnapshotsResponse implements IListSnapshotsResponse { - - /** - * Constructs a new ListSnapshotsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListSnapshotsResponse); - - /** ListSnapshotsResponse snapshots. */ - public snapshots: google.cloud.netapp.v1.ISnapshot[]; - - /** ListSnapshotsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListSnapshotsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListSnapshotsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSnapshotsResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListSnapshotsResponse): google.cloud.netapp.v1.ListSnapshotsResponse; - - /** - * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. - * @param message ListSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. - * @param message ListSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSnapshotsResponse - * @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.netapp.v1.ListSnapshotsResponse; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSnapshotsResponse - * @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.netapp.v1.ListSnapshotsResponse; - - /** - * Verifies a ListSnapshotsResponse 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 ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSnapshotsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListSnapshotsResponse; - - /** - * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. - * @param message ListSnapshotsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSnapshotsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSnapshotsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSnapshotRequest. */ - interface IGetSnapshotRequest { - - /** GetSnapshotRequest name */ - name?: (string|null); - } - - /** Represents a GetSnapshotRequest. */ - class GetSnapshotRequest implements IGetSnapshotRequest { - - /** - * Constructs a new GetSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetSnapshotRequest); - - /** GetSnapshotRequest name. */ - public name: string; - - /** - * Creates a new GetSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSnapshotRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetSnapshotRequest): google.cloud.netapp.v1.GetSnapshotRequest; - - /** - * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. - * @param message GetSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. - * @param message GetSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSnapshotRequest - * @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.netapp.v1.GetSnapshotRequest; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSnapshotRequest - * @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.netapp.v1.GetSnapshotRequest; - - /** - * Verifies a GetSnapshotRequest 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 GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetSnapshotRequest; - - /** - * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. - * @param message GetSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateSnapshotRequest. */ - interface ICreateSnapshotRequest { - - /** CreateSnapshotRequest parent */ - parent?: (string|null); - - /** CreateSnapshotRequest snapshot */ - snapshot?: (google.cloud.netapp.v1.ISnapshot|null); - - /** CreateSnapshotRequest snapshotId */ - snapshotId?: (string|null); - } - - /** Represents a CreateSnapshotRequest. */ - class CreateSnapshotRequest implements ICreateSnapshotRequest { - - /** - * Constructs a new CreateSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest); - - /** CreateSnapshotRequest parent. */ - public parent: string; - - /** CreateSnapshotRequest snapshot. */ - public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); - - /** CreateSnapshotRequest snapshotId. */ - public snapshotId: string; - - /** - * Creates a new CreateSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSnapshotRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateSnapshotRequest): google.cloud.netapp.v1.CreateSnapshotRequest; - - /** - * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. - * @param message CreateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. - * @param message CreateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSnapshotRequest - * @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.netapp.v1.CreateSnapshotRequest; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSnapshotRequest - * @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.netapp.v1.CreateSnapshotRequest; - - /** - * Verifies a CreateSnapshotRequest 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 CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateSnapshotRequest; - - /** - * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. - * @param message CreateSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSnapshotRequest. */ - interface IDeleteSnapshotRequest { - - /** DeleteSnapshotRequest name */ - name?: (string|null); - } - - /** Represents a DeleteSnapshotRequest. */ - class DeleteSnapshotRequest implements IDeleteSnapshotRequest { - - /** - * Constructs a new DeleteSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest); - - /** DeleteSnapshotRequest name. */ - public name: string; - - /** - * Creates a new DeleteSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSnapshotRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteSnapshotRequest): google.cloud.netapp.v1.DeleteSnapshotRequest; - - /** - * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. - * @param message DeleteSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. - * @param message DeleteSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSnapshotRequest - * @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.netapp.v1.DeleteSnapshotRequest; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSnapshotRequest - * @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.netapp.v1.DeleteSnapshotRequest; - - /** - * Verifies a DeleteSnapshotRequest 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 DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteSnapshotRequest; - - /** - * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. - * @param message DeleteSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateSnapshotRequest. */ - interface IUpdateSnapshotRequest { - - /** UpdateSnapshotRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSnapshotRequest snapshot */ - snapshot?: (google.cloud.netapp.v1.ISnapshot|null); - } - - /** Represents an UpdateSnapshotRequest. */ - class UpdateSnapshotRequest implements IUpdateSnapshotRequest { - - /** - * Constructs a new UpdateSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest); - - /** UpdateSnapshotRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSnapshotRequest snapshot. */ - public snapshot?: (google.cloud.netapp.v1.ISnapshot|null); - - /** - * Creates a new UpdateSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSnapshotRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateSnapshotRequest): google.cloud.netapp.v1.UpdateSnapshotRequest; - - /** - * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. - * @param message UpdateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. - * @param message UpdateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSnapshotRequest - * @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.netapp.v1.UpdateSnapshotRequest; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSnapshotRequest - * @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.netapp.v1.UpdateSnapshotRequest; - - /** - * Verifies an UpdateSnapshotRequest 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 UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateSnapshotRequest; - - /** - * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. - * @param message UpdateSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Snapshot. */ - interface ISnapshot { - - /** Snapshot name */ - name?: (string|null); - - /** Snapshot state */ - state?: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State|null); - - /** Snapshot stateDetails */ - stateDetails?: (string|null); - - /** Snapshot description */ - description?: (string|null); - - /** Snapshot usedBytes */ - usedBytes?: (number|null); - - /** Snapshot createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Snapshot labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a Snapshot. */ - class Snapshot implements ISnapshot { - - /** - * Constructs a new Snapshot. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ISnapshot); - - /** Snapshot name. */ - public name: string; - - /** Snapshot state. */ - public state: (google.cloud.netapp.v1.Snapshot.State|keyof typeof google.cloud.netapp.v1.Snapshot.State); - - /** Snapshot stateDetails. */ - public stateDetails: string; - - /** Snapshot description. */ - public description: string; - - /** Snapshot usedBytes. */ - public usedBytes: number; - - /** Snapshot createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Snapshot labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new Snapshot instance using the specified properties. - * @param [properties] Properties to set - * @returns Snapshot instance - */ - public static create(properties?: google.cloud.netapp.v1.ISnapshot): google.cloud.netapp.v1.Snapshot; - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Snapshot - * @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.netapp.v1.Snapshot; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Snapshot - * @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.netapp.v1.Snapshot; - - /** - * Verifies a Snapshot 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 Snapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Snapshot - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Snapshot; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @param message Snapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Snapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Snapshot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Snapshot { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - CREATING = 2, - DELETING = 3, - UPDATING = 4, - DISABLED = 5, - ERROR = 6 - } - } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DEFAULT = 1, - ONTAP = 2 - } - - /** Properties of a GetStoragePoolRequest. */ - interface IGetStoragePoolRequest { - - /** GetStoragePoolRequest name */ - name?: (string|null); - } - - /** Represents a GetStoragePoolRequest. */ - class GetStoragePoolRequest implements IGetStoragePoolRequest { - - /** - * Constructs a new GetStoragePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest); - - /** GetStoragePoolRequest name. */ - public name: string; - - /** - * Creates a new GetStoragePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetStoragePoolRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IGetStoragePoolRequest): google.cloud.netapp.v1.GetStoragePoolRequest; - - /** - * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. - * @param message GetStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. - * @param message GetStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IGetStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetStoragePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetStoragePoolRequest - * @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.netapp.v1.GetStoragePoolRequest; - - /** - * Decodes a GetStoragePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetStoragePoolRequest - * @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.netapp.v1.GetStoragePoolRequest; - - /** - * Verifies a GetStoragePoolRequest 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 GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetStoragePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.GetStoragePoolRequest; - - /** - * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. - * @param message GetStoragePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.GetStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetStoragePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetStoragePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStoragePoolsRequest. */ - interface IListStoragePoolsRequest { - - /** ListStoragePoolsRequest parent */ - parent?: (string|null); - - /** ListStoragePoolsRequest pageSize */ - pageSize?: (number|null); - - /** ListStoragePoolsRequest pageToken */ - pageToken?: (string|null); - - /** ListStoragePoolsRequest orderBy */ - orderBy?: (string|null); - - /** ListStoragePoolsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListStoragePoolsRequest. */ - class ListStoragePoolsRequest implements IListStoragePoolsRequest { - - /** - * Constructs a new ListStoragePoolsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest); - - /** ListStoragePoolsRequest parent. */ - public parent: string; - - /** ListStoragePoolsRequest pageSize. */ - public pageSize: number; - - /** ListStoragePoolsRequest pageToken. */ - public pageToken: string; - - /** ListStoragePoolsRequest orderBy. */ - public orderBy: string; - - /** ListStoragePoolsRequest filter. */ - public filter: string; - - /** - * Creates a new ListStoragePoolsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStoragePoolsRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsRequest): google.cloud.netapp.v1.ListStoragePoolsRequest; - - /** - * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. - * @param message ListStoragePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. - * @param message ListStoragePoolsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStoragePoolsRequest - * @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.netapp.v1.ListStoragePoolsRequest; - - /** - * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStoragePoolsRequest - * @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.netapp.v1.ListStoragePoolsRequest; - - /** - * Verifies a ListStoragePoolsRequest 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 ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStoragePoolsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsRequest; - - /** - * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. - * @param message ListStoragePoolsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStoragePoolsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStoragePoolsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListStoragePoolsResponse. */ - interface IListStoragePoolsResponse { - - /** ListStoragePoolsResponse storagePools */ - storagePools?: (google.cloud.netapp.v1.IStoragePool[]|null); - - /** ListStoragePoolsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListStoragePoolsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListStoragePoolsResponse. */ - class ListStoragePoolsResponse implements IListStoragePoolsResponse { - - /** - * Constructs a new ListStoragePoolsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse); - - /** ListStoragePoolsResponse storagePools. */ - public storagePools: google.cloud.netapp.v1.IStoragePool[]; - - /** ListStoragePoolsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListStoragePoolsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListStoragePoolsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListStoragePoolsResponse instance - */ - public static create(properties?: google.cloud.netapp.v1.IListStoragePoolsResponse): google.cloud.netapp.v1.ListStoragePoolsResponse; - - /** - * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. - * @param message ListStoragePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. - * @param message ListStoragePoolsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IListStoragePoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListStoragePoolsResponse - * @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.netapp.v1.ListStoragePoolsResponse; - - /** - * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListStoragePoolsResponse - * @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.netapp.v1.ListStoragePoolsResponse; - - /** - * Verifies a ListStoragePoolsResponse 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 ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListStoragePoolsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ListStoragePoolsResponse; - - /** - * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. - * @param message ListStoragePoolsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ListStoragePoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListStoragePoolsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListStoragePoolsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateStoragePoolRequest. */ - interface ICreateStoragePoolRequest { - - /** CreateStoragePoolRequest parent */ - parent?: (string|null); - - /** CreateStoragePoolRequest storagePoolId */ - storagePoolId?: (string|null); - - /** CreateStoragePoolRequest storagePool */ - storagePool?: (google.cloud.netapp.v1.IStoragePool|null); - } - - /** Represents a CreateStoragePoolRequest. */ - class CreateStoragePoolRequest implements ICreateStoragePoolRequest { - - /** - * Constructs a new CreateStoragePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest); - - /** CreateStoragePoolRequest parent. */ - public parent: string; - - /** CreateStoragePoolRequest storagePoolId. */ - public storagePoolId: string; - - /** CreateStoragePoolRequest storagePool. */ - public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); - - /** - * Creates a new CreateStoragePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateStoragePoolRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ICreateStoragePoolRequest): google.cloud.netapp.v1.CreateStoragePoolRequest; - - /** - * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. - * @param message CreateStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. - * @param message CreateStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ICreateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateStoragePoolRequest - * @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.netapp.v1.CreateStoragePoolRequest; - - /** - * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateStoragePoolRequest - * @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.netapp.v1.CreateStoragePoolRequest; - - /** - * Verifies a CreateStoragePoolRequest 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 CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateStoragePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.CreateStoragePoolRequest; - - /** - * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. - * @param message CreateStoragePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.CreateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateStoragePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateStoragePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateStoragePoolRequest. */ - interface IUpdateStoragePoolRequest { - - /** UpdateStoragePoolRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStoragePoolRequest storagePool */ - storagePool?: (google.cloud.netapp.v1.IStoragePool|null); - } - - /** Represents an UpdateStoragePoolRequest. */ - class UpdateStoragePoolRequest implements IUpdateStoragePoolRequest { - - /** - * Constructs a new UpdateStoragePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest); - - /** UpdateStoragePoolRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateStoragePoolRequest storagePool. */ - public storagePool?: (google.cloud.netapp.v1.IStoragePool|null); - - /** - * Creates a new UpdateStoragePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateStoragePoolRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IUpdateStoragePoolRequest): google.cloud.netapp.v1.UpdateStoragePoolRequest; - - /** - * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. - * @param message UpdateStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. - * @param message UpdateStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IUpdateStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateStoragePoolRequest - * @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.netapp.v1.UpdateStoragePoolRequest; - - /** - * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateStoragePoolRequest - * @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.netapp.v1.UpdateStoragePoolRequest; - - /** - * Verifies an UpdateStoragePoolRequest 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 UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateStoragePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.UpdateStoragePoolRequest; - - /** - * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. - * @param message UpdateStoragePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.UpdateStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateStoragePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateStoragePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteStoragePoolRequest. */ - interface IDeleteStoragePoolRequest { - - /** DeleteStoragePoolRequest name */ - name?: (string|null); - } - - /** Represents a DeleteStoragePoolRequest. */ - class DeleteStoragePoolRequest implements IDeleteStoragePoolRequest { - - /** - * Constructs a new DeleteStoragePoolRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest); - - /** DeleteStoragePoolRequest name. */ - public name: string; - - /** - * Creates a new DeleteStoragePoolRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteStoragePoolRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IDeleteStoragePoolRequest): google.cloud.netapp.v1.DeleteStoragePoolRequest; - - /** - * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. - * @param message DeleteStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. - * @param message DeleteStoragePoolRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IDeleteStoragePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteStoragePoolRequest - * @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.netapp.v1.DeleteStoragePoolRequest; - - /** - * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteStoragePoolRequest - * @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.netapp.v1.DeleteStoragePoolRequest; - - /** - * Verifies a DeleteStoragePoolRequest 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 DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteStoragePoolRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.DeleteStoragePoolRequest; - - /** - * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. - * @param message DeleteStoragePoolRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.DeleteStoragePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteStoragePoolRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteStoragePoolRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SwitchActiveReplicaZoneRequest. */ - interface ISwitchActiveReplicaZoneRequest { - - /** SwitchActiveReplicaZoneRequest name */ - name?: (string|null); - } - - /** Represents a SwitchActiveReplicaZoneRequest. */ - class SwitchActiveReplicaZoneRequest implements ISwitchActiveReplicaZoneRequest { - - /** - * Constructs a new SwitchActiveReplicaZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest); - - /** SwitchActiveReplicaZoneRequest name. */ - public name: string; - - /** - * Creates a new SwitchActiveReplicaZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SwitchActiveReplicaZoneRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest): google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest; - - /** - * Encodes the specified SwitchActiveReplicaZoneRequest message. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. - * @param message SwitchActiveReplicaZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SwitchActiveReplicaZoneRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. - * @param message SwitchActiveReplicaZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SwitchActiveReplicaZoneRequest - * @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.netapp.v1.SwitchActiveReplicaZoneRequest; - - /** - * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SwitchActiveReplicaZoneRequest - * @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.netapp.v1.SwitchActiveReplicaZoneRequest; - - /** - * Verifies a SwitchActiveReplicaZoneRequest 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 SwitchActiveReplicaZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SwitchActiveReplicaZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest; - - /** - * Creates a plain object from a SwitchActiveReplicaZoneRequest message. Also converts values to other types if specified. - * @param message SwitchActiveReplicaZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SwitchActiveReplicaZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SwitchActiveReplicaZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StoragePool. */ - interface IStoragePool { - - /** StoragePool name */ - name?: (string|null); - - /** StoragePool serviceLevel */ - serviceLevel?: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel|null); - - /** StoragePool capacityGib */ - capacityGib?: (number|Long|string|null); - - /** StoragePool volumeCapacityGib */ - volumeCapacityGib?: (number|Long|string|null); - - /** StoragePool volumeCount */ - volumeCount?: (number|null); - - /** StoragePool state */ - state?: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State|null); - - /** StoragePool stateDetails */ - stateDetails?: (string|null); - - /** StoragePool createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** StoragePool description */ - description?: (string|null); - - /** StoragePool labels */ - labels?: ({ [k: string]: string }|null); - - /** StoragePool network */ - network?: (string|null); - - /** StoragePool activeDirectory */ - activeDirectory?: (string|null); - - /** StoragePool kmsConfig */ - kmsConfig?: (string|null); - - /** StoragePool ldapEnabled */ - ldapEnabled?: (boolean|null); - - /** StoragePool psaRange */ - psaRange?: (string|null); - - /** StoragePool encryptionType */ - encryptionType?: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType|null); - - /** StoragePool globalAccessAllowed */ - globalAccessAllowed?: (boolean|null); - - /** StoragePool allowAutoTiering */ - allowAutoTiering?: (boolean|null); - - /** StoragePool replicaZone */ - replicaZone?: (string|null); - - /** StoragePool zone */ - zone?: (string|null); - - /** StoragePool satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** StoragePool satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** StoragePool customPerformanceEnabled */ - customPerformanceEnabled?: (boolean|null); - - /** StoragePool totalThroughputMibps */ - totalThroughputMibps?: (number|Long|string|null); - - /** StoragePool totalIops */ - totalIops?: (number|Long|string|null); - - /** StoragePool hotTierSizeGib */ - hotTierSizeGib?: (number|Long|string|null); - - /** StoragePool enableHotTierAutoResize */ - enableHotTierAutoResize?: (boolean|null); - - /** StoragePool qosType */ - qosType?: (google.cloud.netapp.v1.QosType|keyof typeof google.cloud.netapp.v1.QosType|null); - - /** StoragePool availableThroughputMibps */ - availableThroughputMibps?: (number|null); - - /** StoragePool coldTierSizeUsedGib */ - coldTierSizeUsedGib?: (number|Long|string|null); - - /** StoragePool hotTierSizeUsedGib */ - hotTierSizeUsedGib?: (number|Long|string|null); - - /** StoragePool type */ - type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); - - /** StoragePool mode */ - mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); - } - - /** Represents a StoragePool. */ - class StoragePool implements IStoragePool { - - /** - * Constructs a new StoragePool. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IStoragePool); - - /** StoragePool name. */ - public name: string; - - /** StoragePool serviceLevel. */ - public serviceLevel: (google.cloud.netapp.v1.ServiceLevel|keyof typeof google.cloud.netapp.v1.ServiceLevel); - - /** StoragePool capacityGib. */ - public capacityGib: (number|Long|string); - - /** StoragePool volumeCapacityGib. */ - public volumeCapacityGib: (number|Long|string); - - /** StoragePool volumeCount. */ - public volumeCount: number; - - /** StoragePool state. */ - public state: (google.cloud.netapp.v1.StoragePool.State|keyof typeof google.cloud.netapp.v1.StoragePool.State); - - /** StoragePool stateDetails. */ - public stateDetails: string; - - /** StoragePool createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** StoragePool description. */ - public description: string; - - /** StoragePool labels. */ - public labels: { [k: string]: string }; - - /** StoragePool network. */ - public network: string; - - /** StoragePool activeDirectory. */ - public activeDirectory: string; - - /** StoragePool kmsConfig. */ - public kmsConfig: string; - - /** StoragePool ldapEnabled. */ - public ldapEnabled: boolean; - - /** StoragePool psaRange. */ - public psaRange: string; - - /** StoragePool encryptionType. */ - public encryptionType: (google.cloud.netapp.v1.EncryptionType|keyof typeof google.cloud.netapp.v1.EncryptionType); - - /** StoragePool globalAccessAllowed. */ - public globalAccessAllowed?: (boolean|null); - - /** StoragePool allowAutoTiering. */ - public allowAutoTiering: boolean; - - /** StoragePool replicaZone. */ - public replicaZone: string; - - /** StoragePool zone. */ - public zone: string; - - /** StoragePool satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** StoragePool satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** StoragePool customPerformanceEnabled. */ - public customPerformanceEnabled: boolean; - - /** StoragePool totalThroughputMibps. */ - public totalThroughputMibps: (number|Long|string); - - /** StoragePool totalIops. */ - public totalIops: (number|Long|string); - - /** StoragePool hotTierSizeGib. */ - public hotTierSizeGib: (number|Long|string); - - /** StoragePool enableHotTierAutoResize. */ - public enableHotTierAutoResize?: (boolean|null); - - /** StoragePool qosType. */ - public qosType: (google.cloud.netapp.v1.QosType|keyof typeof google.cloud.netapp.v1.QosType); - - /** StoragePool availableThroughputMibps. */ - public availableThroughputMibps: number; - - /** StoragePool coldTierSizeUsedGib. */ - public coldTierSizeUsedGib: (number|Long|string); - - /** StoragePool hotTierSizeUsedGib. */ - public hotTierSizeUsedGib: (number|Long|string); - - /** StoragePool type. */ - public type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); - - /** StoragePool mode. */ - public mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); - - /** - * Creates a new StoragePool instance using the specified properties. - * @param [properties] Properties to set - * @returns StoragePool instance - */ - public static create(properties?: google.cloud.netapp.v1.IStoragePool): google.cloud.netapp.v1.StoragePool; - - /** - * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. - * @param message StoragePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. - * @param message StoragePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IStoragePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StoragePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StoragePool - * @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.netapp.v1.StoragePool; - - /** - * Decodes a StoragePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StoragePool - * @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.netapp.v1.StoragePool; - - /** - * Verifies a StoragePool 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 StoragePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StoragePool - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.StoragePool; - - /** - * Creates a plain object from a StoragePool message. Also converts values to other types if specified. - * @param message StoragePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.StoragePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StoragePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StoragePool - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StoragePool { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - CREATING = 2, - DELETING = 3, - UPDATING = 4, - RESTORING = 5, - DISABLED = 6, - ERROR = 7 - } - } - - /** Properties of a ValidateDirectoryServiceRequest. */ - interface IValidateDirectoryServiceRequest { - - /** ValidateDirectoryServiceRequest name */ - name?: (string|null); - - /** ValidateDirectoryServiceRequest directoryServiceType */ - directoryServiceType?: (google.cloud.netapp.v1.DirectoryServiceType|keyof typeof google.cloud.netapp.v1.DirectoryServiceType|null); - } - - /** Represents a ValidateDirectoryServiceRequest. */ - class ValidateDirectoryServiceRequest implements IValidateDirectoryServiceRequest { - - /** - * Constructs a new ValidateDirectoryServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.netapp.v1.IValidateDirectoryServiceRequest); - - /** ValidateDirectoryServiceRequest name. */ - public name: string; - - /** ValidateDirectoryServiceRequest directoryServiceType. */ - public directoryServiceType: (google.cloud.netapp.v1.DirectoryServiceType|keyof typeof google.cloud.netapp.v1.DirectoryServiceType); - - /** - * Creates a new ValidateDirectoryServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateDirectoryServiceRequest instance - */ - public static create(properties?: google.cloud.netapp.v1.IValidateDirectoryServiceRequest): google.cloud.netapp.v1.ValidateDirectoryServiceRequest; - - /** - * Encodes the specified ValidateDirectoryServiceRequest message. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. - * @param message ValidateDirectoryServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateDirectoryServiceRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. - * @param message ValidateDirectoryServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.netapp.v1.IValidateDirectoryServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateDirectoryServiceRequest - * @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.netapp.v1.ValidateDirectoryServiceRequest; - - /** - * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateDirectoryServiceRequest - * @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.netapp.v1.ValidateDirectoryServiceRequest; - - /** - * Verifies a ValidateDirectoryServiceRequest 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 ValidateDirectoryServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateDirectoryServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ValidateDirectoryServiceRequest; - - /** - * Creates a plain object from a ValidateDirectoryServiceRequest message. Also converts values to other types if specified. - * @param message ValidateDirectoryServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.netapp.v1.ValidateDirectoryServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateDirectoryServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateDirectoryServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; - - /** - * Verifies a FieldInfo 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 FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @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.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @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.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @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.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @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.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @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.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @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.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @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.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @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.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @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.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @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.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @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.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @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.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @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.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @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.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @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.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @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.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @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.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @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.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @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.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @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.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @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.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @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.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @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.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @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.protobuf.FileOptions; - - /** - * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @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.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @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.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @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.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @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.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @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.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @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.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @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.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @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.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @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.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @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.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @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.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @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.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @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.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @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.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @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.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @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.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @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.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @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.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @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.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @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.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @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.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @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.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @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.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @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.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @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.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @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.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @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.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @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.protobuf.FieldMask; - - /** - * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.protobuf.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.protobuf.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @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.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @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.protobuf.Struct; - - /** - * Verifies a Struct 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 Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Struct - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @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.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @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.protobuf.Value; - - /** - * Verifies a Value 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 Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @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.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @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.protobuf.ListValue; - - /** - * Verifies a ListValue 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 ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @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.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @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.protobuf.Any; - - /** - * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @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.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @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.protobuf.Empty; - - /** - * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace longrunning. */ - namespace longrunning { - - /** Represents an Operations */ - class Operations extends $protobuf.rpc.Service { - - /** - * Constructs a new Operations 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 Operations 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): Operations; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOperationsResponse - */ - public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; - - /** - * Calls ListOperations. - * @param request ListOperationsRequest message or plain object - * @returns Promise - */ - public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - - /** - * Calls GetOperation. - * @param request GetOperationRequest message or plain object - * @returns Promise - */ - public getOperation(request: google.longrunning.IGetOperationRequest): Promise; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; - - /** - * Calls DeleteOperation. - * @param request DeleteOperationRequest message or plain object - * @returns Promise - */ - public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; - - /** - * Calls CancelOperation. - * @param request CancelOperationRequest message or plain object - * @returns Promise - */ - public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; - - /** - * Calls WaitOperation. - * @param request WaitOperationRequest message or plain object - * @returns Promise - */ - public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; - } - - namespace Operations { - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @param error Error, if any - * @param [response] ListOperationsResponse - */ - type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @param error Error, if any - * @param [response] Empty - */ - type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @param error Error, if any - * @param [response] Operation - */ - type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of an Operation. */ - interface IOperation { - - /** Operation name */ - name?: (string|null); - - /** Operation metadata */ - metadata?: (google.protobuf.IAny|null); - - /** Operation done */ - done?: (boolean|null); - - /** Operation error */ - error?: (google.rpc.IStatus|null); - - /** Operation response */ - response?: (google.protobuf.IAny|null); - } - - /** Represents an Operation. */ - class Operation implements IOperation { - - /** - * Constructs a new Operation. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperation); - - /** Operation name. */ - public name: string; - - /** Operation metadata. */ - public metadata?: (google.protobuf.IAny|null); - - /** Operation done. */ - public done: boolean; - - /** Operation error. */ - public error?: (google.rpc.IStatus|null); - - /** Operation response. */ - public response?: (google.protobuf.IAny|null); - - /** Operation result. */ - public result?: ("error"|"response"); - - /** - * Creates a new Operation instance using the specified properties. - * @param [properties] Properties to set - * @returns Operation instance - */ - public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @param message Operation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Operation - * @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.longrunning.Operation; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Operation - * @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.longrunning.Operation; - - /** - * Verifies an Operation 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 Operation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Operation - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @param message Operation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Operation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Operation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetOperationRequest. */ - interface IGetOperationRequest { - - /** GetOperationRequest name */ - name?: (string|null); - } - - /** Represents a GetOperationRequest. */ - class GetOperationRequest implements IGetOperationRequest { - - /** - * Constructs a new GetOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IGetOperationRequest); - - /** GetOperationRequest name. */ - public name: string; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetOperationRequest instance - */ - public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @param message GetOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetOperationRequest - * @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.longrunning.GetOperationRequest; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetOperationRequest - * @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.longrunning.GetOperationRequest; - - /** - * Verifies a GetOperationRequest 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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @param message GetOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsRequest. */ - interface IListOperationsRequest { - - /** ListOperationsRequest name */ - name?: (string|null); - - /** ListOperationsRequest filter */ - filter?: (string|null); - - /** ListOperationsRequest pageSize */ - pageSize?: (number|null); - - /** ListOperationsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListOperationsRequest. */ - class ListOperationsRequest implements IListOperationsRequest { - - /** - * Constructs a new ListOperationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsRequest); - - /** ListOperationsRequest name. */ - public name: string; - - /** ListOperationsRequest filter. */ - public filter: string; - - /** ListOperationsRequest pageSize. */ - public pageSize: number; - - /** ListOperationsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsRequest instance - */ - public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @param message ListOperationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsRequest - * @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.longrunning.ListOperationsRequest; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsRequest - * @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.longrunning.ListOperationsRequest; - - /** - * Verifies a ListOperationsRequest 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @param message ListOperationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListOperationsResponse. */ - interface IListOperationsResponse { - - /** ListOperationsResponse operations */ - operations?: (google.longrunning.IOperation[]|null); - - /** ListOperationsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListOperationsResponse. */ - class ListOperationsResponse implements IListOperationsResponse { - - /** - * Constructs a new ListOperationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IListOperationsResponse); - - /** ListOperationsResponse operations. */ - public operations: google.longrunning.IOperation[]; - - /** ListOperationsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListOperationsResponse instance - */ - public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @param message ListOperationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListOperationsResponse - * @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.longrunning.ListOperationsResponse; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListOperationsResponse - * @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.longrunning.ListOperationsResponse; - - /** - * Verifies a ListOperationsResponse 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 ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListOperationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @param message ListOperationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListOperationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListOperationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CancelOperationRequest. */ - interface ICancelOperationRequest { - - /** CancelOperationRequest name */ - name?: (string|null); - } - - /** Represents a CancelOperationRequest. */ - class CancelOperationRequest implements ICancelOperationRequest { - - /** - * Constructs a new CancelOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.ICancelOperationRequest); - - /** CancelOperationRequest name. */ - public name: string; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelOperationRequest instance - */ - public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @param message CancelOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelOperationRequest - * @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.longrunning.CancelOperationRequest; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelOperationRequest - * @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.longrunning.CancelOperationRequest; - - /** - * Verifies a CancelOperationRequest 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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @param message CancelOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CancelOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteOperationRequest. */ - interface IDeleteOperationRequest { - - /** DeleteOperationRequest name */ - name?: (string|null); - } - - /** Represents a DeleteOperationRequest. */ - class DeleteOperationRequest implements IDeleteOperationRequest { - - /** - * Constructs a new DeleteOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IDeleteOperationRequest); - - /** DeleteOperationRequest name. */ - public name: string; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteOperationRequest instance - */ - public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @param message DeleteOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteOperationRequest - * @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.longrunning.DeleteOperationRequest; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteOperationRequest - * @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.longrunning.DeleteOperationRequest; - - /** - * Verifies a DeleteOperationRequest 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @param message DeleteOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WaitOperationRequest. */ - interface IWaitOperationRequest { - - /** WaitOperationRequest name */ - name?: (string|null); - - /** WaitOperationRequest timeout */ - timeout?: (google.protobuf.IDuration|null); - } - - /** Represents a WaitOperationRequest. */ - class WaitOperationRequest implements IWaitOperationRequest { - - /** - * Constructs a new WaitOperationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IWaitOperationRequest); - - /** WaitOperationRequest name. */ - public name: string; - - /** WaitOperationRequest timeout. */ - public timeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns WaitOperationRequest instance - */ - public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @param message WaitOperationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WaitOperationRequest - * @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.longrunning.WaitOperationRequest; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WaitOperationRequest - * @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.longrunning.WaitOperationRequest; - - /** - * Verifies a WaitOperationRequest 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 WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WaitOperationRequest - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @param message WaitOperationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WaitOperationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WaitOperationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OperationInfo. */ - interface IOperationInfo { - - /** OperationInfo responseType */ - responseType?: (string|null); - - /** OperationInfo metadataType */ - metadataType?: (string|null); - } - - /** Represents an OperationInfo. */ - class OperationInfo implements IOperationInfo { - - /** - * Constructs a new OperationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.longrunning.IOperationInfo); - - /** OperationInfo responseType. */ - public responseType: string; - - /** OperationInfo metadataType. */ - public metadataType: string; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationInfo instance - */ - public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @param message OperationInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationInfo - * @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.longrunning.OperationInfo; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationInfo - * @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.longrunning.OperationInfo; - - /** - * Verifies an OperationInfo 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 OperationInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationInfo - */ - public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @param message OperationInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OperationInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OperationInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @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.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @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.rpc.Status; - - /** - * Verifies a Status 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 Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.js b/owl-bot-staging/google-cloud-netapp/protos/protos.js deleted file mode 100644 index 43bea2b29fb..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/protos.js +++ /dev/null @@ -1,64227 +0,0 @@ -// 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. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ 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"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_netapp_protos || ($protobuf.roots._google_cloud_netapp_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.netapp = (function() { - - /** - * Namespace netapp. - * @memberof google.cloud - * @namespace - */ - var netapp = {}; - - netapp.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.netapp - * @namespace - */ - var v1 = {}; - - v1.ListActiveDirectoriesRequest = (function() { - - /** - * Properties of a ListActiveDirectoriesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListActiveDirectoriesRequest - * @property {string|null} [parent] ListActiveDirectoriesRequest parent - * @property {number|null} [pageSize] ListActiveDirectoriesRequest pageSize - * @property {string|null} [pageToken] ListActiveDirectoriesRequest pageToken - * @property {string|null} [filter] ListActiveDirectoriesRequest filter - * @property {string|null} [orderBy] ListActiveDirectoriesRequest orderBy - */ - - /** - * Constructs a new ListActiveDirectoriesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListActiveDirectoriesRequest. - * @implements IListActiveDirectoriesRequest - * @constructor - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set - */ - function ListActiveDirectoriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListActiveDirectoriesRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - */ - ListActiveDirectoriesRequest.prototype.parent = ""; - - /** - * ListActiveDirectoriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - */ - ListActiveDirectoriesRequest.prototype.pageSize = 0; - - /** - * ListActiveDirectoriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - */ - ListActiveDirectoriesRequest.prototype.pageToken = ""; - - /** - * ListActiveDirectoriesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - */ - ListActiveDirectoriesRequest.prototype.filter = ""; - - /** - * ListActiveDirectoriesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - */ - ListActiveDirectoriesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListActiveDirectoriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest instance - */ - ListActiveDirectoriesRequest.create = function create(properties) { - return new ListActiveDirectoriesRequest(properties); - }; - - /** - * Encodes the specified ListActiveDirectoriesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActiveDirectoriesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListActiveDirectoriesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} message ListActiveDirectoriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActiveDirectoriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActiveDirectoriesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListActiveDirectoriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActiveDirectoriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListActiveDirectoriesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListActiveDirectoriesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListActiveDirectoriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesRequest} ListActiveDirectoriesRequest - */ - ListActiveDirectoriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListActiveDirectoriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {google.cloud.netapp.v1.ListActiveDirectoriesRequest} message ListActiveDirectoriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListActiveDirectoriesRequest.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; - }; - - /** - * Converts this ListActiveDirectoriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListActiveDirectoriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListActiveDirectoriesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListActiveDirectoriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesRequest"; - }; - - return ListActiveDirectoriesRequest; - })(); - - v1.ListActiveDirectoriesResponse = (function() { - - /** - * Properties of a ListActiveDirectoriesResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListActiveDirectoriesResponse - * @property {Array.|null} [activeDirectories] ListActiveDirectoriesResponse activeDirectories - * @property {string|null} [nextPageToken] ListActiveDirectoriesResponse nextPageToken - * @property {Array.|null} [unreachable] ListActiveDirectoriesResponse unreachable - */ - - /** - * Constructs a new ListActiveDirectoriesResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListActiveDirectoriesResponse. - * @implements IListActiveDirectoriesResponse - * @constructor - * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set - */ - function ListActiveDirectoriesResponse(properties) { - this.activeDirectories = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListActiveDirectoriesResponse activeDirectories. - * @member {Array.} activeDirectories - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @instance - */ - ListActiveDirectoriesResponse.prototype.activeDirectories = $util.emptyArray; - - /** - * ListActiveDirectoriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @instance - */ - ListActiveDirectoriesResponse.prototype.nextPageToken = ""; - - /** - * ListActiveDirectoriesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @instance - */ - ListActiveDirectoriesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListActiveDirectoriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse instance - */ - ListActiveDirectoriesResponse.create = function create(properties) { - return new ListActiveDirectoriesResponse(properties); - }; - - /** - * Encodes the specified ListActiveDirectoriesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActiveDirectoriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activeDirectories != null && message.activeDirectories.length) - for (var i = 0; i < message.activeDirectories.length; ++i) - $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectories[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListActiveDirectoriesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListActiveDirectoriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {google.cloud.netapp.v1.IListActiveDirectoriesResponse} message ListActiveDirectoriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActiveDirectoriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActiveDirectoriesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.activeDirectories && message.activeDirectories.length)) - message.activeDirectories = []; - message.activeDirectories.push($root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListActiveDirectoriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActiveDirectoriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListActiveDirectoriesResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListActiveDirectoriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.activeDirectories != null && message.hasOwnProperty("activeDirectories")) { - if (!Array.isArray(message.activeDirectories)) - return "activeDirectories: array expected"; - for (var i = 0; i < message.activeDirectories.length; ++i) { - var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectories[i]); - if (error) - return "activeDirectories." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListActiveDirectoriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListActiveDirectoriesResponse} ListActiveDirectoriesResponse - */ - ListActiveDirectoriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse(); - if (object.activeDirectories) { - if (!Array.isArray(object.activeDirectories)) - throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: array expected"); - message.activeDirectories = []; - for (var i = 0; i < object.activeDirectories.length; ++i) { - if (typeof object.activeDirectories[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.activeDirectories: object expected"); - message.activeDirectories[i] = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectories[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListActiveDirectoriesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListActiveDirectoriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} message ListActiveDirectoriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListActiveDirectoriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.activeDirectories = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.activeDirectories && message.activeDirectories.length) { - object.activeDirectories = []; - for (var j = 0; j < message.activeDirectories.length; ++j) - object.activeDirectories[j] = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectories[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListActiveDirectoriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListActiveDirectoriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListActiveDirectoriesResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListActiveDirectoriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListActiveDirectoriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListActiveDirectoriesResponse"; - }; - - return ListActiveDirectoriesResponse; - })(); - - v1.GetActiveDirectoryRequest = (function() { - - /** - * Properties of a GetActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetActiveDirectoryRequest - * @property {string|null} [name] GetActiveDirectoryRequest name - */ - - /** - * Constructs a new GetActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetActiveDirectoryRequest. - * @implements IGetActiveDirectoryRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set - */ - function GetActiveDirectoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetActiveDirectoryRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @instance - */ - GetActiveDirectoryRequest.prototype.name = ""; - - /** - * Creates a new GetActiveDirectoryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest instance - */ - GetActiveDirectoryRequest.create = function create(properties) { - return new GetActiveDirectoryRequest(properties); - }; - - /** - * Encodes the specified GetActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetActiveDirectoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetActiveDirectoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} message GetActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetActiveDirectoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetActiveDirectoryRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetActiveDirectoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetActiveDirectoryRequest} GetActiveDirectoryRequest - */ - GetActiveDirectoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetActiveDirectoryRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetActiveDirectoryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetActiveDirectoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.GetActiveDirectoryRequest} message GetActiveDirectoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetActiveDirectoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetActiveDirectoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @instance - * @returns {Object.} JSON object - */ - GetActiveDirectoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetActiveDirectoryRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetActiveDirectoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetActiveDirectoryRequest"; - }; - - return GetActiveDirectoryRequest; - })(); - - v1.CreateActiveDirectoryRequest = (function() { - - /** - * Properties of a CreateActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateActiveDirectoryRequest - * @property {string|null} [parent] CreateActiveDirectoryRequest parent - * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] CreateActiveDirectoryRequest activeDirectory - * @property {string|null} [activeDirectoryId] CreateActiveDirectoryRequest activeDirectoryId - */ - - /** - * Constructs a new CreateActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateActiveDirectoryRequest. - * @implements ICreateActiveDirectoryRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set - */ - function CreateActiveDirectoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateActiveDirectoryRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @instance - */ - CreateActiveDirectoryRequest.prototype.parent = ""; - - /** - * CreateActiveDirectoryRequest activeDirectory. - * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @instance - */ - CreateActiveDirectoryRequest.prototype.activeDirectory = null; - - /** - * CreateActiveDirectoryRequest activeDirectoryId. - * @member {string} activeDirectoryId - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @instance - */ - CreateActiveDirectoryRequest.prototype.activeDirectoryId = ""; - - /** - * Creates a new CreateActiveDirectoryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest instance - */ - CreateActiveDirectoryRequest.create = function create(properties) { - return new CreateActiveDirectoryRequest(properties); - }; - - /** - * Encodes the specified CreateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateActiveDirectoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) - $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.activeDirectoryId != null && Object.hasOwnProperty.call(message, "activeDirectoryId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.activeDirectoryId); - return writer; - }; - - /** - * Encodes the specified CreateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateActiveDirectoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} message CreateActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateActiveDirectoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); - break; - } - case 3: { - message.activeDirectoryId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateActiveDirectoryRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateActiveDirectoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { - var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); - if (error) - return "activeDirectory." + error; - } - if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) - if (!$util.isString(message.activeDirectoryId)) - return "activeDirectoryId: string expected"; - return null; - }; - - /** - * Creates a CreateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateActiveDirectoryRequest} CreateActiveDirectoryRequest - */ - CreateActiveDirectoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.activeDirectory != null) { - if (typeof object.activeDirectory !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateActiveDirectoryRequest.activeDirectory: object expected"); - message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); - } - if (object.activeDirectoryId != null) - message.activeDirectoryId = String(object.activeDirectoryId); - return message; - }; - - /** - * Creates a plain object from a CreateActiveDirectoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.CreateActiveDirectoryRequest} message CreateActiveDirectoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateActiveDirectoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.activeDirectory = null; - object.activeDirectoryId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); - if (message.activeDirectoryId != null && message.hasOwnProperty("activeDirectoryId")) - object.activeDirectoryId = message.activeDirectoryId; - return object; - }; - - /** - * Converts this CreateActiveDirectoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @instance - * @returns {Object.} JSON object - */ - CreateActiveDirectoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateActiveDirectoryRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateActiveDirectoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateActiveDirectoryRequest"; - }; - - return CreateActiveDirectoryRequest; - })(); - - v1.UpdateActiveDirectoryRequest = (function() { - - /** - * Properties of an UpdateActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateActiveDirectoryRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateActiveDirectoryRequest updateMask - * @property {google.cloud.netapp.v1.IActiveDirectory|null} [activeDirectory] UpdateActiveDirectoryRequest activeDirectory - */ - - /** - * Constructs a new UpdateActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateActiveDirectoryRequest. - * @implements IUpdateActiveDirectoryRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set - */ - function UpdateActiveDirectoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateActiveDirectoryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @instance - */ - UpdateActiveDirectoryRequest.prototype.updateMask = null; - - /** - * UpdateActiveDirectoryRequest activeDirectory. - * @member {google.cloud.netapp.v1.IActiveDirectory|null|undefined} activeDirectory - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @instance - */ - UpdateActiveDirectoryRequest.prototype.activeDirectory = null; - - /** - * Creates a new UpdateActiveDirectoryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest instance - */ - UpdateActiveDirectoryRequest.create = function create(properties) { - return new UpdateActiveDirectoryRequest(properties); - }; - - /** - * Encodes the specified UpdateActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateActiveDirectoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) - $root.google.cloud.netapp.v1.ActiveDirectory.encode(message.activeDirectory, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateActiveDirectoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateActiveDirectoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateActiveDirectoryRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateActiveDirectoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) { - var error = $root.google.cloud.netapp.v1.ActiveDirectory.verify(message.activeDirectory); - if (error) - return "activeDirectory." + error; - } - return null; - }; - - /** - * Creates an UpdateActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} UpdateActiveDirectoryRequest - */ - UpdateActiveDirectoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.activeDirectory != null) { - if (typeof object.activeDirectory !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateActiveDirectoryRequest.activeDirectory: object expected"); - message.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.fromObject(object.activeDirectory); - } - return message; - }; - - /** - * Creates a plain object from an UpdateActiveDirectoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.UpdateActiveDirectoryRequest} message UpdateActiveDirectoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateActiveDirectoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.activeDirectory = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - object.activeDirectory = $root.google.cloud.netapp.v1.ActiveDirectory.toObject(message.activeDirectory, options); - return object; - }; - - /** - * Converts this UpdateActiveDirectoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateActiveDirectoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateActiveDirectoryRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateActiveDirectoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateActiveDirectoryRequest"; - }; - - return UpdateActiveDirectoryRequest; - })(); - - v1.DeleteActiveDirectoryRequest = (function() { - - /** - * Properties of a DeleteActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteActiveDirectoryRequest - * @property {string|null} [name] DeleteActiveDirectoryRequest name - */ - - /** - * Constructs a new DeleteActiveDirectoryRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteActiveDirectoryRequest. - * @implements IDeleteActiveDirectoryRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set - */ - function DeleteActiveDirectoryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteActiveDirectoryRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @instance - */ - DeleteActiveDirectoryRequest.prototype.name = ""; - - /** - * Creates a new DeleteActiveDirectoryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest instance - */ - DeleteActiveDirectoryRequest.create = function create(properties) { - return new DeleteActiveDirectoryRequest(properties); - }; - - /** - * Encodes the specified DeleteActiveDirectoryRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteActiveDirectoryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteActiveDirectoryRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteActiveDirectoryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteActiveDirectoryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteActiveDirectoryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteActiveDirectoryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteActiveDirectoryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteActiveDirectoryRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteActiveDirectoryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteActiveDirectoryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} DeleteActiveDirectoryRequest - */ - DeleteActiveDirectoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteActiveDirectoryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {google.cloud.netapp.v1.DeleteActiveDirectoryRequest} message DeleteActiveDirectoryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteActiveDirectoryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteActiveDirectoryRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteActiveDirectoryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteActiveDirectoryRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteActiveDirectoryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteActiveDirectoryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteActiveDirectoryRequest"; - }; - - return DeleteActiveDirectoryRequest; - })(); - - v1.ActiveDirectory = (function() { - - /** - * Properties of an ActiveDirectory. - * @memberof google.cloud.netapp.v1 - * @interface IActiveDirectory - * @property {string|null} [name] ActiveDirectory name - * @property {google.protobuf.ITimestamp|null} [createTime] ActiveDirectory createTime - * @property {google.cloud.netapp.v1.ActiveDirectory.State|null} [state] ActiveDirectory state - * @property {string|null} [domain] ActiveDirectory domain - * @property {string|null} [site] ActiveDirectory site - * @property {string|null} [dns] ActiveDirectory dns - * @property {string|null} [netBiosPrefix] ActiveDirectory netBiosPrefix - * @property {string|null} [organizationalUnit] ActiveDirectory organizationalUnit - * @property {boolean|null} [aesEncryption] ActiveDirectory aesEncryption - * @property {string|null} [username] ActiveDirectory username - * @property {string|null} [password] ActiveDirectory password - * @property {Array.|null} [backupOperators] ActiveDirectory backupOperators - * @property {Array.|null} [administrators] ActiveDirectory administrators - * @property {Array.|null} [securityOperators] ActiveDirectory securityOperators - * @property {string|null} [kdcHostname] ActiveDirectory kdcHostname - * @property {string|null} [kdcIp] ActiveDirectory kdcIp - * @property {boolean|null} [nfsUsersWithLdap] ActiveDirectory nfsUsersWithLdap - * @property {string|null} [description] ActiveDirectory description - * @property {boolean|null} [ldapSigning] ActiveDirectory ldapSigning - * @property {boolean|null} [encryptDcConnections] ActiveDirectory encryptDcConnections - * @property {Object.|null} [labels] ActiveDirectory labels - * @property {string|null} [stateDetails] ActiveDirectory stateDetails - */ - - /** - * Constructs a new ActiveDirectory. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ActiveDirectory. - * @implements IActiveDirectory - * @constructor - * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set - */ - function ActiveDirectory(properties) { - this.backupOperators = []; - this.administrators = []; - this.securityOperators = []; - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActiveDirectory name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.name = ""; - - /** - * ActiveDirectory createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.createTime = null; - - /** - * ActiveDirectory state. - * @member {google.cloud.netapp.v1.ActiveDirectory.State} state - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.state = 0; - - /** - * ActiveDirectory domain. - * @member {string} domain - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.domain = ""; - - /** - * ActiveDirectory site. - * @member {string} site - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.site = ""; - - /** - * ActiveDirectory dns. - * @member {string} dns - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.dns = ""; - - /** - * ActiveDirectory netBiosPrefix. - * @member {string} netBiosPrefix - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.netBiosPrefix = ""; - - /** - * ActiveDirectory organizationalUnit. - * @member {string} organizationalUnit - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.organizationalUnit = ""; - - /** - * ActiveDirectory aesEncryption. - * @member {boolean} aesEncryption - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.aesEncryption = false; - - /** - * ActiveDirectory username. - * @member {string} username - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.username = ""; - - /** - * ActiveDirectory password. - * @member {string} password - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.password = ""; - - /** - * ActiveDirectory backupOperators. - * @member {Array.} backupOperators - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.backupOperators = $util.emptyArray; - - /** - * ActiveDirectory administrators. - * @member {Array.} administrators - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.administrators = $util.emptyArray; - - /** - * ActiveDirectory securityOperators. - * @member {Array.} securityOperators - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.securityOperators = $util.emptyArray; - - /** - * ActiveDirectory kdcHostname. - * @member {string} kdcHostname - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.kdcHostname = ""; - - /** - * ActiveDirectory kdcIp. - * @member {string} kdcIp - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.kdcIp = ""; - - /** - * ActiveDirectory nfsUsersWithLdap. - * @member {boolean} nfsUsersWithLdap - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.nfsUsersWithLdap = false; - - /** - * ActiveDirectory description. - * @member {string} description - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.description = ""; - - /** - * ActiveDirectory ldapSigning. - * @member {boolean} ldapSigning - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.ldapSigning = false; - - /** - * ActiveDirectory encryptDcConnections. - * @member {boolean} encryptDcConnections - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.encryptDcConnections = false; - - /** - * ActiveDirectory labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.labels = $util.emptyObject; - - /** - * ActiveDirectory stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - */ - ActiveDirectory.prototype.stateDetails = ""; - - /** - * Creates a new ActiveDirectory instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {google.cloud.netapp.v1.IActiveDirectory=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory instance - */ - ActiveDirectory.create = function create(properties) { - return new ActiveDirectory(properties); - }; - - /** - * Encodes the specified ActiveDirectory message. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveDirectory.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.domain); - if (message.site != null && Object.hasOwnProperty.call(message, "site")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.site); - if (message.dns != null && Object.hasOwnProperty.call(message, "dns")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.dns); - if (message.netBiosPrefix != null && Object.hasOwnProperty.call(message, "netBiosPrefix")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.netBiosPrefix); - if (message.organizationalUnit != null && Object.hasOwnProperty.call(message, "organizationalUnit")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.organizationalUnit); - if (message.aesEncryption != null && Object.hasOwnProperty.call(message, "aesEncryption")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.aesEncryption); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.password); - if (message.backupOperators != null && message.backupOperators.length) - for (var i = 0; i < message.backupOperators.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.backupOperators[i]); - if (message.securityOperators != null && message.securityOperators.length) - for (var i = 0; i < message.securityOperators.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.securityOperators[i]); - if (message.kdcHostname != null && Object.hasOwnProperty.call(message, "kdcHostname")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.kdcHostname); - if (message.kdcIp != null && Object.hasOwnProperty.call(message, "kdcIp")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.kdcIp); - if (message.nfsUsersWithLdap != null && Object.hasOwnProperty.call(message, "nfsUsersWithLdap")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.nfsUsersWithLdap); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); - if (message.ldapSigning != null && Object.hasOwnProperty.call(message, "ldapSigning")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.ldapSigning); - if (message.encryptDcConnections != null && Object.hasOwnProperty.call(message, "encryptDcConnections")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.encryptDcConnections); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.stateDetails); - if (message.administrators != null && message.administrators.length) - for (var i = 0; i < message.administrators.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.administrators[i]); - return writer; - }; - - /** - * Encodes the specified ActiveDirectory message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ActiveDirectory.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {google.cloud.netapp.v1.IActiveDirectory} message ActiveDirectory message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveDirectory.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActiveDirectory message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveDirectory.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ActiveDirectory(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.domain = reader.string(); - break; - } - case 5: { - message.site = reader.string(); - break; - } - case 6: { - message.dns = reader.string(); - break; - } - case 7: { - message.netBiosPrefix = reader.string(); - break; - } - case 8: { - message.organizationalUnit = reader.string(); - break; - } - case 9: { - message.aesEncryption = reader.bool(); - break; - } - case 10: { - message.username = reader.string(); - break; - } - case 11: { - message.password = reader.string(); - break; - } - case 12: { - if (!(message.backupOperators && message.backupOperators.length)) - message.backupOperators = []; - message.backupOperators.push(reader.string()); - break; - } - case 22: { - if (!(message.administrators && message.administrators.length)) - message.administrators = []; - message.administrators.push(reader.string()); - break; - } - case 13: { - if (!(message.securityOperators && message.securityOperators.length)) - message.securityOperators = []; - message.securityOperators.push(reader.string()); - break; - } - case 14: { - message.kdcHostname = reader.string(); - break; - } - case 15: { - message.kdcIp = reader.string(); - break; - } - case 16: { - message.nfsUsersWithLdap = reader.bool(); - break; - } - case 17: { - message.description = reader.string(); - break; - } - case 18: { - message.ldapSigning = reader.bool(); - break; - } - case 19: { - message.encryptDcConnections = reader.bool(); - break; - } - case 20: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 21: { - message.stateDetails = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActiveDirectory message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveDirectory.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActiveDirectory message. - * @function verify - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveDirectory.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + 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: - case 7: - break; - } - if (message.domain != null && message.hasOwnProperty("domain")) - if (!$util.isString(message.domain)) - return "domain: string expected"; - if (message.site != null && message.hasOwnProperty("site")) - if (!$util.isString(message.site)) - return "site: string expected"; - if (message.dns != null && message.hasOwnProperty("dns")) - if (!$util.isString(message.dns)) - return "dns: string expected"; - if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) - if (!$util.isString(message.netBiosPrefix)) - return "netBiosPrefix: string expected"; - if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) - if (!$util.isString(message.organizationalUnit)) - return "organizationalUnit: string expected"; - if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) - if (typeof message.aesEncryption !== "boolean") - return "aesEncryption: boolean expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.backupOperators != null && message.hasOwnProperty("backupOperators")) { - if (!Array.isArray(message.backupOperators)) - return "backupOperators: array expected"; - for (var i = 0; i < message.backupOperators.length; ++i) - if (!$util.isString(message.backupOperators[i])) - return "backupOperators: string[] expected"; - } - if (message.administrators != null && message.hasOwnProperty("administrators")) { - if (!Array.isArray(message.administrators)) - return "administrators: array expected"; - for (var i = 0; i < message.administrators.length; ++i) - if (!$util.isString(message.administrators[i])) - return "administrators: string[] expected"; - } - if (message.securityOperators != null && message.hasOwnProperty("securityOperators")) { - if (!Array.isArray(message.securityOperators)) - return "securityOperators: array expected"; - for (var i = 0; i < message.securityOperators.length; ++i) - if (!$util.isString(message.securityOperators[i])) - return "securityOperators: string[] expected"; - } - if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) - if (!$util.isString(message.kdcHostname)) - return "kdcHostname: string expected"; - if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) - if (!$util.isString(message.kdcIp)) - return "kdcIp: string expected"; - if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) - if (typeof message.nfsUsersWithLdap !== "boolean") - return "nfsUsersWithLdap: boolean expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) - if (typeof message.ldapSigning !== "boolean") - return "ldapSigning: boolean expected"; - if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) - if (typeof message.encryptDcConnections !== "boolean") - return "encryptDcConnections: boolean expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - return null; - }; - - /** - * Creates an ActiveDirectory message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ActiveDirectory} ActiveDirectory - */ - ActiveDirectory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ActiveDirectory) - return object; - var message = new $root.google.cloud.netapp.v1.ActiveDirectory(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - 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 "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "IN_USE": - case 4: - message.state = 4; - break; - case "DELETING": - case 5: - message.state = 5; - break; - case "ERROR": - case 6: - message.state = 6; - break; - case "DIAGNOSING": - case 7: - message.state = 7; - break; - } - if (object.domain != null) - message.domain = String(object.domain); - if (object.site != null) - message.site = String(object.site); - if (object.dns != null) - message.dns = String(object.dns); - if (object.netBiosPrefix != null) - message.netBiosPrefix = String(object.netBiosPrefix); - if (object.organizationalUnit != null) - message.organizationalUnit = String(object.organizationalUnit); - if (object.aesEncryption != null) - message.aesEncryption = Boolean(object.aesEncryption); - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.backupOperators) { - if (!Array.isArray(object.backupOperators)) - throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.backupOperators: array expected"); - message.backupOperators = []; - for (var i = 0; i < object.backupOperators.length; ++i) - message.backupOperators[i] = String(object.backupOperators[i]); - } - if (object.administrators) { - if (!Array.isArray(object.administrators)) - throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.administrators: array expected"); - message.administrators = []; - for (var i = 0; i < object.administrators.length; ++i) - message.administrators[i] = String(object.administrators[i]); - } - if (object.securityOperators) { - if (!Array.isArray(object.securityOperators)) - throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.securityOperators: array expected"); - message.securityOperators = []; - for (var i = 0; i < object.securityOperators.length; ++i) - message.securityOperators[i] = String(object.securityOperators[i]); - } - if (object.kdcHostname != null) - message.kdcHostname = String(object.kdcHostname); - if (object.kdcIp != null) - message.kdcIp = String(object.kdcIp); - if (object.nfsUsersWithLdap != null) - message.nfsUsersWithLdap = Boolean(object.nfsUsersWithLdap); - if (object.description != null) - message.description = String(object.description); - if (object.ldapSigning != null) - message.ldapSigning = Boolean(object.ldapSigning); - if (object.encryptDcConnections != null) - message.encryptDcConnections = Boolean(object.encryptDcConnections); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.ActiveDirectory.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - return message; - }; - - /** - * Creates a plain object from an ActiveDirectory message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {google.cloud.netapp.v1.ActiveDirectory} message ActiveDirectory - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveDirectory.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupOperators = []; - object.securityOperators = []; - object.administrators = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.domain = ""; - object.site = ""; - object.dns = ""; - object.netBiosPrefix = ""; - object.organizationalUnit = ""; - object.aesEncryption = false; - object.username = ""; - object.password = ""; - object.kdcHostname = ""; - object.kdcIp = ""; - object.nfsUsersWithLdap = false; - object.description = ""; - object.ldapSigning = false; - object.encryptDcConnections = false; - object.stateDetails = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.ActiveDirectory.State[message.state] : message.state; - if (message.domain != null && message.hasOwnProperty("domain")) - object.domain = message.domain; - if (message.site != null && message.hasOwnProperty("site")) - object.site = message.site; - if (message.dns != null && message.hasOwnProperty("dns")) - object.dns = message.dns; - if (message.netBiosPrefix != null && message.hasOwnProperty("netBiosPrefix")) - object.netBiosPrefix = message.netBiosPrefix; - if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) - object.organizationalUnit = message.organizationalUnit; - if (message.aesEncryption != null && message.hasOwnProperty("aesEncryption")) - object.aesEncryption = message.aesEncryption; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.backupOperators && message.backupOperators.length) { - object.backupOperators = []; - for (var j = 0; j < message.backupOperators.length; ++j) - object.backupOperators[j] = message.backupOperators[j]; - } - if (message.securityOperators && message.securityOperators.length) { - object.securityOperators = []; - for (var j = 0; j < message.securityOperators.length; ++j) - object.securityOperators[j] = message.securityOperators[j]; - } - if (message.kdcHostname != null && message.hasOwnProperty("kdcHostname")) - object.kdcHostname = message.kdcHostname; - if (message.kdcIp != null && message.hasOwnProperty("kdcIp")) - object.kdcIp = message.kdcIp; - if (message.nfsUsersWithLdap != null && message.hasOwnProperty("nfsUsersWithLdap")) - object.nfsUsersWithLdap = message.nfsUsersWithLdap; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.ldapSigning != null && message.hasOwnProperty("ldapSigning")) - object.ldapSigning = message.ldapSigning; - if (message.encryptDcConnections != null && message.hasOwnProperty("encryptDcConnections")) - object.encryptDcConnections = message.encryptDcConnections; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.administrators && message.administrators.length) { - object.administrators = []; - for (var j = 0; j < message.administrators.length; ++j) - object.administrators[j] = message.administrators[j]; - } - return object; - }; - - /** - * Converts this ActiveDirectory to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @instance - * @returns {Object.} JSON object - */ - ActiveDirectory.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActiveDirectory - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ActiveDirectory - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActiveDirectory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ActiveDirectory"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.ActiveDirectory.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} IN_USE=4 IN_USE value - * @property {number} DELETING=5 DELETING value - * @property {number} ERROR=6 ERROR value - * @property {number} DIAGNOSING=7 DIAGNOSING value - */ - ActiveDirectory.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "IN_USE"] = 4; - values[valuesById[5] = "DELETING"] = 5; - values[valuesById[6] = "ERROR"] = 6; - values[valuesById[7] = "DIAGNOSING"] = 7; - return values; - })(); - - return ActiveDirectory; - })(); - - v1.Backup = (function() { - - /** - * Properties of a Backup. - * @memberof google.cloud.netapp.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {google.cloud.netapp.v1.Backup.State|null} [state] Backup state - * @property {string|null} [description] Backup description - * @property {number|Long|null} [volumeUsageBytes] Backup volumeUsageBytes - * @property {google.cloud.netapp.v1.Backup.Type|null} [backupType] Backup backupType - * @property {string|null} [sourceVolume] Backup sourceVolume - * @property {string|null} [sourceSnapshot] Backup sourceSnapshot - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {Object.|null} [labels] Backup labels - * @property {number|Long|null} [chainStorageBytes] Backup chainStorageBytes - * @property {boolean|null} [satisfiesPzs] Backup satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Backup satisfiesPzi - * @property {string|null} [volumeRegion] Backup volumeRegion - * @property {string|null} [backupRegion] Backup backupRegion - * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime - */ - - /** - * Constructs a new Backup. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Backup. - * @implements IBackup - * @constructor - * @param {google.cloud.netapp.v1.IBackup=} [properties] Properties to set - */ - function Backup(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Backup name. - * @member {string} name - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup state. - * @member {google.cloud.netapp.v1.Backup.State} state - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.state = 0; - - /** - * Backup description. - * @member {string} description - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.description = ""; - - /** - * Backup volumeUsageBytes. - * @member {number|Long} volumeUsageBytes - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.volumeUsageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Backup backupType. - * @member {google.cloud.netapp.v1.Backup.Type} backupType - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.backupType = 0; - - /** - * Backup sourceVolume. - * @member {string} sourceVolume - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.sourceVolume = ""; - - /** - * Backup sourceSnapshot. - * @member {string|null|undefined} sourceSnapshot - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.sourceSnapshot = null; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.createTime = null; - - /** - * Backup labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.labels = $util.emptyObject; - - /** - * Backup chainStorageBytes. - * @member {number|Long} chainStorageBytes - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.chainStorageBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Backup satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.satisfiesPzs = false; - - /** - * Backup satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.satisfiesPzi = false; - - /** - * Backup volumeRegion. - * @member {string} volumeRegion - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.volumeRegion = ""; - - /** - * Backup backupRegion. - * @member {string} backupRegion - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.backupRegion = ""; - - /** - * Backup enforcedRetentionEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime - * @memberof google.cloud.netapp.v1.Backup - * @instance - */ - Backup.prototype.enforcedRetentionEndTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_sourceSnapshot", { - get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Backup instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {google.cloud.netapp.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Backup} Backup instance - */ - Backup.create = function create(properties) { - return new Backup(properties); - }; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.netapp.v1.Backup.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {google.cloud.netapp.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.volumeUsageBytes != null && Object.hasOwnProperty.call(message, "volumeUsageBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.volumeUsageBytes); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.backupType); - if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceVolume); - if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceSnapshot); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.chainStorageBytes != null && Object.hasOwnProperty.call(message, "chainStorageBytes")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.chainStorageBytes); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.satisfiesPzs); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.satisfiesPzi); - if (message.volumeRegion != null && Object.hasOwnProperty.call(message, "volumeRegion")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.volumeRegion); - if (message.backupRegion != null && Object.hasOwnProperty.call(message, "backupRegion")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupRegion); - if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) - $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Backup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {google.cloud.netapp.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Backup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.volumeUsageBytes = reader.int64(); - break; - } - case 5: { - message.backupType = reader.int32(); - break; - } - case 6: { - message.sourceVolume = reader.string(); - break; - } - case 7: { - message.sourceSnapshot = reader.string(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 10: { - message.chainStorageBytes = reader.int64(); - break; - } - case 11: { - message.satisfiesPzs = reader.bool(); - break; - } - case 12: { - message.satisfiesPzi = reader.bool(); - break; - } - case 13: { - message.volumeRegion = reader.string(); - break; - } - case 14: { - message.backupRegion = reader.string(); - break; - } - case 15: { - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Backup message. - * @function verify - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Backup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.volumeUsageBytes != null && message.hasOwnProperty("volumeUsageBytes")) - if (!$util.isInteger(message.volumeUsageBytes) && !(message.volumeUsageBytes && $util.isInteger(message.volumeUsageBytes.low) && $util.isInteger(message.volumeUsageBytes.high))) - return "volumeUsageBytes: integer|Long expected"; - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - if (!$util.isString(message.sourceVolume)) - return "sourceVolume: string expected"; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { - properties._sourceSnapshot = 1; - if (!$util.isString(message.sourceSnapshot)) - return "sourceSnapshot: string expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.chainStorageBytes != null && message.hasOwnProperty("chainStorageBytes")) - if (!$util.isInteger(message.chainStorageBytes) && !(message.chainStorageBytes && $util.isInteger(message.chainStorageBytes.low) && $util.isInteger(message.chainStorageBytes.high))) - return "chainStorageBytes: integer|Long expected"; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - if (message.volumeRegion != null && message.hasOwnProperty("volumeRegion")) - if (!$util.isString(message.volumeRegion)) - return "volumeRegion: string expected"; - if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) - if (!$util.isString(message.backupRegion)) - return "backupRegion: string expected"; - if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); - if (error) - return "enforcedRetentionEndTime." + error; - } - return null; - }; - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Backup} Backup - */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Backup) - return object; - var message = new $root.google.cloud.netapp.v1.Backup(); - 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 "UPLOADING": - case 2: - message.state = 2; - break; - case "READY": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - case "UPDATING": - case 6: - message.state = 6; - break; - } - if (object.description != null) - message.description = String(object.description); - if (object.volumeUsageBytes != null) - if ($util.Long) - (message.volumeUsageBytes = $util.Long.fromValue(object.volumeUsageBytes)).unsigned = false; - else if (typeof object.volumeUsageBytes === "string") - message.volumeUsageBytes = parseInt(object.volumeUsageBytes, 10); - else if (typeof object.volumeUsageBytes === "number") - message.volumeUsageBytes = object.volumeUsageBytes; - else if (typeof object.volumeUsageBytes === "object") - message.volumeUsageBytes = new $util.LongBits(object.volumeUsageBytes.low >>> 0, object.volumeUsageBytes.high >>> 0).toNumber(); - switch (object.backupType) { - default: - if (typeof object.backupType === "number") { - message.backupType = object.backupType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.backupType = 0; - break; - case "MANUAL": - case 1: - message.backupType = 1; - break; - case "SCHEDULED": - case 2: - message.backupType = 2; - break; - } - if (object.sourceVolume != null) - message.sourceVolume = String(object.sourceVolume); - if (object.sourceSnapshot != null) - message.sourceSnapshot = String(object.sourceSnapshot); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Backup.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.Backup.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.chainStorageBytes != null) - if ($util.Long) - (message.chainStorageBytes = $util.Long.fromValue(object.chainStorageBytes)).unsigned = false; - else if (typeof object.chainStorageBytes === "string") - message.chainStorageBytes = parseInt(object.chainStorageBytes, 10); - else if (typeof object.chainStorageBytes === "number") - message.chainStorageBytes = object.chainStorageBytes; - else if (typeof object.chainStorageBytes === "object") - message.chainStorageBytes = new $util.LongBits(object.chainStorageBytes.low >>> 0, object.chainStorageBytes.high >>> 0).toNumber(); - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.volumeRegion != null) - message.volumeRegion = String(object.volumeRegion); - if (object.backupRegion != null) - message.backupRegion = String(object.backupRegion); - if (object.enforcedRetentionEndTime != null) { - if (typeof object.enforcedRetentionEndTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Backup.enforcedRetentionEndTime: object expected"); - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); - } - return message; - }; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {google.cloud.netapp.v1.Backup} message Backup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Backup.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.description = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.volumeUsageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.volumeUsageBytes = options.longs === String ? "0" : 0; - object.backupType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.sourceVolume = ""; - object.createTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.chainStorageBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.chainStorageBytes = options.longs === String ? "0" : 0; - object.satisfiesPzs = false; - object.satisfiesPzi = false; - object.volumeRegion = ""; - object.backupRegion = ""; - object.enforcedRetentionEndTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Backup.State[message.state] : message.state; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.volumeUsageBytes != null && message.hasOwnProperty("volumeUsageBytes")) - if (typeof message.volumeUsageBytes === "number") - object.volumeUsageBytes = options.longs === String ? String(message.volumeUsageBytes) : message.volumeUsageBytes; - else - object.volumeUsageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.volumeUsageBytes) : options.longs === Number ? new $util.LongBits(message.volumeUsageBytes.low >>> 0, message.volumeUsageBytes.high >>> 0).toNumber() : message.volumeUsageBytes; - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = options.enums === String ? $root.google.cloud.netapp.v1.Backup.Type[message.backupType] === undefined ? message.backupType : $root.google.cloud.netapp.v1.Backup.Type[message.backupType] : message.backupType; - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - object.sourceVolume = message.sourceVolume; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { - object.sourceSnapshot = message.sourceSnapshot; - if (options.oneofs) - object._sourceSnapshot = "sourceSnapshot"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.chainStorageBytes != null && message.hasOwnProperty("chainStorageBytes")) - if (typeof message.chainStorageBytes === "number") - object.chainStorageBytes = options.longs === String ? String(message.chainStorageBytes) : message.chainStorageBytes; - else - object.chainStorageBytes = options.longs === String ? $util.Long.prototype.toString.call(message.chainStorageBytes) : options.longs === Number ? new $util.LongBits(message.chainStorageBytes.low >>> 0, message.chainStorageBytes.high >>> 0).toNumber() : message.chainStorageBytes; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - if (message.volumeRegion != null && message.hasOwnProperty("volumeRegion")) - object.volumeRegion = message.volumeRegion; - if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) - object.backupRegion = message.backupRegion; - if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) - object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); - return object; - }; - - /** - * Converts this Backup to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.Backup - * @instance - * @returns {Object.} JSON object - */ - Backup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Backup - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Backup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.Backup"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} UPLOADING=2 UPLOADING value - * @property {number} READY=3 READY value - * @property {number} DELETING=4 DELETING value - * @property {number} ERROR=5 ERROR value - * @property {number} UPDATING=6 UPDATING value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "UPLOADING"] = 2; - values[valuesById[3] = "READY"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - values[valuesById[6] = "UPDATING"] = 6; - return values; - })(); - - /** - * Type enum. - * @name google.cloud.netapp.v1.Backup.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} MANUAL=1 MANUAL value - * @property {number} SCHEDULED=2 SCHEDULED value - */ - Backup.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MANUAL"] = 1; - values[valuesById[2] = "SCHEDULED"] = 2; - return values; - })(); - - return Backup; - })(); - - v1.ListBackupsRequest = (function() { - - /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {string|null} [filter] ListBackupsRequest filter - */ - - /** - * Constructs a new ListBackupsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListBackupsRequest=} [properties] Properties to set - */ - function ListBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.orderBy = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest instance - */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); - }; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupsRequest} ListBackupsRequest - */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupsRequest) - return object; - var message = new $root.google.cloud.netapp.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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {google.cloud.netapp.v1.ListBackupsRequest} message ListBackupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListBackupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupsRequest"; - }; - - return ListBackupsRequest; - })(); - - v1.ListBackupsResponse = (function() { - - /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable - */ - - /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse instance - */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); - }; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.netapp.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.netapp.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupsResponse} ListBackupsResponse - */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.netapp.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {google.cloud.netapp.v1.ListBackupsResponse} message ListBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.netapp.v1.Backup.toObject(message.backups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListBackupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupsResponse"; - }; - - return ListBackupsResponse; - })(); - - v1.GetBackupRequest = (function() { - - /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - */ - - /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetBackupRequest=} [properties] Properties to set - */ - function GetBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.name = ""; - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest instance - */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); - }; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetBackupRequest} GetBackupRequest - */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetBackupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {google.cloud.netapp.v1.GetBackupRequest} message GetBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupRequest"; - }; - - return GetBackupRequest; - })(); - - v1.CreateBackupRequest = (function() { - - /** - * Properties of a CreateBackupRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateBackupRequest - * @property {string|null} [parent] CreateBackupRequest parent - * @property {string|null} [backupId] CreateBackupRequest backupId - * @property {google.cloud.netapp.v1.IBackup|null} [backup] CreateBackupRequest backup - */ - - /** - * Constructs a new CreateBackupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateBackupRequest. - * @implements ICreateBackupRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateBackupRequest=} [properties] Properties to set - */ - function CreateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.parent = ""; - - /** - * CreateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.backupId = ""; - - /** - * CreateBackupRequest backup. - * @member {google.cloud.netapp.v1.IBackup|null|undefined} backup - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @instance - */ - CreateBackupRequest.prototype.backup = null; - - /** - * Creates a new CreateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest instance - */ - CreateBackupRequest.create = function create(properties) { - return new CreateBackupRequest(properties); - }; - - /** - * Encodes the specified CreateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupId); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.netapp.v1.Backup.encode(message.backup, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupRequest} message CreateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupId = reader.string(); - break; - } - case 3: { - message.backup = $root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.netapp.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - return null; - }; - - /** - * Creates a CreateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateBackupRequest} CreateBackupRequest - */ - CreateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateBackupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateBackupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.netapp.v1.Backup.fromObject(object.backup); - } - return message; - }; - - /** - * Creates a plain object from a CreateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {google.cloud.netapp.v1.CreateBackupRequest} message CreateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupId = ""; - object.backup = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.netapp.v1.Backup.toObject(message.backup, options); - return object; - }; - - /** - * Converts this CreateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupRequest"; - }; - - return CreateBackupRequest; - })(); - - v1.DeleteBackupRequest = (function() { - - /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - */ - - /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteBackupRequest=} [properties] Properties to set - */ - function DeleteBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.name = ""; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest instance - */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteBackupRequest} DeleteBackupRequest - */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteBackupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {google.cloud.netapp.v1.DeleteBackupRequest} message DeleteBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupRequest"; - }; - - return DeleteBackupRequest; - })(); - - v1.UpdateBackupRequest = (function() { - - /** - * Properties of an UpdateBackupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.netapp.v1.IBackup|null} [backup] UpdateBackupRequest backup - */ - - /** - * Constructs a new UpdateBackupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateBackupRequest=} [properties] Properties to set - */ - function UpdateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.updateMask = null; - - /** - * UpdateBackupRequest backup. - * @member {google.cloud.netapp.v1.IBackup|null|undefined} backup - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.backup = null; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest instance - */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.netapp.v1.Backup.encode(message.backup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.backup = $root.google.cloud.netapp.v1.Backup.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.netapp.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - return null; - }; - - /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateBackupRequest} UpdateBackupRequest - */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.netapp.v1.Backup.fromObject(object.backup); - } - return message; - }; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {google.cloud.netapp.v1.UpdateBackupRequest} message UpdateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - } - 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.netapp.v1.Backup.toObject(message.backup, options); - return object; - }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupRequest"; - }; - - return UpdateBackupRequest; - })(); - - v1.BackupPolicy = (function() { - - /** - * Properties of a BackupPolicy. - * @memberof google.cloud.netapp.v1 - * @interface IBackupPolicy - * @property {string|null} [name] BackupPolicy name - * @property {number|null} [dailyBackupLimit] BackupPolicy dailyBackupLimit - * @property {number|null} [weeklyBackupLimit] BackupPolicy weeklyBackupLimit - * @property {number|null} [monthlyBackupLimit] BackupPolicy monthlyBackupLimit - * @property {string|null} [description] BackupPolicy description - * @property {boolean|null} [enabled] BackupPolicy enabled - * @property {number|null} [assignedVolumeCount] BackupPolicy assignedVolumeCount - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPolicy createTime - * @property {Object.|null} [labels] BackupPolicy labels - * @property {google.cloud.netapp.v1.BackupPolicy.State|null} [state] BackupPolicy state - */ - - /** - * Constructs a new BackupPolicy. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a BackupPolicy. - * @implements IBackupPolicy - * @constructor - * @param {google.cloud.netapp.v1.IBackupPolicy=} [properties] Properties to set - */ - function BackupPolicy(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPolicy name. - * @member {string} name - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.name = ""; - - /** - * BackupPolicy dailyBackupLimit. - * @member {number|null|undefined} dailyBackupLimit - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.dailyBackupLimit = null; - - /** - * BackupPolicy weeklyBackupLimit. - * @member {number|null|undefined} weeklyBackupLimit - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.weeklyBackupLimit = null; - - /** - * BackupPolicy monthlyBackupLimit. - * @member {number|null|undefined} monthlyBackupLimit - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.monthlyBackupLimit = null; - - /** - * BackupPolicy description. - * @member {string|null|undefined} description - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.description = null; - - /** - * BackupPolicy enabled. - * @member {boolean|null|undefined} enabled - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.enabled = null; - - /** - * BackupPolicy assignedVolumeCount. - * @member {number|null|undefined} assignedVolumeCount - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.assignedVolumeCount = null; - - /** - * BackupPolicy createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.createTime = null; - - /** - * BackupPolicy labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.labels = $util.emptyObject; - - /** - * BackupPolicy state. - * @member {google.cloud.netapp.v1.BackupPolicy.State} state - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - */ - BackupPolicy.prototype.state = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_dailyBackupLimit", { - get: $util.oneOfGetter($oneOfFields = ["dailyBackupLimit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_weeklyBackupLimit", { - get: $util.oneOfGetter($oneOfFields = ["weeklyBackupLimit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_monthlyBackupLimit", { - get: $util.oneOfGetter($oneOfFields = ["monthlyBackupLimit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_enabled", { - get: $util.oneOfGetter($oneOfFields = ["enabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupPolicy.prototype, "_assignedVolumeCount", { - get: $util.oneOfGetter($oneOfFields = ["assignedVolumeCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {google.cloud.netapp.v1.IBackupPolicy=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy instance - */ - BackupPolicy.create = function create(properties) { - return new BackupPolicy(properties); - }; - - /** - * Encodes the specified BackupPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {google.cloud.netapp.v1.IBackupPolicy} message BackupPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.dailyBackupLimit != null && Object.hasOwnProperty.call(message, "dailyBackupLimit")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dailyBackupLimit); - if (message.weeklyBackupLimit != null && Object.hasOwnProperty.call(message, "weeklyBackupLimit")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.weeklyBackupLimit); - if (message.monthlyBackupLimit != null && Object.hasOwnProperty.call(message, "monthlyBackupLimit")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.monthlyBackupLimit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enabled); - if (message.assignedVolumeCount != null && Object.hasOwnProperty.call(message, "assignedVolumeCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.assignedVolumeCount); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - return writer; - }; - - /** - * Encodes the specified BackupPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {google.cloud.netapp.v1.IBackupPolicy} message BackupPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupPolicy(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.dailyBackupLimit = reader.int32(); - break; - } - case 3: { - message.weeklyBackupLimit = reader.int32(); - break; - } - case 4: { - message.monthlyBackupLimit = reader.int32(); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.enabled = reader.bool(); - break; - } - case 7: { - message.assignedVolumeCount = reader.int32(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 10: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPolicy message. - * @function verify - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.dailyBackupLimit != null && message.hasOwnProperty("dailyBackupLimit")) { - properties._dailyBackupLimit = 1; - if (!$util.isInteger(message.dailyBackupLimit)) - return "dailyBackupLimit: integer expected"; - } - if (message.weeklyBackupLimit != null && message.hasOwnProperty("weeklyBackupLimit")) { - properties._weeklyBackupLimit = 1; - if (!$util.isInteger(message.weeklyBackupLimit)) - return "weeklyBackupLimit: integer expected"; - } - if (message.monthlyBackupLimit != null && message.hasOwnProperty("monthlyBackupLimit")) { - properties._monthlyBackupLimit = 1; - if (!$util.isInteger(message.monthlyBackupLimit)) - return "monthlyBackupLimit: integer expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) { - properties._enabled = 1; - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - } - if (message.assignedVolumeCount != null && message.hasOwnProperty("assignedVolumeCount")) { - properties._assignedVolumeCount = 1; - if (!$util.isInteger(message.assignedVolumeCount)) - return "assignedVolumeCount: integer expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.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; - } - return null; - }; - - /** - * Creates a BackupPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.BackupPolicy} BackupPolicy - */ - BackupPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.BackupPolicy) - return object; - var message = new $root.google.cloud.netapp.v1.BackupPolicy(); - if (object.name != null) - message.name = String(object.name); - if (object.dailyBackupLimit != null) - message.dailyBackupLimit = object.dailyBackupLimit | 0; - if (object.weeklyBackupLimit != null) - message.weeklyBackupLimit = object.weeklyBackupLimit | 0; - if (object.monthlyBackupLimit != null) - message.monthlyBackupLimit = object.monthlyBackupLimit | 0; - if (object.description != null) - message.description = String(object.description); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.assignedVolumeCount != null) - message.assignedVolumeCount = object.assignedVolumeCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.BackupPolicy.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.BackupPolicy.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - 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 "READY": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "UPDATING": - case 5: - message.state = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from a BackupPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {google.cloud.netapp.v1.BackupPolicy} message BackupPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.dailyBackupLimit != null && message.hasOwnProperty("dailyBackupLimit")) { - object.dailyBackupLimit = message.dailyBackupLimit; - if (options.oneofs) - object._dailyBackupLimit = "dailyBackupLimit"; - } - if (message.weeklyBackupLimit != null && message.hasOwnProperty("weeklyBackupLimit")) { - object.weeklyBackupLimit = message.weeklyBackupLimit; - if (options.oneofs) - object._weeklyBackupLimit = "weeklyBackupLimit"; - } - if (message.monthlyBackupLimit != null && message.hasOwnProperty("monthlyBackupLimit")) { - object.monthlyBackupLimit = message.monthlyBackupLimit; - if (options.oneofs) - object._monthlyBackupLimit = "monthlyBackupLimit"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) { - object.enabled = message.enabled; - if (options.oneofs) - object._enabled = "enabled"; - } - if (message.assignedVolumeCount != null && message.hasOwnProperty("assignedVolumeCount")) { - object.assignedVolumeCount = message.assignedVolumeCount; - if (options.oneofs) - object._assignedVolumeCount = "assignedVolumeCount"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.BackupPolicy.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.BackupPolicy.State[message.state] : message.state; - return object; - }; - - /** - * Converts this BackupPolicy to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.BackupPolicy - * @instance - * @returns {Object.} JSON object - */ - BackupPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPolicy - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.BackupPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.BackupPolicy"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.BackupPolicy.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - * @property {number} UPDATING=5 UPDATING value - */ - BackupPolicy.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "UPDATING"] = 5; - return values; - })(); - - return BackupPolicy; - })(); - - v1.CreateBackupPolicyRequest = (function() { - - /** - * Properties of a CreateBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateBackupPolicyRequest - * @property {string|null} [parent] CreateBackupPolicyRequest parent - * @property {google.cloud.netapp.v1.IBackupPolicy|null} [backupPolicy] CreateBackupPolicyRequest backupPolicy - * @property {string|null} [backupPolicyId] CreateBackupPolicyRequest backupPolicyId - */ - - /** - * Constructs a new CreateBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateBackupPolicyRequest. - * @implements ICreateBackupPolicyRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest=} [properties] Properties to set - */ - function CreateBackupPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPolicyRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @instance - */ - CreateBackupPolicyRequest.prototype.parent = ""; - - /** - * CreateBackupPolicyRequest backupPolicy. - * @member {google.cloud.netapp.v1.IBackupPolicy|null|undefined} backupPolicy - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @instance - */ - CreateBackupPolicyRequest.prototype.backupPolicy = null; - - /** - * CreateBackupPolicyRequest backupPolicyId. - * @member {string} backupPolicyId - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @instance - */ - CreateBackupPolicyRequest.prototype.backupPolicyId = ""; - - /** - * Creates a new CreateBackupPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest instance - */ - CreateBackupPolicyRequest.create = function create(properties) { - return new CreateBackupPolicyRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} message CreateBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupPolicy != null && Object.hasOwnProperty.call(message, "backupPolicy")) - $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.backupPolicyId != null && Object.hasOwnProperty.call(message, "backupPolicyId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPolicyId); - return writer; - }; - - /** - * Encodes the specified CreateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} message CreateBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.backupPolicyId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPolicyRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) { - var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicy); - if (error) - return "backupPolicy." + error; - } - if (message.backupPolicyId != null && message.hasOwnProperty("backupPolicyId")) - if (!$util.isString(message.backupPolicyId)) - return "backupPolicyId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateBackupPolicyRequest} CreateBackupPolicyRequest - */ - CreateBackupPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateBackupPolicyRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateBackupPolicyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPolicy != null) { - if (typeof object.backupPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateBackupPolicyRequest.backupPolicy: object expected"); - message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicy); - } - if (object.backupPolicyId != null) - message.backupPolicyId = String(object.backupPolicyId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.CreateBackupPolicyRequest} message CreateBackupPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPolicy = null; - object.backupPolicyId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) - object.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicy, options); - if (message.backupPolicyId != null && message.hasOwnProperty("backupPolicyId")) - object.backupPolicyId = message.backupPolicyId; - return object; - }; - - /** - * Converts this CreateBackupPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateBackupPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupPolicyRequest"; - }; - - return CreateBackupPolicyRequest; - })(); - - v1.GetBackupPolicyRequest = (function() { - - /** - * Properties of a GetBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetBackupPolicyRequest - * @property {string|null} [name] GetBackupPolicyRequest name - */ - - /** - * Constructs a new GetBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetBackupPolicyRequest. - * @implements IGetBackupPolicyRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest=} [properties] Properties to set - */ - function GetBackupPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPolicyRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @instance - */ - GetBackupPolicyRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest instance - */ - GetBackupPolicyRequest.create = function create(properties) { - return new GetBackupPolicyRequest(properties); - }; - - /** - * Encodes the specified GetBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} message GetBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} message GetBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPolicyRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetBackupPolicyRequest} GetBackupPolicyRequest - */ - GetBackupPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetBackupPolicyRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetBackupPolicyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.GetBackupPolicyRequest} message GetBackupPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetBackupPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetBackupPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupPolicyRequest"; - }; - - return GetBackupPolicyRequest; - })(); - - v1.ListBackupPoliciesRequest = (function() { - - /** - * Properties of a ListBackupPoliciesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupPoliciesRequest - * @property {string|null} [parent] ListBackupPoliciesRequest parent - * @property {number|null} [pageSize] ListBackupPoliciesRequest pageSize - * @property {string|null} [pageToken] ListBackupPoliciesRequest pageToken - * @property {string|null} [filter] ListBackupPoliciesRequest filter - * @property {string|null} [orderBy] ListBackupPoliciesRequest orderBy - */ - - /** - * Constructs a new ListBackupPoliciesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupPoliciesRequest. - * @implements IListBackupPoliciesRequest - * @constructor - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest=} [properties] Properties to set - */ - function ListBackupPoliciesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPoliciesRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - */ - ListBackupPoliciesRequest.prototype.parent = ""; - - /** - * ListBackupPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - */ - ListBackupPoliciesRequest.prototype.pageSize = 0; - - /** - * ListBackupPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - */ - ListBackupPoliciesRequest.prototype.pageToken = ""; - - /** - * ListBackupPoliciesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - */ - ListBackupPoliciesRequest.prototype.filter = ""; - - /** - * ListBackupPoliciesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - */ - ListBackupPoliciesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListBackupPoliciesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest instance - */ - ListBackupPoliciesRequest.create = function create(properties) { - return new ListBackupPoliciesRequest(properties); - }; - - /** - * Encodes the specified ListBackupPoliciesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} message ListBackupPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPoliciesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListBackupPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} message ListBackupPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPoliciesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupPoliciesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupPoliciesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPoliciesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPoliciesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListBackupPoliciesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupPoliciesRequest} ListBackupPoliciesRequest - */ - ListBackupPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupPoliciesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListBackupPoliciesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListBackupPoliciesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {google.cloud.netapp.v1.ListBackupPoliciesRequest} message ListBackupPoliciesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPoliciesRequest.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; - }; - - /** - * Converts this ListBackupPoliciesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPoliciesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPoliciesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupPoliciesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupPoliciesRequest"; - }; - - return ListBackupPoliciesRequest; - })(); - - v1.ListBackupPoliciesResponse = (function() { - - /** - * Properties of a ListBackupPoliciesResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupPoliciesResponse - * @property {Array.|null} [backupPolicies] ListBackupPoliciesResponse backupPolicies - * @property {string|null} [nextPageToken] ListBackupPoliciesResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPoliciesResponse unreachable - */ - - /** - * Constructs a new ListBackupPoliciesResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupPoliciesResponse. - * @implements IListBackupPoliciesResponse - * @constructor - * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse=} [properties] Properties to set - */ - function ListBackupPoliciesResponse(properties) { - this.backupPolicies = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPoliciesResponse backupPolicies. - * @member {Array.} backupPolicies - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @instance - */ - ListBackupPoliciesResponse.prototype.backupPolicies = $util.emptyArray; - - /** - * ListBackupPoliciesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @instance - */ - ListBackupPoliciesResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPoliciesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @instance - */ - ListBackupPoliciesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPoliciesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse instance - */ - ListBackupPoliciesResponse.create = function create(properties) { - return new ListBackupPoliciesResponse(properties); - }; - - /** - * Encodes the specified ListBackupPoliciesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse} message ListBackupPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPoliciesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPolicies != null && message.backupPolicies.length) - for (var i = 0; i < message.backupPolicies.length; ++i) - $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListBackupPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupPoliciesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupPoliciesResponse} message ListBackupPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPoliciesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupPoliciesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.backupPolicies && message.backupPolicies.length)) - message.backupPolicies = []; - message.backupPolicies.push($root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupPoliciesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPoliciesResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPoliciesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPolicies != null && message.hasOwnProperty("backupPolicies")) { - if (!Array.isArray(message.backupPolicies)) - return "backupPolicies: array expected"; - for (var i = 0; i < message.backupPolicies.length; ++i) { - var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicies[i]); - if (error) - return "backupPolicies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListBackupPoliciesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupPoliciesResponse} ListBackupPoliciesResponse - */ - ListBackupPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupPoliciesResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListBackupPoliciesResponse(); - if (object.backupPolicies) { - if (!Array.isArray(object.backupPolicies)) - throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.backupPolicies: array expected"); - message.backupPolicies = []; - for (var i = 0; i < object.backupPolicies.length; ++i) { - if (typeof object.backupPolicies[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.backupPolicies: object expected"); - message.backupPolicies[i] = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicies[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListBackupPoliciesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListBackupPoliciesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {google.cloud.netapp.v1.ListBackupPoliciesResponse} message ListBackupPoliciesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPoliciesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPolicies = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPolicies && message.backupPolicies.length) { - object.backupPolicies = []; - for (var j = 0; j < message.backupPolicies.length; ++j) - object.backupPolicies[j] = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicies[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListBackupPoliciesResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPoliciesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPoliciesResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupPoliciesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupPoliciesResponse"; - }; - - return ListBackupPoliciesResponse; - })(); - - v1.UpdateBackupPolicyRequest = (function() { - - /** - * Properties of an UpdateBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateBackupPolicyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupPolicyRequest updateMask - * @property {google.cloud.netapp.v1.IBackupPolicy|null} [backupPolicy] UpdateBackupPolicyRequest backupPolicy - */ - - /** - * Constructs a new UpdateBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateBackupPolicyRequest. - * @implements IUpdateBackupPolicyRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest=} [properties] Properties to set - */ - function UpdateBackupPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @instance - */ - UpdateBackupPolicyRequest.prototype.updateMask = null; - - /** - * UpdateBackupPolicyRequest backupPolicy. - * @member {google.cloud.netapp.v1.IBackupPolicy|null|undefined} backupPolicy - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @instance - */ - UpdateBackupPolicyRequest.prototype.backupPolicy = null; - - /** - * Creates a new UpdateBackupPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest instance - */ - UpdateBackupPolicyRequest.create = function create(properties) { - return new UpdateBackupPolicyRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} message UpdateBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupPolicy != null && Object.hasOwnProperty.call(message, "backupPolicy")) - $root.google.cloud.netapp.v1.BackupPolicy.encode(message.backupPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} message UpdateBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupPolicyRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) { - var error = $root.google.cloud.netapp.v1.BackupPolicy.verify(message.backupPolicy); - if (error) - return "backupPolicy." + error; - } - return null; - }; - - /** - * Creates an UpdateBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateBackupPolicyRequest} UpdateBackupPolicyRequest - */ - UpdateBackupPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupPolicy != null) { - if (typeof object.backupPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupPolicyRequest.backupPolicy: object expected"); - message.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.fromObject(object.backupPolicy); - } - return message; - }; - - /** - * Creates a plain object from an UpdateBackupPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.UpdateBackupPolicyRequest} message UpdateBackupPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupPolicy = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backupPolicy != null && message.hasOwnProperty("backupPolicy")) - object.backupPolicy = $root.google.cloud.netapp.v1.BackupPolicy.toObject(message.backupPolicy, options); - return object; - }; - - /** - * Converts this UpdateBackupPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateBackupPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupPolicyRequest"; - }; - - return UpdateBackupPolicyRequest; - })(); - - v1.DeleteBackupPolicyRequest = (function() { - - /** - * Properties of a DeleteBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteBackupPolicyRequest - * @property {string|null} [name] DeleteBackupPolicyRequest name - */ - - /** - * Constructs a new DeleteBackupPolicyRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteBackupPolicyRequest. - * @implements IDeleteBackupPolicyRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest=} [properties] Properties to set - */ - function DeleteBackupPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPolicyRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @instance - */ - DeleteBackupPolicyRequest.prototype.name = ""; - - /** - * Creates a new DeleteBackupPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest instance - */ - DeleteBackupPolicyRequest.create = function create(properties) { - return new DeleteBackupPolicyRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPolicyRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} message DeleteBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteBackupPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} message DeleteBackupPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPolicyRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteBackupPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteBackupPolicyRequest} DeleteBackupPolicyRequest - */ - DeleteBackupPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {google.cloud.netapp.v1.DeleteBackupPolicyRequest} message DeleteBackupPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteBackupPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteBackupPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupPolicyRequest"; - }; - - return DeleteBackupPolicyRequest; - })(); - - v1.BackupVault = (function() { - - /** - * Properties of a BackupVault. - * @memberof google.cloud.netapp.v1 - * @interface IBackupVault - * @property {string|null} [name] BackupVault name - * @property {google.cloud.netapp.v1.BackupVault.State|null} [state] BackupVault state - * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime - * @property {string|null} [description] BackupVault description - * @property {Object.|null} [labels] BackupVault labels - * @property {google.cloud.netapp.v1.BackupVault.BackupVaultType|null} [backupVaultType] BackupVault backupVaultType - * @property {string|null} [sourceRegion] BackupVault sourceRegion - * @property {string|null} [backupRegion] BackupVault backupRegion - * @property {string|null} [sourceBackupVault] BackupVault sourceBackupVault - * @property {string|null} [destinationBackupVault] BackupVault destinationBackupVault - * @property {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null} [backupRetentionPolicy] BackupVault backupRetentionPolicy - * @property {string|null} [kmsConfig] BackupVault kmsConfig - * @property {google.cloud.netapp.v1.BackupVault.EncryptionState|null} [encryptionState] BackupVault encryptionState - * @property {string|null} [backupsCryptoKeyVersion] BackupVault backupsCryptoKeyVersion - */ - - /** - * Constructs a new BackupVault. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a BackupVault. - * @implements IBackupVault - * @constructor - * @param {google.cloud.netapp.v1.IBackupVault=} [properties] Properties to set - */ - function BackupVault(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupVault name. - * @member {string} name - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.name = ""; - - /** - * BackupVault state. - * @member {google.cloud.netapp.v1.BackupVault.State} state - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.state = 0; - - /** - * BackupVault createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.createTime = null; - - /** - * BackupVault description. - * @member {string} description - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.description = ""; - - /** - * BackupVault labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.labels = $util.emptyObject; - - /** - * BackupVault backupVaultType. - * @member {google.cloud.netapp.v1.BackupVault.BackupVaultType} backupVaultType - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupVaultType = 0; - - /** - * BackupVault sourceRegion. - * @member {string} sourceRegion - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.sourceRegion = ""; - - /** - * BackupVault backupRegion. - * @member {string} backupRegion - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupRegion = ""; - - /** - * BackupVault sourceBackupVault. - * @member {string} sourceBackupVault - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.sourceBackupVault = ""; - - /** - * BackupVault destinationBackupVault. - * @member {string} destinationBackupVault - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.destinationBackupVault = ""; - - /** - * BackupVault backupRetentionPolicy. - * @member {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy|null|undefined} backupRetentionPolicy - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupRetentionPolicy = null; - - /** - * BackupVault kmsConfig. - * @member {string} kmsConfig - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.kmsConfig = ""; - - /** - * BackupVault encryptionState. - * @member {google.cloud.netapp.v1.BackupVault.EncryptionState} encryptionState - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.encryptionState = 0; - - /** - * BackupVault backupsCryptoKeyVersion. - * @member {string} backupsCryptoKeyVersion - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupsCryptoKeyVersion = ""; - - /** - * Creates a new BackupVault instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {google.cloud.netapp.v1.IBackupVault=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.BackupVault} BackupVault instance - */ - BackupVault.create = function create(properties) { - return new BackupVault(properties); - }; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {google.cloud.netapp.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.backupVaultType != null && Object.hasOwnProperty.call(message, "backupVaultType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.backupVaultType); - if (message.sourceRegion != null && Object.hasOwnProperty.call(message, "sourceRegion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceRegion); - if (message.backupRegion != null && Object.hasOwnProperty.call(message, "backupRegion")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.backupRegion); - if (message.sourceBackupVault != null && Object.hasOwnProperty.call(message, "sourceBackupVault")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceBackupVault); - if (message.destinationBackupVault != null && Object.hasOwnProperty.call(message, "destinationBackupVault")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationBackupVault); - if (message.backupRetentionPolicy != null && Object.hasOwnProperty.call(message, "backupRetentionPolicy")) - $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.encode(message.backupRetentionPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.kmsConfig); - if (message.encryptionState != null && Object.hasOwnProperty.call(message, "encryptionState")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.encryptionState); - if (message.backupsCryptoKeyVersion != null && Object.hasOwnProperty.call(message, "backupsCryptoKeyVersion")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupsCryptoKeyVersion); - return writer; - }; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {google.cloud.netapp.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupVault(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.backupVaultType = reader.int32(); - break; - } - case 7: { - message.sourceRegion = reader.string(); - break; - } - case 8: { - message.backupRegion = reader.string(); - break; - } - case 9: { - message.sourceBackupVault = reader.string(); - break; - } - case 10: { - message.destinationBackupVault = reader.string(); - break; - } - case 11: { - message.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.decode(reader, reader.uint32()); - break; - } - case 12: { - message.kmsConfig = reader.string(); - break; - } - case 13: { - message.encryptionState = reader.int32(); - break; - } - case 14: { - message.backupsCryptoKeyVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupVault message. - * @function verify - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupVault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.backupVaultType != null && message.hasOwnProperty("backupVaultType")) - switch (message.backupVaultType) { - default: - return "backupVaultType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) - if (!$util.isString(message.sourceRegion)) - return "sourceRegion: string expected"; - if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) - if (!$util.isString(message.backupRegion)) - return "backupRegion: string expected"; - if (message.sourceBackupVault != null && message.hasOwnProperty("sourceBackupVault")) - if (!$util.isString(message.sourceBackupVault)) - return "sourceBackupVault: string expected"; - if (message.destinationBackupVault != null && message.hasOwnProperty("destinationBackupVault")) - if (!$util.isString(message.destinationBackupVault)) - return "destinationBackupVault: string expected"; - if (message.backupRetentionPolicy != null && message.hasOwnProperty("backupRetentionPolicy")) { - var error = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify(message.backupRetentionPolicy); - if (error) - return "backupRetentionPolicy." + error; - } - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - if (!$util.isString(message.kmsConfig)) - return "kmsConfig: string expected"; - if (message.encryptionState != null && message.hasOwnProperty("encryptionState")) - switch (message.encryptionState) { - default: - return "encryptionState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.backupsCryptoKeyVersion != null && message.hasOwnProperty("backupsCryptoKeyVersion")) - if (!$util.isString(message.backupsCryptoKeyVersion)) - return "backupsCryptoKeyVersion: string expected"; - return null; - }; - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.BackupVault} BackupVault - */ - BackupVault.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.BackupVault) - return object; - var message = new $root.google.cloud.netapp.v1.BackupVault(); - 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 "READY": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "UPDATING": - case 5: - message.state = 5; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.BackupVault.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.BackupVault.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.backupVaultType) { - default: - if (typeof object.backupVaultType === "number") { - message.backupVaultType = object.backupVaultType; - break; - } - break; - case "BACKUP_VAULT_TYPE_UNSPECIFIED": - case 0: - message.backupVaultType = 0; - break; - case "IN_REGION": - case 1: - message.backupVaultType = 1; - break; - case "CROSS_REGION": - case 2: - message.backupVaultType = 2; - break; - } - if (object.sourceRegion != null) - message.sourceRegion = String(object.sourceRegion); - if (object.backupRegion != null) - message.backupRegion = String(object.backupRegion); - if (object.sourceBackupVault != null) - message.sourceBackupVault = String(object.sourceBackupVault); - if (object.destinationBackupVault != null) - message.destinationBackupVault = String(object.destinationBackupVault); - if (object.backupRetentionPolicy != null) { - if (typeof object.backupRetentionPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.BackupVault.backupRetentionPolicy: object expected"); - message.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.fromObject(object.backupRetentionPolicy); - } - if (object.kmsConfig != null) - message.kmsConfig = String(object.kmsConfig); - switch (object.encryptionState) { - default: - if (typeof object.encryptionState === "number") { - message.encryptionState = object.encryptionState; - break; - } - break; - case "ENCRYPTION_STATE_UNSPECIFIED": - case 0: - message.encryptionState = 0; - break; - case "ENCRYPTION_STATE_PENDING": - case 1: - message.encryptionState = 1; - break; - case "ENCRYPTION_STATE_COMPLETED": - case 2: - message.encryptionState = 2; - break; - case "ENCRYPTION_STATE_IN_PROGRESS": - case 3: - message.encryptionState = 3; - break; - case "ENCRYPTION_STATE_FAILED": - case 4: - message.encryptionState = 4; - break; - } - if (object.backupsCryptoKeyVersion != null) - message.backupsCryptoKeyVersion = String(object.backupsCryptoKeyVersion); - return message; - }; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {google.cloud.netapp.v1.BackupVault} message BackupVault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupVault.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.createTime = null; - object.description = ""; - object.backupVaultType = options.enums === String ? "BACKUP_VAULT_TYPE_UNSPECIFIED" : 0; - object.sourceRegion = ""; - object.backupRegion = ""; - object.sourceBackupVault = ""; - object.destinationBackupVault = ""; - object.backupRetentionPolicy = null; - object.kmsConfig = ""; - object.encryptionState = options.enums === String ? "ENCRYPTION_STATE_UNSPECIFIED" : 0; - object.backupsCryptoKeyVersion = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.BackupVault.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.backupVaultType != null && message.hasOwnProperty("backupVaultType")) - object.backupVaultType = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.BackupVaultType[message.backupVaultType] === undefined ? message.backupVaultType : $root.google.cloud.netapp.v1.BackupVault.BackupVaultType[message.backupVaultType] : message.backupVaultType; - if (message.sourceRegion != null && message.hasOwnProperty("sourceRegion")) - object.sourceRegion = message.sourceRegion; - if (message.backupRegion != null && message.hasOwnProperty("backupRegion")) - object.backupRegion = message.backupRegion; - if (message.sourceBackupVault != null && message.hasOwnProperty("sourceBackupVault")) - object.sourceBackupVault = message.sourceBackupVault; - if (message.destinationBackupVault != null && message.hasOwnProperty("destinationBackupVault")) - object.destinationBackupVault = message.destinationBackupVault; - if (message.backupRetentionPolicy != null && message.hasOwnProperty("backupRetentionPolicy")) - object.backupRetentionPolicy = $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.toObject(message.backupRetentionPolicy, options); - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - object.kmsConfig = message.kmsConfig; - if (message.encryptionState != null && message.hasOwnProperty("encryptionState")) - object.encryptionState = options.enums === String ? $root.google.cloud.netapp.v1.BackupVault.EncryptionState[message.encryptionState] === undefined ? message.encryptionState : $root.google.cloud.netapp.v1.BackupVault.EncryptionState[message.encryptionState] : message.encryptionState; - if (message.backupsCryptoKeyVersion != null && message.hasOwnProperty("backupsCryptoKeyVersion")) - object.backupsCryptoKeyVersion = message.backupsCryptoKeyVersion; - return object; - }; - - /** - * Converts this BackupVault to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.BackupVault - * @instance - * @returns {Object.} JSON object - */ - BackupVault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupVault - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.BackupVault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.BackupVault"; - }; - - BackupVault.BackupRetentionPolicy = (function() { - - /** - * Properties of a BackupRetentionPolicy. - * @memberof google.cloud.netapp.v1.BackupVault - * @interface IBackupRetentionPolicy - * @property {number|null} [backupMinimumEnforcedRetentionDays] BackupRetentionPolicy backupMinimumEnforcedRetentionDays - * @property {boolean|null} [dailyBackupImmutable] BackupRetentionPolicy dailyBackupImmutable - * @property {boolean|null} [weeklyBackupImmutable] BackupRetentionPolicy weeklyBackupImmutable - * @property {boolean|null} [monthlyBackupImmutable] BackupRetentionPolicy monthlyBackupImmutable - * @property {boolean|null} [manualBackupImmutable] BackupRetentionPolicy manualBackupImmutable - */ - - /** - * Constructs a new BackupRetentionPolicy. - * @memberof google.cloud.netapp.v1.BackupVault - * @classdesc Represents a BackupRetentionPolicy. - * @implements IBackupRetentionPolicy - * @constructor - * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy=} [properties] Properties to set - */ - function BackupRetentionPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupRetentionPolicy backupMinimumEnforcedRetentionDays. - * @member {number} backupMinimumEnforcedRetentionDays - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - */ - BackupRetentionPolicy.prototype.backupMinimumEnforcedRetentionDays = 0; - - /** - * BackupRetentionPolicy dailyBackupImmutable. - * @member {boolean} dailyBackupImmutable - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - */ - BackupRetentionPolicy.prototype.dailyBackupImmutable = false; - - /** - * BackupRetentionPolicy weeklyBackupImmutable. - * @member {boolean} weeklyBackupImmutable - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - */ - BackupRetentionPolicy.prototype.weeklyBackupImmutable = false; - - /** - * BackupRetentionPolicy monthlyBackupImmutable. - * @member {boolean} monthlyBackupImmutable - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - */ - BackupRetentionPolicy.prototype.monthlyBackupImmutable = false; - - /** - * BackupRetentionPolicy manualBackupImmutable. - * @member {boolean} manualBackupImmutable - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - */ - BackupRetentionPolicy.prototype.manualBackupImmutable = false; - - /** - * Creates a new BackupRetentionPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy instance - */ - BackupRetentionPolicy.create = function create(properties) { - return new BackupRetentionPolicy(properties); - }; - - /** - * Encodes the specified BackupRetentionPolicy message. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy} message BackupRetentionPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRetentionPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupMinimumEnforcedRetentionDays != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDays")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.backupMinimumEnforcedRetentionDays); - if (message.dailyBackupImmutable != null && Object.hasOwnProperty.call(message, "dailyBackupImmutable")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dailyBackupImmutable); - if (message.weeklyBackupImmutable != null && Object.hasOwnProperty.call(message, "weeklyBackupImmutable")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.weeklyBackupImmutable); - if (message.monthlyBackupImmutable != null && Object.hasOwnProperty.call(message, "monthlyBackupImmutable")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.monthlyBackupImmutable); - if (message.manualBackupImmutable != null && Object.hasOwnProperty.call(message, "manualBackupImmutable")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.manualBackupImmutable); - return writer; - }; - - /** - * Encodes the specified BackupRetentionPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {google.cloud.netapp.v1.BackupVault.IBackupRetentionPolicy} message BackupRetentionPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRetentionPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupRetentionPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRetentionPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.backupMinimumEnforcedRetentionDays = reader.int32(); - break; - } - case 2: { - message.dailyBackupImmutable = reader.bool(); - break; - } - case 3: { - message.weeklyBackupImmutable = reader.bool(); - break; - } - case 4: { - message.monthlyBackupImmutable = reader.bool(); - break; - } - case 5: { - message.manualBackupImmutable = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupRetentionPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRetentionPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupRetentionPolicy message. - * @function verify - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupRetentionPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupMinimumEnforcedRetentionDays != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDays")) - if (!$util.isInteger(message.backupMinimumEnforcedRetentionDays)) - return "backupMinimumEnforcedRetentionDays: integer expected"; - if (message.dailyBackupImmutable != null && message.hasOwnProperty("dailyBackupImmutable")) - if (typeof message.dailyBackupImmutable !== "boolean") - return "dailyBackupImmutable: boolean expected"; - if (message.weeklyBackupImmutable != null && message.hasOwnProperty("weeklyBackupImmutable")) - if (typeof message.weeklyBackupImmutable !== "boolean") - return "weeklyBackupImmutable: boolean expected"; - if (message.monthlyBackupImmutable != null && message.hasOwnProperty("monthlyBackupImmutable")) - if (typeof message.monthlyBackupImmutable !== "boolean") - return "monthlyBackupImmutable: boolean expected"; - if (message.manualBackupImmutable != null && message.hasOwnProperty("manualBackupImmutable")) - if (typeof message.manualBackupImmutable !== "boolean") - return "manualBackupImmutable: boolean expected"; - return null; - }; - - /** - * Creates a BackupRetentionPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} BackupRetentionPolicy - */ - BackupRetentionPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy) - return object; - var message = new $root.google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy(); - if (object.backupMinimumEnforcedRetentionDays != null) - message.backupMinimumEnforcedRetentionDays = object.backupMinimumEnforcedRetentionDays | 0; - if (object.dailyBackupImmutable != null) - message.dailyBackupImmutable = Boolean(object.dailyBackupImmutable); - if (object.weeklyBackupImmutable != null) - message.weeklyBackupImmutable = Boolean(object.weeklyBackupImmutable); - if (object.monthlyBackupImmutable != null) - message.monthlyBackupImmutable = Boolean(object.monthlyBackupImmutable); - if (object.manualBackupImmutable != null) - message.manualBackupImmutable = Boolean(object.manualBackupImmutable); - return message; - }; - - /** - * Creates a plain object from a BackupRetentionPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy} message BackupRetentionPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupRetentionPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupMinimumEnforcedRetentionDays = 0; - object.dailyBackupImmutable = false; - object.weeklyBackupImmutable = false; - object.monthlyBackupImmutable = false; - object.manualBackupImmutable = false; - } - if (message.backupMinimumEnforcedRetentionDays != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDays")) - object.backupMinimumEnforcedRetentionDays = message.backupMinimumEnforcedRetentionDays; - if (message.dailyBackupImmutable != null && message.hasOwnProperty("dailyBackupImmutable")) - object.dailyBackupImmutable = message.dailyBackupImmutable; - if (message.weeklyBackupImmutable != null && message.hasOwnProperty("weeklyBackupImmutable")) - object.weeklyBackupImmutable = message.weeklyBackupImmutable; - if (message.monthlyBackupImmutable != null && message.hasOwnProperty("monthlyBackupImmutable")) - object.monthlyBackupImmutable = message.monthlyBackupImmutable; - if (message.manualBackupImmutable != null && message.hasOwnProperty("manualBackupImmutable")) - object.manualBackupImmutable = message.manualBackupImmutable; - return object; - }; - - /** - * Converts this BackupRetentionPolicy to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @instance - * @returns {Object.} JSON object - */ - BackupRetentionPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupRetentionPolicy - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupRetentionPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.BackupVault.BackupRetentionPolicy"; - }; - - return BackupRetentionPolicy; - })(); - - /** - * State enum. - * @name google.cloud.netapp.v1.BackupVault.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - * @property {number} UPDATING=5 UPDATING value - */ - BackupVault.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "UPDATING"] = 5; - return values; - })(); - - /** - * BackupVaultType enum. - * @name google.cloud.netapp.v1.BackupVault.BackupVaultType - * @enum {number} - * @property {number} BACKUP_VAULT_TYPE_UNSPECIFIED=0 BACKUP_VAULT_TYPE_UNSPECIFIED value - * @property {number} IN_REGION=1 IN_REGION value - * @property {number} CROSS_REGION=2 CROSS_REGION value - */ - BackupVault.BackupVaultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_REGION"] = 1; - values[valuesById[2] = "CROSS_REGION"] = 2; - return values; - })(); - - /** - * EncryptionState enum. - * @name google.cloud.netapp.v1.BackupVault.EncryptionState - * @enum {number} - * @property {number} ENCRYPTION_STATE_UNSPECIFIED=0 ENCRYPTION_STATE_UNSPECIFIED value - * @property {number} ENCRYPTION_STATE_PENDING=1 ENCRYPTION_STATE_PENDING value - * @property {number} ENCRYPTION_STATE_COMPLETED=2 ENCRYPTION_STATE_COMPLETED value - * @property {number} ENCRYPTION_STATE_IN_PROGRESS=3 ENCRYPTION_STATE_IN_PROGRESS value - * @property {number} ENCRYPTION_STATE_FAILED=4 ENCRYPTION_STATE_FAILED value - */ - BackupVault.EncryptionState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCRYPTION_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENCRYPTION_STATE_PENDING"] = 1; - values[valuesById[2] = "ENCRYPTION_STATE_COMPLETED"] = 2; - values[valuesById[3] = "ENCRYPTION_STATE_IN_PROGRESS"] = 3; - values[valuesById[4] = "ENCRYPTION_STATE_FAILED"] = 4; - return values; - })(); - - return BackupVault; - })(); - - v1.GetBackupVaultRequest = (function() { - - /** - * Properties of a GetBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetBackupVaultRequest - * @property {string|null} [name] GetBackupVaultRequest name - */ - - /** - * Constructs a new GetBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetBackupVaultRequest. - * @implements IGetBackupVaultRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest=} [properties] Properties to set - */ - function GetBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.name = ""; - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest instance - */ - GetBackupVaultRequest.create = function create(properties) { - return new GetBackupVaultRequest(properties); - }; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupVaultRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupVaultRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetBackupVaultRequest} GetBackupVaultRequest - */ - GetBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetBackupVaultRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.GetBackupVaultRequest} message GetBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetBackupVaultRequest"; - }; - - return GetBackupVaultRequest; - })(); - - v1.ListBackupVaultsRequest = (function() { - - /** - * Properties of a ListBackupVaultsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupVaultsRequest - * @property {string|null} [parent] ListBackupVaultsRequest parent - * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize - * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken - * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy - * @property {string|null} [filter] ListBackupVaultsRequest filter - */ - - /** - * Constructs a new ListBackupVaultsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupVaultsRequest. - * @implements IListBackupVaultsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest=} [properties] Properties to set - */ - function ListBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.parent = ""; - - /** - * ListBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageSize = 0; - - /** - * ListBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageToken = ""; - - /** - * ListBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.orderBy = ""; - - /** - * ListBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.filter = ""; - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance - */ - ListBackupVaultsRequest.create = function create(properties) { - return new ListBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupVaultsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - */ - ListBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupVaultsRequest) - return object; - var message = new $root.google.cloud.netapp.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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.netapp.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupVaultsRequest"; - }; - - return ListBackupVaultsRequest; - })(); - - v1.ListBackupVaultsResponse = (function() { - - /** - * Properties of a ListBackupVaultsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListBackupVaultsResponse - * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable - */ - - /** - * Constructs a new ListBackupVaultsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListBackupVaultsResponse. - * @implements IListBackupVaultsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListBackupVaultsResponse=} [properties] Properties to set - */ - function ListBackupVaultsResponse(properties) { - this.backupVaults = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * ListBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance - */ - ListBackupVaultsResponse.create = function create(properties) { - return new ListBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.netapp.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - */ - ListBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListBackupVaultsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListBackupVaultsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.netapp.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.netapp.v1.BackupVault.toObject(message.backupVaults[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListBackupVaultsResponse"; - }; - - return ListBackupVaultsResponse; - })(); - - v1.CreateBackupVaultRequest = (function() { - - /** - * Properties of a CreateBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateBackupVaultRequest - * @property {string|null} [parent] CreateBackupVaultRequest parent - * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId - * @property {google.cloud.netapp.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault - */ - - /** - * Constructs a new CreateBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateBackupVaultRequest. - * @implements ICreateBackupVaultRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest=} [properties] Properties to set - */ - function CreateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupVaultRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.parent = ""; - - /** - * CreateBackupVaultRequest backupVaultId. - * @member {string} backupVaultId - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVaultId = ""; - - /** - * CreateBackupVaultRequest backupVault. - * @member {google.cloud.netapp.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVault = null; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance - */ - CreateBackupVaultRequest.create = function create(properties) { - return new CreateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupVaultId = reader.string(); - break; - } - case 3: { - message.backupVault = $root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupVaultRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - if (!$util.isString(message.backupVaultId)) - return "backupVaultId: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + error; - } - return null; - }; - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - */ - CreateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateBackupVaultRequest) - return object; - var message = new $root.google.cloud.netapp.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.netapp.v1.CreateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVault); - } - return message; - }; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupVaultId = ""; - object.backupVault = null; - } - 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.netapp.v1.BackupVault.toObject(message.backupVault, options); - return object; - }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateBackupVaultRequest"; - }; - - return CreateBackupVaultRequest; - })(); - - v1.DeleteBackupVaultRequest = (function() { - - /** - * Properties of a DeleteBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteBackupVaultRequest - * @property {string|null} [name] DeleteBackupVaultRequest name - */ - - /** - * Constructs a new DeleteBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteBackupVaultRequest. - * @implements IDeleteBackupVaultRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - */ - function DeleteBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.name = ""; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance - */ - DeleteBackupVaultRequest.create = function create(properties) { - return new DeleteBackupVaultRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupVaultRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - */ - DeleteBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteBackupVaultRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteBackupVaultRequest"; - }; - - return DeleteBackupVaultRequest; - })(); - - v1.UpdateBackupVaultRequest = (function() { - - /** - * Properties of an UpdateBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateBackupVaultRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask - * @property {google.cloud.netapp.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault - */ - - /** - * Constructs a new UpdateBackupVaultRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateBackupVaultRequest. - * @implements IUpdateBackupVaultRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - */ - function UpdateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupVaultRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.updateMask = null; - - /** - * UpdateBackupVaultRequest backupVault. - * @member {google.cloud.netapp.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.backupVault = null; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance - */ - UpdateBackupVaultRequest.create = function create(properties) { - return new UpdateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.netapp.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.backupVault = $root.google.cloud.netapp.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupVaultRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.netapp.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + error; - } - return null; - }; - - /** - * Creates an UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - */ - UpdateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateBackupVaultRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateBackupVaultRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupVaultRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.netapp.v1.BackupVault.fromObject(object.backupVault); - } - return message; - }; - - /** - * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.netapp.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupVault = null; - } - 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.netapp.v1.BackupVault.toObject(message.backupVault, options); - return object; - }; - - /** - * Converts this UpdateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateBackupVaultRequest"; - }; - - return UpdateBackupVaultRequest; - })(); - - v1.NetApp = (function() { - - /** - * Constructs a new NetApp service. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a NetApp - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function NetApp(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (NetApp.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetApp; - - /** - * Creates new NetApp service using the specified rpc implementation. - * @function create - * @memberof google.cloud.netapp.v1.NetApp - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {NetApp} RPC service. Useful where requests and/or responses are streamed. - */ - NetApp.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listStoragePools}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListStoragePoolsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} [response] ListStoragePoolsResponse - */ - - /** - * Calls ListStoragePools. - * @function listStoragePools - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListStoragePoolsCallback} callback Node-style callback called with the error, if any, and ListStoragePoolsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listStoragePools = function listStoragePools(request, callback) { - return this.rpcCall(listStoragePools, $root.google.cloud.netapp.v1.ListStoragePoolsRequest, $root.google.cloud.netapp.v1.ListStoragePoolsResponse, request, callback); - }, "name", { value: "ListStoragePools" }); - - /** - * Calls ListStoragePools. - * @function listStoragePools - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} request ListStoragePoolsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createStoragePool}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateStoragePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateStoragePool. - * @function createStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createStoragePool = function createStoragePool(request, callback) { - return this.rpcCall(createStoragePool, $root.google.cloud.netapp.v1.CreateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateStoragePool" }); - - /** - * Calls CreateStoragePool. - * @function createStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} request CreateStoragePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getStoragePool}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetStoragePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.StoragePool} [response] StoragePool - */ - - /** - * Calls GetStoragePool. - * @function getStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetStoragePoolCallback} callback Node-style callback called with the error, if any, and StoragePool - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getStoragePool = function getStoragePool(request, callback) { - return this.rpcCall(getStoragePool, $root.google.cloud.netapp.v1.GetStoragePoolRequest, $root.google.cloud.netapp.v1.StoragePool, request, callback); - }, "name", { value: "GetStoragePool" }); - - /** - * Calls GetStoragePool. - * @function getStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} request GetStoragePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateStoragePool}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateStoragePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateStoragePool. - * @function updateStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateStoragePool = function updateStoragePool(request, callback) { - return this.rpcCall(updateStoragePool, $root.google.cloud.netapp.v1.UpdateStoragePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateStoragePool" }); - - /** - * Calls UpdateStoragePool. - * @function updateStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} request UpdateStoragePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteStoragePool}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteStoragePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteStoragePool. - * @function deleteStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteStoragePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteStoragePool = function deleteStoragePool(request, callback) { - return this.rpcCall(deleteStoragePool, $root.google.cloud.netapp.v1.DeleteStoragePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteStoragePool" }); - - /** - * Calls DeleteStoragePool. - * @function deleteStoragePool - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} request DeleteStoragePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|validateDirectoryService}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ValidateDirectoryServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ValidateDirectoryService. - * @function validateDirectoryService - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} request ValidateDirectoryServiceRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ValidateDirectoryServiceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.validateDirectoryService = function validateDirectoryService(request, callback) { - return this.rpcCall(validateDirectoryService, $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ValidateDirectoryService" }); - - /** - * Calls ValidateDirectoryService. - * @function validateDirectoryService - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} request ValidateDirectoryServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|switchActiveReplicaZone}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef SwitchActiveReplicaZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SwitchActiveReplicaZone. - * @function switchActiveReplicaZone - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} request SwitchActiveReplicaZoneRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.switchActiveReplicaZone = function switchActiveReplicaZone(request, callback) { - return this.rpcCall(switchActiveReplicaZone, $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SwitchActiveReplicaZone" }); - - /** - * Calls SwitchActiveReplicaZone. - * @function switchActiveReplicaZone - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} request SwitchActiveReplicaZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listVolumes}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListVolumesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListVolumesResponse} [response] ListVolumesResponse - */ - - /** - * Calls ListVolumes. - * @function listVolumes - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListVolumesCallback} callback Node-style callback called with the error, if any, and ListVolumesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listVolumes = function listVolumes(request, callback) { - return this.rpcCall(listVolumes, $root.google.cloud.netapp.v1.ListVolumesRequest, $root.google.cloud.netapp.v1.ListVolumesResponse, request, callback); - }, "name", { value: "ListVolumes" }); - - /** - * Calls ListVolumes. - * @function listVolumes - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListVolumesRequest} request ListVolumesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getVolume}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetVolumeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.Volume} [response] Volume - */ - - /** - * Calls GetVolume. - * @function getVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetVolumeCallback} callback Node-style callback called with the error, if any, and Volume - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getVolume = function getVolume(request, callback) { - return this.rpcCall(getVolume, $root.google.cloud.netapp.v1.GetVolumeRequest, $root.google.cloud.netapp.v1.Volume, request, callback); - }, "name", { value: "GetVolume" }); - - /** - * Calls GetVolume. - * @function getVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetVolumeRequest} request GetVolumeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createVolume}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateVolumeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateVolume. - * @function createVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateVolumeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createVolume = function createVolume(request, callback) { - return this.rpcCall(createVolume, $root.google.cloud.netapp.v1.CreateVolumeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateVolume" }); - - /** - * Calls CreateVolume. - * @function createVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} request CreateVolumeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateVolume}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateVolumeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateVolume. - * @function updateVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateVolumeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateVolume = function updateVolume(request, callback) { - return this.rpcCall(updateVolume, $root.google.cloud.netapp.v1.UpdateVolumeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateVolume" }); - - /** - * Calls UpdateVolume. - * @function updateVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} request UpdateVolumeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteVolume}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteVolumeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteVolume. - * @function deleteVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteVolumeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteVolume = function deleteVolume(request, callback) { - return this.rpcCall(deleteVolume, $root.google.cloud.netapp.v1.DeleteVolumeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteVolume" }); - - /** - * Calls DeleteVolume. - * @function deleteVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} request DeleteVolumeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|revertVolume}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef RevertVolumeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RevertVolume. - * @function revertVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.RevertVolumeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.revertVolume = function revertVolume(request, callback) { - return this.rpcCall(revertVolume, $root.google.cloud.netapp.v1.RevertVolumeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RevertVolume" }); - - /** - * Calls RevertVolume. - * @function revertVolume - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} request RevertVolumeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef EstablishVolumePeeringCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls EstablishVolumePeering. - * @function establishVolumePeering - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.establishVolumePeering = function establishVolumePeering(request, callback) { - return this.rpcCall(establishVolumePeering, $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "EstablishVolumePeering" }); - - /** - * Calls EstablishVolumePeering. - * @function establishVolumePeering - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListSnapshotsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListSnapshotsResponse} [response] ListSnapshotsResponse - */ - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ListSnapshotsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listSnapshots = function listSnapshots(request, callback) { - return this.rpcCall(listSnapshots, $root.google.cloud.netapp.v1.ListSnapshotsRequest, $root.google.cloud.netapp.v1.ListSnapshotsResponse, request, callback); - }, "name", { value: "ListSnapshots" }); - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getSnapshot}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.Snapshot} [response] Snapshot - */ - - /** - * Calls GetSnapshot. - * @function getSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getSnapshot = function getSnapshot(request, callback) { - return this.rpcCall(getSnapshot, $root.google.cloud.netapp.v1.GetSnapshotRequest, $root.google.cloud.netapp.v1.Snapshot, request, callback); - }, "name", { value: "GetSnapshot" }); - - /** - * Calls GetSnapshot. - * @function getSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createSnapshot}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateSnapshot. - * @function createSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createSnapshot = function createSnapshot(request, callback) { - return this.rpcCall(createSnapshot, $root.google.cloud.netapp.v1.CreateSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateSnapshot" }); - - /** - * Calls CreateSnapshot. - * @function createSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteSnapshot}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteSnapshot. - * @function deleteSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { - return this.rpcCall(deleteSnapshot, $root.google.cloud.netapp.v1.DeleteSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteSnapshot" }); - - /** - * Calls DeleteSnapshot. - * @function deleteSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateSnapshot}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateSnapshot. - * @function updateSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateSnapshot = function updateSnapshot(request, callback) { - return this.rpcCall(updateSnapshot, $root.google.cloud.netapp.v1.UpdateSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateSnapshot" }); - - /** - * Calls UpdateSnapshot. - * @function updateSnapshot - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listActiveDirectories}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListActiveDirectoriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListActiveDirectoriesResponse} [response] ListActiveDirectoriesResponse - */ - - /** - * Calls ListActiveDirectories. - * @function listActiveDirectories - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListActiveDirectoriesCallback} callback Node-style callback called with the error, if any, and ListActiveDirectoriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listActiveDirectories = function listActiveDirectories(request, callback) { - return this.rpcCall(listActiveDirectories, $root.google.cloud.netapp.v1.ListActiveDirectoriesRequest, $root.google.cloud.netapp.v1.ListActiveDirectoriesResponse, request, callback); - }, "name", { value: "ListActiveDirectories" }); - - /** - * Calls ListActiveDirectories. - * @function listActiveDirectories - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListActiveDirectoriesRequest} request ListActiveDirectoriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getActiveDirectory}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetActiveDirectoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ActiveDirectory} [response] ActiveDirectory - */ - - /** - * Calls GetActiveDirectory. - * @function getActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetActiveDirectoryCallback} callback Node-style callback called with the error, if any, and ActiveDirectory - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getActiveDirectory = function getActiveDirectory(request, callback) { - return this.rpcCall(getActiveDirectory, $root.google.cloud.netapp.v1.GetActiveDirectoryRequest, $root.google.cloud.netapp.v1.ActiveDirectory, request, callback); - }, "name", { value: "GetActiveDirectory" }); - - /** - * Calls GetActiveDirectory. - * @function getActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetActiveDirectoryRequest} request GetActiveDirectoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createActiveDirectory}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateActiveDirectoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateActiveDirectory. - * @function createActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createActiveDirectory = function createActiveDirectory(request, callback) { - return this.rpcCall(createActiveDirectory, $root.google.cloud.netapp.v1.CreateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateActiveDirectory" }); - - /** - * Calls CreateActiveDirectory. - * @function createActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateActiveDirectoryRequest} request CreateActiveDirectoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateActiveDirectory}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateActiveDirectoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateActiveDirectory. - * @function updateActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateActiveDirectory = function updateActiveDirectory(request, callback) { - return this.rpcCall(updateActiveDirectory, $root.google.cloud.netapp.v1.UpdateActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateActiveDirectory" }); - - /** - * Calls UpdateActiveDirectory. - * @function updateActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateActiveDirectoryRequest} request UpdateActiveDirectoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteActiveDirectory}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteActiveDirectoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteActiveDirectory. - * @function deleteActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteActiveDirectoryCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteActiveDirectory = function deleteActiveDirectory(request, callback) { - return this.rpcCall(deleteActiveDirectory, $root.google.cloud.netapp.v1.DeleteActiveDirectoryRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteActiveDirectory" }); - - /** - * Calls DeleteActiveDirectory. - * @function deleteActiveDirectory - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteActiveDirectoryRequest} request DeleteActiveDirectoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listKmsConfigs}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListKmsConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} [response] ListKmsConfigsResponse - */ - - /** - * Calls ListKmsConfigs. - * @function listKmsConfigs - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListKmsConfigsCallback} callback Node-style callback called with the error, if any, and ListKmsConfigsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listKmsConfigs = function listKmsConfigs(request, callback) { - return this.rpcCall(listKmsConfigs, $root.google.cloud.netapp.v1.ListKmsConfigsRequest, $root.google.cloud.netapp.v1.ListKmsConfigsResponse, request, callback); - }, "name", { value: "ListKmsConfigs" }); - - /** - * Calls ListKmsConfigs. - * @function listKmsConfigs - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} request ListKmsConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createKmsConfig}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateKmsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateKmsConfig. - * @function createKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createKmsConfig = function createKmsConfig(request, callback) { - return this.rpcCall(createKmsConfig, $root.google.cloud.netapp.v1.CreateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateKmsConfig" }); - - /** - * Calls CreateKmsConfig. - * @function createKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} request CreateKmsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getKmsConfig}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetKmsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.KmsConfig} [response] KmsConfig - */ - - /** - * Calls GetKmsConfig. - * @function getKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetKmsConfigCallback} callback Node-style callback called with the error, if any, and KmsConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getKmsConfig = function getKmsConfig(request, callback) { - return this.rpcCall(getKmsConfig, $root.google.cloud.netapp.v1.GetKmsConfigRequest, $root.google.cloud.netapp.v1.KmsConfig, request, callback); - }, "name", { value: "GetKmsConfig" }); - - /** - * Calls GetKmsConfig. - * @function getKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} request GetKmsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateKmsConfig}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateKmsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateKmsConfig. - * @function updateKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateKmsConfig = function updateKmsConfig(request, callback) { - return this.rpcCall(updateKmsConfig, $root.google.cloud.netapp.v1.UpdateKmsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateKmsConfig" }); - - /** - * Calls UpdateKmsConfig. - * @function updateKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} request UpdateKmsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|encryptVolumes}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef EncryptVolumesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls EncryptVolumes. - * @function encryptVolumes - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.EncryptVolumesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.encryptVolumes = function encryptVolumes(request, callback) { - return this.rpcCall(encryptVolumes, $root.google.cloud.netapp.v1.EncryptVolumesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "EncryptVolumes" }); - - /** - * Calls EncryptVolumes. - * @function encryptVolumes - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} request EncryptVolumesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|verifyKmsConfig}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef VerifyKmsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} [response] VerifyKmsConfigResponse - */ - - /** - * Calls VerifyKmsConfig. - * @function verifyKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.VerifyKmsConfigCallback} callback Node-style callback called with the error, if any, and VerifyKmsConfigResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.verifyKmsConfig = function verifyKmsConfig(request, callback) { - return this.rpcCall(verifyKmsConfig, $root.google.cloud.netapp.v1.VerifyKmsConfigRequest, $root.google.cloud.netapp.v1.VerifyKmsConfigResponse, request, callback); - }, "name", { value: "VerifyKmsConfig" }); - - /** - * Calls VerifyKmsConfig. - * @function verifyKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} request VerifyKmsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteKmsConfig}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteKmsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteKmsConfig. - * @function deleteKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteKmsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteKmsConfig = function deleteKmsConfig(request, callback) { - return this.rpcCall(deleteKmsConfig, $root.google.cloud.netapp.v1.DeleteKmsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteKmsConfig" }); - - /** - * Calls DeleteKmsConfig. - * @function deleteKmsConfig - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} request DeleteKmsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listReplications}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListReplicationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListReplicationsResponse} [response] ListReplicationsResponse - */ - - /** - * Calls ListReplications. - * @function listReplications - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListReplicationsCallback} callback Node-style callback called with the error, if any, and ListReplicationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listReplications = function listReplications(request, callback) { - return this.rpcCall(listReplications, $root.google.cloud.netapp.v1.ListReplicationsRequest, $root.google.cloud.netapp.v1.ListReplicationsResponse, request, callback); - }, "name", { value: "ListReplications" }); - - /** - * Calls ListReplications. - * @function listReplications - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListReplicationsRequest} request ListReplicationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.Replication} [response] Replication - */ - - /** - * Calls GetReplication. - * @function getReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetReplicationCallback} callback Node-style callback called with the error, if any, and Replication - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getReplication = function getReplication(request, callback) { - return this.rpcCall(getReplication, $root.google.cloud.netapp.v1.GetReplicationRequest, $root.google.cloud.netapp.v1.Replication, request, callback); - }, "name", { value: "GetReplication" }); - - /** - * Calls GetReplication. - * @function getReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetReplicationRequest} request GetReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateReplication. - * @function createReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createReplication = function createReplication(request, callback) { - return this.rpcCall(createReplication, $root.google.cloud.netapp.v1.CreateReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateReplication" }); - - /** - * Calls CreateReplication. - * @function createReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} request CreateReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteReplication. - * @function deleteReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteReplication = function deleteReplication(request, callback) { - return this.rpcCall(deleteReplication, $root.google.cloud.netapp.v1.DeleteReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteReplication" }); - - /** - * Calls DeleteReplication. - * @function deleteReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} request DeleteReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateReplication. - * @function updateReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateReplication = function updateReplication(request, callback) { - return this.rpcCall(updateReplication, $root.google.cloud.netapp.v1.UpdateReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateReplication" }); - - /** - * Calls UpdateReplication. - * @function updateReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} request UpdateReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|stopReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef StopReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls StopReplication. - * @function stopReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.StopReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.stopReplication = function stopReplication(request, callback) { - return this.rpcCall(stopReplication, $root.google.cloud.netapp.v1.StopReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "StopReplication" }); - - /** - * Calls StopReplication. - * @function stopReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IStopReplicationRequest} request StopReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|resumeReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ResumeReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ResumeReplication. - * @function resumeReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ResumeReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.resumeReplication = function resumeReplication(request, callback) { - return this.rpcCall(resumeReplication, $root.google.cloud.netapp.v1.ResumeReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ResumeReplication" }); - - /** - * Calls ResumeReplication. - * @function resumeReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} request ResumeReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|reverseReplicationDirection}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ReverseReplicationDirectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ReverseReplicationDirection. - * @function reverseReplicationDirection - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ReverseReplicationDirectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.reverseReplicationDirection = function reverseReplicationDirection(request, callback) { - return this.rpcCall(reverseReplicationDirection, $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ReverseReplicationDirection" }); - - /** - * Calls ReverseReplicationDirection. - * @function reverseReplicationDirection - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} request ReverseReplicationDirectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishPeering}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef EstablishPeeringCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls EstablishPeering. - * @function establishPeering - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} request EstablishPeeringRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.EstablishPeeringCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.establishPeering = function establishPeering(request, callback) { - return this.rpcCall(establishPeering, $root.google.cloud.netapp.v1.EstablishPeeringRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "EstablishPeering" }); - - /** - * Calls EstablishPeering. - * @function establishPeering - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} request EstablishPeeringRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|syncReplication}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef SyncReplicationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SyncReplication. - * @function syncReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} request SyncReplicationRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.SyncReplicationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.syncReplication = function syncReplication(request, callback) { - return this.rpcCall(syncReplication, $root.google.cloud.netapp.v1.SyncReplicationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SyncReplication" }); - - /** - * Calls SyncReplication. - * @function syncReplication - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} request SyncReplicationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackupVault}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createBackupVault = function createBackupVault(request, callback) { - return this.rpcCall(createBackupVault, $root.google.cloud.netapp.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupVault" }); - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupVault}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.BackupVault} [response] BackupVault - */ - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getBackupVault = function getBackupVault(request, callback) { - return this.rpcCall(getBackupVault, $root.google.cloud.netapp.v1.GetBackupVaultRequest, $root.google.cloud.netapp.v1.BackupVault, request, callback); - }, "name", { value: "GetBackupVault" }); - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupVaults}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse - */ - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listBackupVaults = function listBackupVaults(request, callback) { - return this.rpcCall(listBackupVaults, $root.google.cloud.netapp.v1.ListBackupVaultsRequest, $root.google.cloud.netapp.v1.ListBackupVaultsResponse, request, callback); - }, "name", { value: "ListBackupVaults" }); - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupVault}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateBackupVault = function updateBackupVault(request, callback) { - return this.rpcCall(updateBackupVault, $root.google.cloud.netapp.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackupVault" }); - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupVault}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { - return this.rpcCall(deleteBackupVault, $root.google.cloud.netapp.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupVault" }); - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupRequest} request CreateBackupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createBackup = function createBackup(request, callback) { - return this.rpcCall(createBackup, $root.google.cloud.netapp.v1.CreateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackup" }); - - /** - * Calls CreateBackup. - * @function createBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupRequest} request CreateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.Backup} [response] Backup - */ - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.netapp.v1.GetBackupRequest, $root.google.cloud.netapp.v1.Backup, request, callback); - }, "name", { value: "GetBackup" }); - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackups}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListBackupsResponse} [response] ListBackupsResponse - */ - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.netapp.v1.ListBackupsRequest, $root.google.cloud.netapp.v1.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.netapp.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateBackup = function updateBackup(request, callback) { - return this.rpcCall(updateBackup, $root.google.cloud.netapp.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackup" }); - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createBackupPolicy}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateBackupPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPolicy. - * @function createBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} request CreateBackupPolicyRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createBackupPolicy = function createBackupPolicy(request, callback) { - return this.rpcCall(createBackupPolicy, $root.google.cloud.netapp.v1.CreateBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPolicy" }); - - /** - * Calls CreateBackupPolicy. - * @function createBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateBackupPolicyRequest} request CreateBackupPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getBackupPolicy}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetBackupPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.BackupPolicy} [response] BackupPolicy - */ - - /** - * Calls GetBackupPolicy. - * @function getBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} request GetBackupPolicyRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetBackupPolicyCallback} callback Node-style callback called with the error, if any, and BackupPolicy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getBackupPolicy = function getBackupPolicy(request, callback) { - return this.rpcCall(getBackupPolicy, $root.google.cloud.netapp.v1.GetBackupPolicyRequest, $root.google.cloud.netapp.v1.BackupPolicy, request, callback); - }, "name", { value: "GetBackupPolicy" }); - - /** - * Calls GetBackupPolicy. - * @function getBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetBackupPolicyRequest} request GetBackupPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listBackupPolicies}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListBackupPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListBackupPoliciesResponse} [response] ListBackupPoliciesResponse - */ - - /** - * Calls ListBackupPolicies. - * @function listBackupPolicies - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} request ListBackupPoliciesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListBackupPoliciesCallback} callback Node-style callback called with the error, if any, and ListBackupPoliciesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listBackupPolicies = function listBackupPolicies(request, callback) { - return this.rpcCall(listBackupPolicies, $root.google.cloud.netapp.v1.ListBackupPoliciesRequest, $root.google.cloud.netapp.v1.ListBackupPoliciesResponse, request, callback); - }, "name", { value: "ListBackupPolicies" }); - - /** - * Calls ListBackupPolicies. - * @function listBackupPolicies - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListBackupPoliciesRequest} request ListBackupPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateBackupPolicy}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateBackupPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackupPolicy. - * @function updateBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} request UpdateBackupPolicyRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateBackupPolicy = function updateBackupPolicy(request, callback) { - return this.rpcCall(updateBackupPolicy, $root.google.cloud.netapp.v1.UpdateBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackupPolicy" }); - - /** - * Calls UpdateBackupPolicy. - * @function updateBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateBackupPolicyRequest} request UpdateBackupPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteBackupPolicy}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteBackupPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPolicy. - * @function deleteBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} request DeleteBackupPolicyRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteBackupPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteBackupPolicy = function deleteBackupPolicy(request, callback) { - return this.rpcCall(deleteBackupPolicy, $root.google.cloud.netapp.v1.DeleteBackupPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPolicy" }); - - /** - * Calls DeleteBackupPolicy. - * @function deleteBackupPolicy - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteBackupPolicyRequest} request DeleteBackupPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listQuotaRules}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListQuotaRulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} [response] ListQuotaRulesResponse - */ - - /** - * Calls ListQuotaRules. - * @function listQuotaRules - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} request ListQuotaRulesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListQuotaRulesCallback} callback Node-style callback called with the error, if any, and ListQuotaRulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listQuotaRules = function listQuotaRules(request, callback) { - return this.rpcCall(listQuotaRules, $root.google.cloud.netapp.v1.ListQuotaRulesRequest, $root.google.cloud.netapp.v1.ListQuotaRulesResponse, request, callback); - }, "name", { value: "ListQuotaRules" }); - - /** - * Calls ListQuotaRules. - * @function listQuotaRules - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} request ListQuotaRulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getQuotaRule}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetQuotaRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.QuotaRule} [response] QuotaRule - */ - - /** - * Calls GetQuotaRule. - * @function getQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} request GetQuotaRuleRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetQuotaRuleCallback} callback Node-style callback called with the error, if any, and QuotaRule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getQuotaRule = function getQuotaRule(request, callback) { - return this.rpcCall(getQuotaRule, $root.google.cloud.netapp.v1.GetQuotaRuleRequest, $root.google.cloud.netapp.v1.QuotaRule, request, callback); - }, "name", { value: "GetQuotaRule" }); - - /** - * Calls GetQuotaRule. - * @function getQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} request GetQuotaRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createQuotaRule}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateQuotaRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateQuotaRule. - * @function createQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} request CreateQuotaRuleRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createQuotaRule = function createQuotaRule(request, callback) { - return this.rpcCall(createQuotaRule, $root.google.cloud.netapp.v1.CreateQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateQuotaRule" }); - - /** - * Calls CreateQuotaRule. - * @function createQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} request CreateQuotaRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateQuotaRule}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateQuotaRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateQuotaRule. - * @function updateQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} request UpdateQuotaRuleRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateQuotaRule = function updateQuotaRule(request, callback) { - return this.rpcCall(updateQuotaRule, $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateQuotaRule" }); - - /** - * Calls UpdateQuotaRule. - * @function updateQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} request UpdateQuotaRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteQuotaRule}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteQuotaRuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteQuotaRule. - * @function deleteQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} request DeleteQuotaRuleRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteQuotaRuleCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteQuotaRule = function deleteQuotaRule(request, callback) { - return this.rpcCall(deleteQuotaRule, $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteQuotaRule" }); - - /** - * Calls DeleteQuotaRule. - * @function deleteQuotaRule - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} request DeleteQuotaRuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|restoreBackupFiles}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef RestoreBackupFilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreBackupFiles. - * @function restoreBackupFiles - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} request RestoreBackupFilesRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.RestoreBackupFilesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.restoreBackupFiles = function restoreBackupFiles(request, callback) { - return this.rpcCall(restoreBackupFiles, $root.google.cloud.netapp.v1.RestoreBackupFilesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreBackupFiles" }); - - /** - * Calls RestoreBackupFiles. - * @function restoreBackupFiles - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} request RestoreBackupFilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|listHostGroups}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ListHostGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ListHostGroupsResponse} [response] ListHostGroupsResponse - */ - - /** - * Calls ListHostGroups. - * @function listHostGroups - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListHostGroupsRequest} request ListHostGroupsRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ListHostGroupsCallback} callback Node-style callback called with the error, if any, and ListHostGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.listHostGroups = function listHostGroups(request, callback) { - return this.rpcCall(listHostGroups, $root.google.cloud.netapp.v1.ListHostGroupsRequest, $root.google.cloud.netapp.v1.ListHostGroupsResponse, request, callback); - }, "name", { value: "ListHostGroups" }); - - /** - * Calls ListHostGroups. - * @function listHostGroups - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IListHostGroupsRequest} request ListHostGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|getHostGroup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef GetHostGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.HostGroup} [response] HostGroup - */ - - /** - * Calls GetHostGroup. - * @function getHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetHostGroupRequest} request GetHostGroupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.GetHostGroupCallback} callback Node-style callback called with the error, if any, and HostGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.getHostGroup = function getHostGroup(request, callback) { - return this.rpcCall(getHostGroup, $root.google.cloud.netapp.v1.GetHostGroupRequest, $root.google.cloud.netapp.v1.HostGroup, request, callback); - }, "name", { value: "GetHostGroup" }); - - /** - * Calls GetHostGroup. - * @function getHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IGetHostGroupRequest} request GetHostGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|createHostGroup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef CreateHostGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateHostGroup. - * @function createHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} request CreateHostGroupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.CreateHostGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.createHostGroup = function createHostGroup(request, callback) { - return this.rpcCall(createHostGroup, $root.google.cloud.netapp.v1.CreateHostGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateHostGroup" }); - - /** - * Calls CreateHostGroup. - * @function createHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} request CreateHostGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|updateHostGroup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef UpdateHostGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateHostGroup. - * @function updateHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} request UpdateHostGroupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.UpdateHostGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.updateHostGroup = function updateHostGroup(request, callback) { - return this.rpcCall(updateHostGroup, $root.google.cloud.netapp.v1.UpdateHostGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateHostGroup" }); - - /** - * Calls UpdateHostGroup. - * @function updateHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} request UpdateHostGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|deleteHostGroup}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef DeleteHostGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteHostGroup. - * @function deleteHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} request DeleteHostGroupRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.DeleteHostGroupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.deleteHostGroup = function deleteHostGroup(request, callback) { - return this.rpcCall(deleteHostGroup, $root.google.cloud.netapp.v1.DeleteHostGroupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteHostGroup" }); - - /** - * Calls DeleteHostGroup. - * @function deleteHostGroup - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} request DeleteHostGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ExecuteOntapPostCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} [response] ExecuteOntapPostResponse - */ - - /** - * Calls ExecuteOntapPost. - * @function executeOntapPost - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.executeOntapPost = function executeOntapPost(request, callback) { - return this.rpcCall(executeOntapPost, $root.google.cloud.netapp.v1.ExecuteOntapPostRequest, $root.google.cloud.netapp.v1.ExecuteOntapPostResponse, request, callback); - }, "name", { value: "ExecuteOntapPost" }); - - /** - * Calls ExecuteOntapPost. - * @function executeOntapPost - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ExecuteOntapGetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} [response] ExecuteOntapGetResponse - */ - - /** - * Calls ExecuteOntapGet. - * @function executeOntapGet - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback} callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.executeOntapGet = function executeOntapGet(request, callback) { - return this.rpcCall(executeOntapGet, $root.google.cloud.netapp.v1.ExecuteOntapGetRequest, $root.google.cloud.netapp.v1.ExecuteOntapGetResponse, request, callback); - }, "name", { value: "ExecuteOntapGet" }); - - /** - * Calls ExecuteOntapGet. - * @function executeOntapGet - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ExecuteOntapDeleteCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} [response] ExecuteOntapDeleteResponse - */ - - /** - * Calls ExecuteOntapDelete. - * @function executeOntapDelete - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback} callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.executeOntapDelete = function executeOntapDelete(request, callback) { - return this.rpcCall(executeOntapDelete, $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest, $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse, request, callback); - }, "name", { value: "ExecuteOntapDelete" }); - - /** - * Calls ExecuteOntapDelete. - * @function executeOntapDelete - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. - * @memberof google.cloud.netapp.v1.NetApp - * @typedef ExecuteOntapPatchCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} [response] ExecuteOntapPatchResponse - */ - - /** - * Calls ExecuteOntapPatch. - * @function executeOntapPatch - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object - * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetApp.prototype.executeOntapPatch = function executeOntapPatch(request, callback) { - return this.rpcCall(executeOntapPatch, $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest, $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse, request, callback); - }, "name", { value: "ExecuteOntapPatch" }); - - /** - * Calls ExecuteOntapPatch. - * @function executeOntapPatch - * @memberof google.cloud.netapp.v1.NetApp - * @instance - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return NetApp; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.netapp.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {google.cloud.netapp.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {google.cloud.netapp.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - 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"; - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.netapp.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.netapp.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - 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); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {google.cloud.netapp.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.OperationMetadata - * @instance - * @returns {Object.} JSON object - */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.ListHostGroupsRequest = (function() { - - /** - * Properties of a ListHostGroupsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListHostGroupsRequest - * @property {string|null} [parent] ListHostGroupsRequest parent - * @property {number|null} [pageSize] ListHostGroupsRequest pageSize - * @property {string|null} [pageToken] ListHostGroupsRequest pageToken - * @property {string|null} [filter] ListHostGroupsRequest filter - * @property {string|null} [orderBy] ListHostGroupsRequest orderBy - */ - - /** - * Constructs a new ListHostGroupsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListHostGroupsRequest. - * @implements IListHostGroupsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListHostGroupsRequest=} [properties] Properties to set - */ - function ListHostGroupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListHostGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - */ - ListHostGroupsRequest.prototype.parent = ""; - - /** - * ListHostGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - */ - ListHostGroupsRequest.prototype.pageSize = 0; - - /** - * ListHostGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - */ - ListHostGroupsRequest.prototype.pageToken = ""; - - /** - * ListHostGroupsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - */ - ListHostGroupsRequest.prototype.filter = ""; - - /** - * ListHostGroupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - */ - ListHostGroupsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListHostGroupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest instance - */ - ListHostGroupsRequest.create = function create(properties) { - return new ListHostGroupsRequest(properties); - }; - - /** - * Encodes the specified ListHostGroupsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsRequest} message ListHostGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListHostGroupsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListHostGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsRequest} message ListHostGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListHostGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListHostGroupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListHostGroupsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListHostGroupsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListHostGroupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListHostGroupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListHostGroupsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListHostGroupsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListHostGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListHostGroupsRequest} ListHostGroupsRequest - */ - ListHostGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListHostGroupsRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListHostGroupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListHostGroupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {google.cloud.netapp.v1.ListHostGroupsRequest} message ListHostGroupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListHostGroupsRequest.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; - }; - - /** - * Converts this ListHostGroupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListHostGroupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListHostGroupsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListHostGroupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListHostGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListHostGroupsRequest"; - }; - - return ListHostGroupsRequest; - })(); - - v1.ListHostGroupsResponse = (function() { - - /** - * Properties of a ListHostGroupsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListHostGroupsResponse - * @property {Array.|null} [hostGroups] ListHostGroupsResponse hostGroups - * @property {string|null} [nextPageToken] ListHostGroupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListHostGroupsResponse unreachable - */ - - /** - * Constructs a new ListHostGroupsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListHostGroupsResponse. - * @implements IListHostGroupsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListHostGroupsResponse=} [properties] Properties to set - */ - function ListHostGroupsResponse(properties) { - this.hostGroups = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListHostGroupsResponse hostGroups. - * @member {Array.} hostGroups - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @instance - */ - ListHostGroupsResponse.prototype.hostGroups = $util.emptyArray; - - /** - * ListHostGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @instance - */ - ListHostGroupsResponse.prototype.nextPageToken = ""; - - /** - * ListHostGroupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @instance - */ - ListHostGroupsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListHostGroupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse instance - */ - ListHostGroupsResponse.create = function create(properties) { - return new ListHostGroupsResponse(properties); - }; - - /** - * Encodes the specified ListHostGroupsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsResponse} message ListHostGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListHostGroupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostGroups != null && message.hostGroups.length) - for (var i = 0; i < message.hostGroups.length; ++i) - $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListHostGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListHostGroupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {google.cloud.netapp.v1.IListHostGroupsResponse} message ListHostGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListHostGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListHostGroupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListHostGroupsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListHostGroupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.hostGroups && message.hostGroups.length)) - message.hostGroups = []; - message.hostGroups.push($root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListHostGroupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListHostGroupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListHostGroupsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListHostGroupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostGroups != null && message.hasOwnProperty("hostGroups")) { - if (!Array.isArray(message.hostGroups)) - return "hostGroups: array expected"; - for (var i = 0; i < message.hostGroups.length; ++i) { - var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroups[i]); - if (error) - return "hostGroups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListHostGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListHostGroupsResponse} ListHostGroupsResponse - */ - ListHostGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListHostGroupsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListHostGroupsResponse(); - if (object.hostGroups) { - if (!Array.isArray(object.hostGroups)) - throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.hostGroups: array expected"); - message.hostGroups = []; - for (var i = 0; i < object.hostGroups.length; ++i) { - if (typeof object.hostGroups[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.hostGroups: object expected"); - message.hostGroups[i] = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListHostGroupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListHostGroupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {google.cloud.netapp.v1.ListHostGroupsResponse} message ListHostGroupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListHostGroupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.hostGroups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.hostGroups && message.hostGroups.length) { - object.hostGroups = []; - for (var j = 0; j < message.hostGroups.length; ++j) - object.hostGroups[j] = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListHostGroupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListHostGroupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListHostGroupsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListHostGroupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListHostGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListHostGroupsResponse"; - }; - - return ListHostGroupsResponse; - })(); - - v1.GetHostGroupRequest = (function() { - - /** - * Properties of a GetHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetHostGroupRequest - * @property {string|null} [name] GetHostGroupRequest name - */ - - /** - * Constructs a new GetHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetHostGroupRequest. - * @implements IGetHostGroupRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetHostGroupRequest=} [properties] Properties to set - */ - function GetHostGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetHostGroupRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @instance - */ - GetHostGroupRequest.prototype.name = ""; - - /** - * Creates a new GetHostGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IGetHostGroupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest instance - */ - GetHostGroupRequest.create = function create(properties) { - return new GetHostGroupRequest(properties); - }; - - /** - * Encodes the specified GetHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IGetHostGroupRequest} message GetHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetHostGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetHostGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IGetHostGroupRequest} message GetHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetHostGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetHostGroupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetHostGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetHostGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetHostGroupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetHostGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetHostGroupRequest} GetHostGroupRequest - */ - GetHostGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetHostGroupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetHostGroupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetHostGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.GetHostGroupRequest} message GetHostGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetHostGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetHostGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @instance - * @returns {Object.} JSON object - */ - GetHostGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetHostGroupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetHostGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetHostGroupRequest"; - }; - - return GetHostGroupRequest; - })(); - - v1.CreateHostGroupRequest = (function() { - - /** - * Properties of a CreateHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateHostGroupRequest - * @property {string|null} [parent] CreateHostGroupRequest parent - * @property {google.cloud.netapp.v1.IHostGroup|null} [hostGroup] CreateHostGroupRequest hostGroup - * @property {string|null} [hostGroupId] CreateHostGroupRequest hostGroupId - */ - - /** - * Constructs a new CreateHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateHostGroupRequest. - * @implements ICreateHostGroupRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest=} [properties] Properties to set - */ - function CreateHostGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateHostGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @instance - */ - CreateHostGroupRequest.prototype.parent = ""; - - /** - * CreateHostGroupRequest hostGroup. - * @member {google.cloud.netapp.v1.IHostGroup|null|undefined} hostGroup - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @instance - */ - CreateHostGroupRequest.prototype.hostGroup = null; - - /** - * CreateHostGroupRequest hostGroupId. - * @member {string} hostGroupId - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @instance - */ - CreateHostGroupRequest.prototype.hostGroupId = ""; - - /** - * Creates a new CreateHostGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest instance - */ - CreateHostGroupRequest.create = function create(properties) { - return new CreateHostGroupRequest(properties); - }; - - /** - * Encodes the specified CreateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} message CreateHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateHostGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.hostGroup != null && Object.hasOwnProperty.call(message, "hostGroup")) - $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.hostGroupId != null && Object.hasOwnProperty.call(message, "hostGroupId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.hostGroupId); - return writer; - }; - - /** - * Encodes the specified CreateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateHostGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.ICreateHostGroupRequest} message CreateHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateHostGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateHostGroupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateHostGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32()); - break; - } - case 3: { - message.hostGroupId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateHostGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateHostGroupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateHostGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) { - var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroup); - if (error) - return "hostGroup." + error; - } - if (message.hostGroupId != null && message.hasOwnProperty("hostGroupId")) - if (!$util.isString(message.hostGroupId)) - return "hostGroupId: string expected"; - return null; - }; - - /** - * Creates a CreateHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateHostGroupRequest} CreateHostGroupRequest - */ - CreateHostGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateHostGroupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateHostGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.hostGroup != null) { - if (typeof object.hostGroup !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateHostGroupRequest.hostGroup: object expected"); - message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroup); - } - if (object.hostGroupId != null) - message.hostGroupId = String(object.hostGroupId); - return message; - }; - - /** - * Creates a plain object from a CreateHostGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.CreateHostGroupRequest} message CreateHostGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateHostGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.hostGroup = null; - object.hostGroupId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) - object.hostGroup = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroup, options); - if (message.hostGroupId != null && message.hasOwnProperty("hostGroupId")) - object.hostGroupId = message.hostGroupId; - return object; - }; - - /** - * Converts this CreateHostGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @instance - * @returns {Object.} JSON object - */ - CreateHostGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateHostGroupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateHostGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateHostGroupRequest"; - }; - - return CreateHostGroupRequest; - })(); - - v1.UpdateHostGroupRequest = (function() { - - /** - * Properties of an UpdateHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateHostGroupRequest - * @property {google.cloud.netapp.v1.IHostGroup|null} [hostGroup] UpdateHostGroupRequest hostGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateHostGroupRequest updateMask - */ - - /** - * Constructs a new UpdateHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateHostGroupRequest. - * @implements IUpdateHostGroupRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest=} [properties] Properties to set - */ - function UpdateHostGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateHostGroupRequest hostGroup. - * @member {google.cloud.netapp.v1.IHostGroup|null|undefined} hostGroup - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @instance - */ - UpdateHostGroupRequest.prototype.hostGroup = null; - - /** - * UpdateHostGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @instance - */ - UpdateHostGroupRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateHostGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest instance - */ - UpdateHostGroupRequest.create = function create(properties) { - return new UpdateHostGroupRequest(properties); - }; - - /** - * Encodes the specified UpdateHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} message UpdateHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateHostGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hostGroup != null && Object.hasOwnProperty.call(message, "hostGroup")) - $root.google.cloud.netapp.v1.HostGroup.encode(message.hostGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateHostGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateHostGroupRequest} message UpdateHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateHostGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateHostGroupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateHostGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateHostGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateHostGroupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateHostGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) { - var error = $root.google.cloud.netapp.v1.HostGroup.verify(message.hostGroup); - if (error) - return "hostGroup." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateHostGroupRequest} UpdateHostGroupRequest - */ - UpdateHostGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateHostGroupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateHostGroupRequest(); - if (object.hostGroup != null) { - if (typeof object.hostGroup !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateHostGroupRequest.hostGroup: object expected"); - message.hostGroup = $root.google.cloud.netapp.v1.HostGroup.fromObject(object.hostGroup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateHostGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateHostGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.UpdateHostGroupRequest} message UpdateHostGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateHostGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostGroup = null; - object.updateMask = null; - } - if (message.hostGroup != null && message.hasOwnProperty("hostGroup")) - object.hostGroup = $root.google.cloud.netapp.v1.HostGroup.toObject(message.hostGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateHostGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateHostGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateHostGroupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateHostGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateHostGroupRequest"; - }; - - return UpdateHostGroupRequest; - })(); - - v1.DeleteHostGroupRequest = (function() { - - /** - * Properties of a DeleteHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteHostGroupRequest - * @property {string|null} [name] DeleteHostGroupRequest name - */ - - /** - * Constructs a new DeleteHostGroupRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteHostGroupRequest. - * @implements IDeleteHostGroupRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest=} [properties] Properties to set - */ - function DeleteHostGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteHostGroupRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @instance - */ - DeleteHostGroupRequest.prototype.name = ""; - - /** - * Creates a new DeleteHostGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest instance - */ - DeleteHostGroupRequest.create = function create(properties) { - return new DeleteHostGroupRequest(properties); - }; - - /** - * Encodes the specified DeleteHostGroupRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} message DeleteHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteHostGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteHostGroupRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteHostGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteHostGroupRequest} message DeleteHostGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteHostGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteHostGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteHostGroupRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteHostGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteHostGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteHostGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteHostGroupRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteHostGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteHostGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteHostGroupRequest} DeleteHostGroupRequest - */ - DeleteHostGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteHostGroupRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteHostGroupRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteHostGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {google.cloud.netapp.v1.DeleteHostGroupRequest} message DeleteHostGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteHostGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteHostGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteHostGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteHostGroupRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteHostGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteHostGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteHostGroupRequest"; - }; - - return DeleteHostGroupRequest; - })(); - - v1.HostGroup = (function() { - - /** - * Properties of a HostGroup. - * @memberof google.cloud.netapp.v1 - * @interface IHostGroup - * @property {string|null} [name] HostGroup name - * @property {google.cloud.netapp.v1.HostGroup.Type|null} [type] HostGroup type - * @property {google.cloud.netapp.v1.HostGroup.State|null} [state] HostGroup state - * @property {google.protobuf.ITimestamp|null} [createTime] HostGroup createTime - * @property {Array.|null} [hosts] HostGroup hosts - * @property {google.cloud.netapp.v1.OsType|null} [osType] HostGroup osType - * @property {string|null} [description] HostGroup description - * @property {Object.|null} [labels] HostGroup labels - */ - - /** - * Constructs a new HostGroup. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a HostGroup. - * @implements IHostGroup - * @constructor - * @param {google.cloud.netapp.v1.IHostGroup=} [properties] Properties to set - */ - function HostGroup(properties) { - this.hosts = []; - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HostGroup name. - * @member {string} name - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.name = ""; - - /** - * HostGroup type. - * @member {google.cloud.netapp.v1.HostGroup.Type} type - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.type = 0; - - /** - * HostGroup state. - * @member {google.cloud.netapp.v1.HostGroup.State} state - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.state = 0; - - /** - * HostGroup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.createTime = null; - - /** - * HostGroup hosts. - * @member {Array.} hosts - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.hosts = $util.emptyArray; - - /** - * HostGroup osType. - * @member {google.cloud.netapp.v1.OsType} osType - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.osType = 0; - - /** - * HostGroup description. - * @member {string} description - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.description = ""; - - /** - * HostGroup labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - */ - HostGroup.prototype.labels = $util.emptyObject; - - /** - * Creates a new HostGroup instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {google.cloud.netapp.v1.IHostGroup=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.HostGroup} HostGroup instance - */ - HostGroup.create = function create(properties) { - return new HostGroup(properties); - }; - - /** - * Encodes the specified HostGroup message. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {google.cloud.netapp.v1.IHostGroup} message HostGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.hosts != null && message.hosts.length) - for (var i = 0; i < message.hosts.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.hosts[i]); - if (message.osType != null && Object.hasOwnProperty.call(message, "osType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.osType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified HostGroup message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HostGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {google.cloud.netapp.v1.IHostGroup} message HostGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HostGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.HostGroup} HostGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HostGroup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.hosts && message.hosts.length)) - message.hosts = []; - message.hosts.push(reader.string()); - break; - } - case 6: { - message.osType = reader.int32(); - break; - } - case 7: { - message.description = reader.string(); - break; - } - case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HostGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.HostGroup} HostGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HostGroup message. - * @function verify - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HostGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - 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: - case 4: - case 5: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.hosts != null && message.hasOwnProperty("hosts")) { - if (!Array.isArray(message.hosts)) - return "hosts: array expected"; - for (var i = 0; i < message.hosts.length; ++i) - if (!$util.isString(message.hosts[i])) - return "hosts: string[] expected"; - } - if (message.osType != null && message.hasOwnProperty("osType")) - switch (message.osType) { - default: - return "osType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a HostGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.HostGroup} HostGroup - */ - HostGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.HostGroup) - return object; - var message = new $root.google.cloud.netapp.v1.HostGroup(); - if (object.name != null) - message.name = String(object.name); - 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 "ISCSI_INITIATOR": - case 1: - message.type = 1; - 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 "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "DISABLED": - case 5: - message.state = 5; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.HostGroup.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.hosts) { - if (!Array.isArray(object.hosts)) - throw TypeError(".google.cloud.netapp.v1.HostGroup.hosts: array expected"); - message.hosts = []; - for (var i = 0; i < object.hosts.length; ++i) - message.hosts[i] = String(object.hosts[i]); - } - switch (object.osType) { - default: - if (typeof object.osType === "number") { - message.osType = object.osType; - break; - } - break; - case "OS_TYPE_UNSPECIFIED": - case 0: - message.osType = 0; - break; - case "LINUX": - case 1: - message.osType = 1; - break; - case "WINDOWS": - case 2: - message.osType = 2; - break; - case "ESXI": - case 3: - message.osType = 3; - break; - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.HostGroup.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a HostGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {google.cloud.netapp.v1.HostGroup} message HostGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HostGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hosts = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.osType = options.enums === String ? "OS_TYPE_UNSPECIFIED" : 0; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.netapp.v1.HostGroup.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.HostGroup.Type[message.type] : message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.HostGroup.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.HostGroup.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.hosts && message.hosts.length) { - object.hosts = []; - for (var j = 0; j < message.hosts.length; ++j) - object.hosts[j] = message.hosts[j]; - } - if (message.osType != null && message.hasOwnProperty("osType")) - object.osType = options.enums === String ? $root.google.cloud.netapp.v1.OsType[message.osType] === undefined ? message.osType : $root.google.cloud.netapp.v1.OsType[message.osType] : message.osType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this HostGroup to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.HostGroup - * @instance - * @returns {Object.} JSON object - */ - HostGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HostGroup - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.HostGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HostGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.HostGroup"; - }; - - /** - * Type enum. - * @name google.cloud.netapp.v1.HostGroup.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ISCSI_INITIATOR=1 ISCSI_INITIATOR value - */ - HostGroup.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ISCSI_INITIATOR"] = 1; - return values; - })(); - - /** - * State enum. - * @name google.cloud.netapp.v1.HostGroup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} DISABLED=5 DISABLED value - */ - HostGroup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "DISABLED"] = 5; - return values; - })(); - - return HostGroup; - })(); - - /** - * ServiceLevel enum. - * @name google.cloud.netapp.v1.ServiceLevel - * @enum {number} - * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value - * @property {number} PREMIUM=1 PREMIUM value - * @property {number} EXTREME=2 EXTREME value - * @property {number} STANDARD=3 STANDARD value - * @property {number} FLEX=4 FLEX value - */ - v1.ServiceLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREMIUM"] = 1; - values[valuesById[2] = "EXTREME"] = 2; - values[valuesById[3] = "STANDARD"] = 3; - values[valuesById[4] = "FLEX"] = 4; - return values; - })(); - - /** - * FlexPerformance enum. - * @name google.cloud.netapp.v1.FlexPerformance - * @enum {number} - * @property {number} FLEX_PERFORMANCE_UNSPECIFIED=0 FLEX_PERFORMANCE_UNSPECIFIED value - * @property {number} FLEX_PERFORMANCE_DEFAULT=1 FLEX_PERFORMANCE_DEFAULT value - * @property {number} FLEX_PERFORMANCE_CUSTOM=2 FLEX_PERFORMANCE_CUSTOM value - */ - v1.FlexPerformance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FLEX_PERFORMANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FLEX_PERFORMANCE_DEFAULT"] = 1; - values[valuesById[2] = "FLEX_PERFORMANCE_CUSTOM"] = 2; - return values; - })(); - - /** - * EncryptionType enum. - * @name google.cloud.netapp.v1.EncryptionType - * @enum {number} - * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value - * @property {number} SERVICE_MANAGED=1 SERVICE_MANAGED value - * @property {number} CLOUD_KMS=2 CLOUD_KMS value - */ - v1.EncryptionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SERVICE_MANAGED"] = 1; - values[valuesById[2] = "CLOUD_KMS"] = 2; - return values; - })(); - - /** - * DirectoryServiceType enum. - * @name google.cloud.netapp.v1.DirectoryServiceType - * @enum {number} - * @property {number} DIRECTORY_SERVICE_TYPE_UNSPECIFIED=0 DIRECTORY_SERVICE_TYPE_UNSPECIFIED value - * @property {number} ACTIVE_DIRECTORY=1 ACTIVE_DIRECTORY value - */ - v1.DirectoryServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DIRECTORY_SERVICE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE_DIRECTORY"] = 1; - return values; - })(); - - /** - * StoragePoolType enum. - * @name google.cloud.netapp.v1.StoragePoolType - * @enum {number} - * @property {number} STORAGE_POOL_TYPE_UNSPECIFIED=0 STORAGE_POOL_TYPE_UNSPECIFIED value - * @property {number} FILE=1 FILE value - * @property {number} UNIFIED=2 UNIFIED value - */ - v1.StoragePoolType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STORAGE_POOL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FILE"] = 1; - values[valuesById[2] = "UNIFIED"] = 2; - return values; - })(); - - /** - * HybridReplicationSchedule enum. - * @name google.cloud.netapp.v1.HybridReplicationSchedule - * @enum {number} - * @property {number} HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED=0 HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED value - * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value - * @property {number} HOURLY=2 HOURLY value - * @property {number} DAILY=3 DAILY value - */ - v1.HybridReplicationSchedule = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVERY_10_MINUTES"] = 1; - values[valuesById[2] = "HOURLY"] = 2; - values[valuesById[3] = "DAILY"] = 3; - return values; - })(); - - /** - * QosType enum. - * @name google.cloud.netapp.v1.QosType - * @enum {number} - * @property {number} QOS_TYPE_UNSPECIFIED=0 QOS_TYPE_UNSPECIFIED value - * @property {number} AUTO=1 AUTO value - * @property {number} MANUAL=2 MANUAL value - */ - v1.QosType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "QOS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTO"] = 1; - values[valuesById[2] = "MANUAL"] = 2; - return values; - })(); - - /** - * OsType enum. - * @name google.cloud.netapp.v1.OsType - * @enum {number} - * @property {number} OS_TYPE_UNSPECIFIED=0 OS_TYPE_UNSPECIFIED value - * @property {number} LINUX=1 LINUX value - * @property {number} WINDOWS=2 WINDOWS value - * @property {number} ESXI=3 ESXI value - */ - v1.OsType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINUX"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - values[valuesById[3] = "ESXI"] = 3; - return values; - })(); - - v1.LocationMetadata = (function() { - - /** - * Properties of a LocationMetadata. - * @memberof google.cloud.netapp.v1 - * @interface ILocationMetadata - * @property {Array.|null} [supportedServiceLevels] LocationMetadata supportedServiceLevels - * @property {Array.|null} [supportedFlexPerformance] LocationMetadata supportedFlexPerformance - * @property {boolean|null} [hasVcp] LocationMetadata hasVcp - * @property {boolean|null} [hasOntapProxy] LocationMetadata hasOntapProxy - */ - - /** - * Constructs a new LocationMetadata. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a LocationMetadata. - * @implements ILocationMetadata - * @constructor - * @param {google.cloud.netapp.v1.ILocationMetadata=} [properties] Properties to set - */ - function LocationMetadata(properties) { - this.supportedServiceLevels = []; - this.supportedFlexPerformance = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationMetadata supportedServiceLevels. - * @member {Array.} supportedServiceLevels - * @memberof google.cloud.netapp.v1.LocationMetadata - * @instance - */ - LocationMetadata.prototype.supportedServiceLevels = $util.emptyArray; - - /** - * LocationMetadata supportedFlexPerformance. - * @member {Array.} supportedFlexPerformance - * @memberof google.cloud.netapp.v1.LocationMetadata - * @instance - */ - LocationMetadata.prototype.supportedFlexPerformance = $util.emptyArray; - - /** - * LocationMetadata hasVcp. - * @member {boolean} hasVcp - * @memberof google.cloud.netapp.v1.LocationMetadata - * @instance - */ - LocationMetadata.prototype.hasVcp = false; - - /** - * LocationMetadata hasOntapProxy. - * @member {boolean} hasOntapProxy - * @memberof google.cloud.netapp.v1.LocationMetadata - * @instance - */ - LocationMetadata.prototype.hasOntapProxy = false; - - /** - * Creates a new LocationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {google.cloud.netapp.v1.ILocationMetadata=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata instance - */ - LocationMetadata.create = function create(properties) { - return new LocationMetadata(properties); - }; - - /** - * Encodes the specified LocationMetadata message. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {google.cloud.netapp.v1.ILocationMetadata} message LocationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.supportedServiceLevels != null && message.supportedServiceLevels.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.supportedServiceLevels.length; ++i) - writer.int32(message.supportedServiceLevels[i]); - writer.ldelim(); - } - if (message.supportedFlexPerformance != null && message.supportedFlexPerformance.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.supportedFlexPerformance.length; ++i) - writer.int32(message.supportedFlexPerformance[i]); - writer.ldelim(); - } - if (message.hasVcp != null && Object.hasOwnProperty.call(message, "hasVcp")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hasVcp); - if (message.hasOntapProxy != null && Object.hasOwnProperty.call(message, "hasOntapProxy")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasOntapProxy); - return writer; - }; - - /** - * Encodes the specified LocationMetadata message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.LocationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {google.cloud.netapp.v1.ILocationMetadata} message LocationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.LocationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.supportedServiceLevels && message.supportedServiceLevels.length)) - message.supportedServiceLevels = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedServiceLevels.push(reader.int32()); - } else - message.supportedServiceLevels.push(reader.int32()); - break; - } - case 2: { - if (!(message.supportedFlexPerformance && message.supportedFlexPerformance.length)) - message.supportedFlexPerformance = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedFlexPerformance.push(reader.int32()); - } else - message.supportedFlexPerformance.push(reader.int32()); - break; - } - case 3: { - message.hasVcp = reader.bool(); - break; - } - case 4: { - message.hasOntapProxy = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationMetadata message. - * @function verify - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.supportedServiceLevels != null && message.hasOwnProperty("supportedServiceLevels")) { - if (!Array.isArray(message.supportedServiceLevels)) - return "supportedServiceLevels: array expected"; - for (var i = 0; i < message.supportedServiceLevels.length; ++i) - switch (message.supportedServiceLevels[i]) { - default: - return "supportedServiceLevels: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.supportedFlexPerformance != null && message.hasOwnProperty("supportedFlexPerformance")) { - if (!Array.isArray(message.supportedFlexPerformance)) - return "supportedFlexPerformance: array expected"; - for (var i = 0; i < message.supportedFlexPerformance.length; ++i) - switch (message.supportedFlexPerformance[i]) { - default: - return "supportedFlexPerformance: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.hasVcp != null && message.hasOwnProperty("hasVcp")) - if (typeof message.hasVcp !== "boolean") - return "hasVcp: boolean expected"; - if (message.hasOntapProxy != null && message.hasOwnProperty("hasOntapProxy")) - if (typeof message.hasOntapProxy !== "boolean") - return "hasOntapProxy: boolean expected"; - return null; - }; - - /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.LocationMetadata} LocationMetadata - */ - LocationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.LocationMetadata) - return object; - var message = new $root.google.cloud.netapp.v1.LocationMetadata(); - if (object.supportedServiceLevels) { - if (!Array.isArray(object.supportedServiceLevels)) - throw TypeError(".google.cloud.netapp.v1.LocationMetadata.supportedServiceLevels: array expected"); - message.supportedServiceLevels = []; - for (var i = 0; i < object.supportedServiceLevels.length; ++i) - switch (object.supportedServiceLevels[i]) { - default: - if (typeof object.supportedServiceLevels[i] === "number") { - message.supportedServiceLevels[i] = object.supportedServiceLevels[i]; - break; - } - case "SERVICE_LEVEL_UNSPECIFIED": - case 0: - message.supportedServiceLevels[i] = 0; - break; - case "PREMIUM": - case 1: - message.supportedServiceLevels[i] = 1; - break; - case "EXTREME": - case 2: - message.supportedServiceLevels[i] = 2; - break; - case "STANDARD": - case 3: - message.supportedServiceLevels[i] = 3; - break; - case "FLEX": - case 4: - message.supportedServiceLevels[i] = 4; - break; - } - } - if (object.supportedFlexPerformance) { - if (!Array.isArray(object.supportedFlexPerformance)) - throw TypeError(".google.cloud.netapp.v1.LocationMetadata.supportedFlexPerformance: array expected"); - message.supportedFlexPerformance = []; - for (var i = 0; i < object.supportedFlexPerformance.length; ++i) - switch (object.supportedFlexPerformance[i]) { - default: - if (typeof object.supportedFlexPerformance[i] === "number") { - message.supportedFlexPerformance[i] = object.supportedFlexPerformance[i]; - break; - } - case "FLEX_PERFORMANCE_UNSPECIFIED": - case 0: - message.supportedFlexPerformance[i] = 0; - break; - case "FLEX_PERFORMANCE_DEFAULT": - case 1: - message.supportedFlexPerformance[i] = 1; - break; - case "FLEX_PERFORMANCE_CUSTOM": - case 2: - message.supportedFlexPerformance[i] = 2; - break; - } - } - if (object.hasVcp != null) - message.hasVcp = Boolean(object.hasVcp); - if (object.hasOntapProxy != null) - message.hasOntapProxy = Boolean(object.hasOntapProxy); - return message; - }; - - /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {google.cloud.netapp.v1.LocationMetadata} message LocationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.supportedServiceLevels = []; - object.supportedFlexPerformance = []; - } - if (options.defaults) { - object.hasVcp = false; - object.hasOntapProxy = false; - } - if (message.supportedServiceLevels && message.supportedServiceLevels.length) { - object.supportedServiceLevels = []; - for (var j = 0; j < message.supportedServiceLevels.length; ++j) - object.supportedServiceLevels[j] = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.supportedServiceLevels[j]] === undefined ? message.supportedServiceLevels[j] : $root.google.cloud.netapp.v1.ServiceLevel[message.supportedServiceLevels[j]] : message.supportedServiceLevels[j]; - } - if (message.supportedFlexPerformance && message.supportedFlexPerformance.length) { - object.supportedFlexPerformance = []; - for (var j = 0; j < message.supportedFlexPerformance.length; ++j) - object.supportedFlexPerformance[j] = options.enums === String ? $root.google.cloud.netapp.v1.FlexPerformance[message.supportedFlexPerformance[j]] === undefined ? message.supportedFlexPerformance[j] : $root.google.cloud.netapp.v1.FlexPerformance[message.supportedFlexPerformance[j]] : message.supportedFlexPerformance[j]; - } - if (message.hasVcp != null && message.hasOwnProperty("hasVcp")) - object.hasVcp = message.hasVcp; - if (message.hasOntapProxy != null && message.hasOwnProperty("hasOntapProxy")) - object.hasOntapProxy = message.hasOntapProxy; - return object; - }; - - /** - * Converts this LocationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.LocationMetadata - * @instance - * @returns {Object.} JSON object - */ - LocationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationMetadata - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.LocationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.LocationMetadata"; - }; - - return LocationMetadata; - })(); - - v1.UserCommands = (function() { - - /** - * Properties of a UserCommands. - * @memberof google.cloud.netapp.v1 - * @interface IUserCommands - * @property {Array.|null} [commands] UserCommands commands - */ - - /** - * Constructs a new UserCommands. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a UserCommands. - * @implements IUserCommands - * @constructor - * @param {google.cloud.netapp.v1.IUserCommands=} [properties] Properties to set - */ - function UserCommands(properties) { - this.commands = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserCommands commands. - * @member {Array.} commands - * @memberof google.cloud.netapp.v1.UserCommands - * @instance - */ - UserCommands.prototype.commands = $util.emptyArray; - - /** - * Creates a new UserCommands instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {google.cloud.netapp.v1.IUserCommands=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UserCommands} UserCommands instance - */ - UserCommands.create = function create(properties) { - return new UserCommands(properties); - }; - - /** - * Encodes the specified UserCommands message. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {google.cloud.netapp.v1.IUserCommands} message UserCommands message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserCommands.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commands != null && message.commands.length) - for (var i = 0; i < message.commands.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.commands[i]); - return writer; - }; - - /** - * Encodes the specified UserCommands message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UserCommands.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {google.cloud.netapp.v1.IUserCommands} message UserCommands message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserCommands.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserCommands message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UserCommands} UserCommands - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserCommands.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UserCommands(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.commands && message.commands.length)) - message.commands = []; - message.commands.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserCommands message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UserCommands} UserCommands - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserCommands.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserCommands message. - * @function verify - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserCommands.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commands != null && message.hasOwnProperty("commands")) { - if (!Array.isArray(message.commands)) - return "commands: array expected"; - for (var i = 0; i < message.commands.length; ++i) - if (!$util.isString(message.commands[i])) - return "commands: string[] expected"; - } - return null; - }; - - /** - * Creates a UserCommands message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UserCommands} UserCommands - */ - UserCommands.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UserCommands) - return object; - var message = new $root.google.cloud.netapp.v1.UserCommands(); - if (object.commands) { - if (!Array.isArray(object.commands)) - throw TypeError(".google.cloud.netapp.v1.UserCommands.commands: array expected"); - message.commands = []; - for (var i = 0; i < object.commands.length; ++i) - message.commands[i] = String(object.commands[i]); - } - return message; - }; - - /** - * Creates a plain object from a UserCommands message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {google.cloud.netapp.v1.UserCommands} message UserCommands - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserCommands.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.commands = []; - if (message.commands && message.commands.length) { - object.commands = []; - for (var j = 0; j < message.commands.length; ++j) - object.commands[j] = message.commands[j]; - } - return object; - }; - - /** - * Converts this UserCommands to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UserCommands - * @instance - * @returns {Object.} JSON object - */ - UserCommands.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserCommands - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UserCommands - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserCommands.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UserCommands"; - }; - - return UserCommands; - })(); - - v1.GetKmsConfigRequest = (function() { - - /** - * Properties of a GetKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetKmsConfigRequest - * @property {string|null} [name] GetKmsConfigRequest name - */ - - /** - * Constructs a new GetKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetKmsConfigRequest. - * @implements IGetKmsConfigRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set - */ - function GetKmsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetKmsConfigRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @instance - */ - GetKmsConfigRequest.prototype.name = ""; - - /** - * Creates a new GetKmsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest instance - */ - GetKmsConfigRequest.create = function create(properties) { - return new GetKmsConfigRequest(properties); - }; - - /** - * Encodes the specified GetKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKmsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetKmsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IGetKmsConfigRequest} message GetKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKmsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKmsConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetKmsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetKmsConfigRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetKmsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetKmsConfigRequest} GetKmsConfigRequest - */ - GetKmsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetKmsConfigRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetKmsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetKmsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.GetKmsConfigRequest} message GetKmsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetKmsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetKmsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetKmsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetKmsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetKmsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetKmsConfigRequest"; - }; - - return GetKmsConfigRequest; - })(); - - v1.ListKmsConfigsRequest = (function() { - - /** - * Properties of a ListKmsConfigsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListKmsConfigsRequest - * @property {string|null} [parent] ListKmsConfigsRequest parent - * @property {number|null} [pageSize] ListKmsConfigsRequest pageSize - * @property {string|null} [pageToken] ListKmsConfigsRequest pageToken - * @property {string|null} [orderBy] ListKmsConfigsRequest orderBy - * @property {string|null} [filter] ListKmsConfigsRequest filter - */ - - /** - * Constructs a new ListKmsConfigsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListKmsConfigsRequest. - * @implements IListKmsConfigsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set - */ - function ListKmsConfigsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListKmsConfigsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - */ - ListKmsConfigsRequest.prototype.parent = ""; - - /** - * ListKmsConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - */ - ListKmsConfigsRequest.prototype.pageSize = 0; - - /** - * ListKmsConfigsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - */ - ListKmsConfigsRequest.prototype.pageToken = ""; - - /** - * ListKmsConfigsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - */ - ListKmsConfigsRequest.prototype.orderBy = ""; - - /** - * ListKmsConfigsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - */ - ListKmsConfigsRequest.prototype.filter = ""; - - /** - * Creates a new ListKmsConfigsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest instance - */ - ListKmsConfigsRequest.create = function create(properties) { - return new ListKmsConfigsRequest(properties); - }; - - /** - * Encodes the specified ListKmsConfigsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKmsConfigsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListKmsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsRequest} message ListKmsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKmsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKmsConfigsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKmsConfigsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListKmsConfigsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKmsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListKmsConfigsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListKmsConfigsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListKmsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListKmsConfigsRequest} ListKmsConfigsRequest - */ - ListKmsConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListKmsConfigsRequest(); - 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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListKmsConfigsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {google.cloud.netapp.v1.ListKmsConfigsRequest} message ListKmsConfigsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListKmsConfigsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListKmsConfigsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @instance - * @returns {Object.} JSON object - */ - ListKmsConfigsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListKmsConfigsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListKmsConfigsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListKmsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsRequest"; - }; - - return ListKmsConfigsRequest; - })(); - - v1.ListKmsConfigsResponse = (function() { - - /** - * Properties of a ListKmsConfigsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListKmsConfigsResponse - * @property {Array.|null} [kmsConfigs] ListKmsConfigsResponse kmsConfigs - * @property {string|null} [nextPageToken] ListKmsConfigsResponse nextPageToken - * @property {Array.|null} [unreachable] ListKmsConfigsResponse unreachable - */ - - /** - * Constructs a new ListKmsConfigsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListKmsConfigsResponse. - * @implements IListKmsConfigsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set - */ - function ListKmsConfigsResponse(properties) { - this.kmsConfigs = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListKmsConfigsResponse kmsConfigs. - * @member {Array.} kmsConfigs - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @instance - */ - ListKmsConfigsResponse.prototype.kmsConfigs = $util.emptyArray; - - /** - * ListKmsConfigsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @instance - */ - ListKmsConfigsResponse.prototype.nextPageToken = ""; - - /** - * ListKmsConfigsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @instance - */ - ListKmsConfigsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListKmsConfigsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse instance - */ - ListKmsConfigsResponse.create = function create(properties) { - return new ListKmsConfigsResponse(properties); - }; - - /** - * Encodes the specified ListKmsConfigsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKmsConfigsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsConfigs != null && message.kmsConfigs.length) - for (var i = 0; i < message.kmsConfigs.length; ++i) - $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListKmsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListKmsConfigsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {google.cloud.netapp.v1.IListKmsConfigsResponse} message ListKmsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKmsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKmsConfigsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKmsConfigsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.kmsConfigs && message.kmsConfigs.length)) - message.kmsConfigs = []; - message.kmsConfigs.push($root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListKmsConfigsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKmsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListKmsConfigsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListKmsConfigsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsConfigs != null && message.hasOwnProperty("kmsConfigs")) { - if (!Array.isArray(message.kmsConfigs)) - return "kmsConfigs: array expected"; - for (var i = 0; i < message.kmsConfigs.length; ++i) { - var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfigs[i]); - if (error) - return "kmsConfigs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListKmsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListKmsConfigsResponse} ListKmsConfigsResponse - */ - ListKmsConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListKmsConfigsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListKmsConfigsResponse(); - if (object.kmsConfigs) { - if (!Array.isArray(object.kmsConfigs)) - throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: array expected"); - message.kmsConfigs = []; - for (var i = 0; i < object.kmsConfigs.length; ++i) { - if (typeof object.kmsConfigs[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.kmsConfigs: object expected"); - message.kmsConfigs[i] = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfigs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListKmsConfigsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListKmsConfigsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {google.cloud.netapp.v1.ListKmsConfigsResponse} message ListKmsConfigsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListKmsConfigsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.kmsConfigs = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.kmsConfigs && message.kmsConfigs.length) { - object.kmsConfigs = []; - for (var j = 0; j < message.kmsConfigs.length; ++j) - object.kmsConfigs[j] = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfigs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListKmsConfigsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @instance - * @returns {Object.} JSON object - */ - ListKmsConfigsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListKmsConfigsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListKmsConfigsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListKmsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListKmsConfigsResponse"; - }; - - return ListKmsConfigsResponse; - })(); - - v1.CreateKmsConfigRequest = (function() { - - /** - * Properties of a CreateKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateKmsConfigRequest - * @property {string|null} [parent] CreateKmsConfigRequest parent - * @property {string|null} [kmsConfigId] CreateKmsConfigRequest kmsConfigId - * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] CreateKmsConfigRequest kmsConfig - */ - - /** - * Constructs a new CreateKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateKmsConfigRequest. - * @implements ICreateKmsConfigRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set - */ - function CreateKmsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateKmsConfigRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @instance - */ - CreateKmsConfigRequest.prototype.parent = ""; - - /** - * CreateKmsConfigRequest kmsConfigId. - * @member {string} kmsConfigId - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @instance - */ - CreateKmsConfigRequest.prototype.kmsConfigId = ""; - - /** - * CreateKmsConfigRequest kmsConfig. - * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @instance - */ - CreateKmsConfigRequest.prototype.kmsConfig = null; - - /** - * Creates a new CreateKmsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest instance - */ - CreateKmsConfigRequest.create = function create(properties) { - return new CreateKmsConfigRequest(properties); - }; - - /** - * Encodes the specified CreateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKmsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.kmsConfigId != null && Object.hasOwnProperty.call(message, "kmsConfigId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsConfigId); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateKmsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.ICreateKmsConfigRequest} message CreateKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateKmsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKmsConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.kmsConfigId = reader.string(); - break; - } - case 3: { - message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateKmsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateKmsConfigRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateKmsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) - if (!$util.isString(message.kmsConfigId)) - return "kmsConfigId: string expected"; - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { - var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); - if (error) - return "kmsConfig." + error; - } - return null; - }; - - /** - * Creates a CreateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateKmsConfigRequest} CreateKmsConfigRequest - */ - CreateKmsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateKmsConfigRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateKmsConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.kmsConfigId != null) - message.kmsConfigId = String(object.kmsConfigId); - if (object.kmsConfig != null) { - if (typeof object.kmsConfig !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateKmsConfigRequest.kmsConfig: object expected"); - message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); - } - return message; - }; - - /** - * Creates a plain object from a CreateKmsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.CreateKmsConfigRequest} message CreateKmsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateKmsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.kmsConfigId = ""; - object.kmsConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.kmsConfigId != null && message.hasOwnProperty("kmsConfigId")) - object.kmsConfigId = message.kmsConfigId; - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); - return object; - }; - - /** - * Converts this CreateKmsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - CreateKmsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateKmsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateKmsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateKmsConfigRequest"; - }; - - return CreateKmsConfigRequest; - })(); - - v1.UpdateKmsConfigRequest = (function() { - - /** - * Properties of an UpdateKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateKmsConfigRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateKmsConfigRequest updateMask - * @property {google.cloud.netapp.v1.IKmsConfig|null} [kmsConfig] UpdateKmsConfigRequest kmsConfig - */ - - /** - * Constructs a new UpdateKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateKmsConfigRequest. - * @implements IUpdateKmsConfigRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set - */ - function UpdateKmsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateKmsConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @instance - */ - UpdateKmsConfigRequest.prototype.updateMask = null; - - /** - * UpdateKmsConfigRequest kmsConfig. - * @member {google.cloud.netapp.v1.IKmsConfig|null|undefined} kmsConfig - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @instance - */ - UpdateKmsConfigRequest.prototype.kmsConfig = null; - - /** - * Creates a new UpdateKmsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest instance - */ - UpdateKmsConfigRequest.create = function create(properties) { - return new UpdateKmsConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateKmsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - $root.google.cloud.netapp.v1.KmsConfig.encode(message.kmsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateKmsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateKmsConfigRequest} message UpdateKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateKmsConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateKmsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateKmsConfigRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateKmsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) { - var error = $root.google.cloud.netapp.v1.KmsConfig.verify(message.kmsConfig); - if (error) - return "kmsConfig." + error; - } - return null; - }; - - /** - * Creates an UpdateKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateKmsConfigRequest} UpdateKmsConfigRequest - */ - UpdateKmsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateKmsConfigRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateKmsConfigRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.kmsConfig != null) { - if (typeof object.kmsConfig !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateKmsConfigRequest.kmsConfig: object expected"); - message.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.fromObject(object.kmsConfig); - } - return message; - }; - - /** - * Creates a plain object from an UpdateKmsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.UpdateKmsConfigRequest} message UpdateKmsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateKmsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.kmsConfig = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - object.kmsConfig = $root.google.cloud.netapp.v1.KmsConfig.toObject(message.kmsConfig, options); - return object; - }; - - /** - * Converts this UpdateKmsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateKmsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateKmsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateKmsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateKmsConfigRequest"; - }; - - return UpdateKmsConfigRequest; - })(); - - v1.DeleteKmsConfigRequest = (function() { - - /** - * Properties of a DeleteKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteKmsConfigRequest - * @property {string|null} [name] DeleteKmsConfigRequest name - */ - - /** - * Constructs a new DeleteKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteKmsConfigRequest. - * @implements IDeleteKmsConfigRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set - */ - function DeleteKmsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteKmsConfigRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @instance - */ - DeleteKmsConfigRequest.prototype.name = ""; - - /** - * Creates a new DeleteKmsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest instance - */ - DeleteKmsConfigRequest.create = function create(properties) { - return new DeleteKmsConfigRequest(properties); - }; - - /** - * Encodes the specified DeleteKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKmsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteKmsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteKmsConfigRequest} message DeleteKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKmsConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteKmsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteKmsConfigRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteKmsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteKmsConfigRequest} DeleteKmsConfigRequest - */ - DeleteKmsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteKmsConfigRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteKmsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteKmsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.DeleteKmsConfigRequest} message DeleteKmsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteKmsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteKmsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteKmsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteKmsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteKmsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteKmsConfigRequest"; - }; - - return DeleteKmsConfigRequest; - })(); - - v1.EncryptVolumesRequest = (function() { - - /** - * Properties of an EncryptVolumesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IEncryptVolumesRequest - * @property {string|null} [name] EncryptVolumesRequest name - */ - - /** - * Constructs a new EncryptVolumesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an EncryptVolumesRequest. - * @implements IEncryptVolumesRequest - * @constructor - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set - */ - function EncryptVolumesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EncryptVolumesRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @instance - */ - EncryptVolumesRequest.prototype.name = ""; - - /** - * Creates a new EncryptVolumesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest instance - */ - EncryptVolumesRequest.create = function create(properties) { - return new EncryptVolumesRequest(properties); - }; - - /** - * Encodes the specified EncryptVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptVolumesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified EncryptVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EncryptVolumesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IEncryptVolumesRequest} message EncryptVolumesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptVolumesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptVolumesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EncryptVolumesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptVolumesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EncryptVolumesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EncryptVolumesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an EncryptVolumesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.EncryptVolumesRequest} EncryptVolumesRequest - */ - EncryptVolumesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.EncryptVolumesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.EncryptVolumesRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an EncryptVolumesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {google.cloud.netapp.v1.EncryptVolumesRequest} message EncryptVolumesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EncryptVolumesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this EncryptVolumesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @instance - * @returns {Object.} JSON object - */ - EncryptVolumesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EncryptVolumesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.EncryptVolumesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EncryptVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.EncryptVolumesRequest"; - }; - - return EncryptVolumesRequest; - })(); - - v1.VerifyKmsConfigRequest = (function() { - - /** - * Properties of a VerifyKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @interface IVerifyKmsConfigRequest - * @property {string|null} [name] VerifyKmsConfigRequest name - */ - - /** - * Constructs a new VerifyKmsConfigRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a VerifyKmsConfigRequest. - * @implements IVerifyKmsConfigRequest - * @constructor - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set - */ - function VerifyKmsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerifyKmsConfigRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @instance - */ - VerifyKmsConfigRequest.prototype.name = ""; - - /** - * Creates a new VerifyKmsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest instance - */ - VerifyKmsConfigRequest.create = function create(properties) { - return new VerifyKmsConfigRequest(properties); - }; - - /** - * Encodes the specified VerifyKmsConfigRequest message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyKmsConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified VerifyKmsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigRequest} message VerifyKmsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyKmsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyKmsConfigRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerifyKmsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyKmsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerifyKmsConfigRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerifyKmsConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a VerifyKmsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.VerifyKmsConfigRequest} VerifyKmsConfigRequest - */ - VerifyKmsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigRequest) - return object; - var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a VerifyKmsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {google.cloud.netapp.v1.VerifyKmsConfigRequest} message VerifyKmsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerifyKmsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this VerifyKmsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - VerifyKmsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VerifyKmsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.VerifyKmsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VerifyKmsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigRequest"; - }; - - return VerifyKmsConfigRequest; - })(); - - v1.VerifyKmsConfigResponse = (function() { - - /** - * Properties of a VerifyKmsConfigResponse. - * @memberof google.cloud.netapp.v1 - * @interface IVerifyKmsConfigResponse - * @property {boolean|null} [healthy] VerifyKmsConfigResponse healthy - * @property {string|null} [healthError] VerifyKmsConfigResponse healthError - * @property {string|null} [instructions] VerifyKmsConfigResponse instructions - */ - - /** - * Constructs a new VerifyKmsConfigResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a VerifyKmsConfigResponse. - * @implements IVerifyKmsConfigResponse - * @constructor - * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set - */ - function VerifyKmsConfigResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerifyKmsConfigResponse healthy. - * @member {boolean} healthy - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @instance - */ - VerifyKmsConfigResponse.prototype.healthy = false; - - /** - * VerifyKmsConfigResponse healthError. - * @member {string} healthError - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @instance - */ - VerifyKmsConfigResponse.prototype.healthError = ""; - - /** - * VerifyKmsConfigResponse instructions. - * @member {string} instructions - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @instance - */ - VerifyKmsConfigResponse.prototype.instructions = ""; - - /** - * Creates a new VerifyKmsConfigResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse instance - */ - VerifyKmsConfigResponse.create = function create(properties) { - return new VerifyKmsConfigResponse(properties); - }; - - /** - * Encodes the specified VerifyKmsConfigResponse message. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyKmsConfigResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.healthy); - if (message.healthError != null && Object.hasOwnProperty.call(message, "healthError")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthError); - if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instructions); - return writer; - }; - - /** - * Encodes the specified VerifyKmsConfigResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.VerifyKmsConfigResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {google.cloud.netapp.v1.IVerifyKmsConfigResponse} message VerifyKmsConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyKmsConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyKmsConfigResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.healthy = reader.bool(); - break; - } - case 2: { - message.healthError = reader.string(); - break; - } - case 3: { - message.instructions = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerifyKmsConfigResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyKmsConfigResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerifyKmsConfigResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerifyKmsConfigResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.healthy != null && message.hasOwnProperty("healthy")) - if (typeof message.healthy !== "boolean") - return "healthy: boolean expected"; - if (message.healthError != null && message.hasOwnProperty("healthError")) - if (!$util.isString(message.healthError)) - return "healthError: string expected"; - if (message.instructions != null && message.hasOwnProperty("instructions")) - if (!$util.isString(message.instructions)) - return "instructions: string expected"; - return null; - }; - - /** - * Creates a VerifyKmsConfigResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.VerifyKmsConfigResponse} VerifyKmsConfigResponse - */ - VerifyKmsConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.VerifyKmsConfigResponse) - return object; - var message = new $root.google.cloud.netapp.v1.VerifyKmsConfigResponse(); - if (object.healthy != null) - message.healthy = Boolean(object.healthy); - if (object.healthError != null) - message.healthError = String(object.healthError); - if (object.instructions != null) - message.instructions = String(object.instructions); - return message; - }; - - /** - * Creates a plain object from a VerifyKmsConfigResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {google.cloud.netapp.v1.VerifyKmsConfigResponse} message VerifyKmsConfigResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerifyKmsConfigResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.healthy = false; - object.healthError = ""; - object.instructions = ""; - } - if (message.healthy != null && message.hasOwnProperty("healthy")) - object.healthy = message.healthy; - if (message.healthError != null && message.hasOwnProperty("healthError")) - object.healthError = message.healthError; - if (message.instructions != null && message.hasOwnProperty("instructions")) - object.instructions = message.instructions; - return object; - }; - - /** - * Converts this VerifyKmsConfigResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @instance - * @returns {Object.} JSON object - */ - VerifyKmsConfigResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VerifyKmsConfigResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.VerifyKmsConfigResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VerifyKmsConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.VerifyKmsConfigResponse"; - }; - - return VerifyKmsConfigResponse; - })(); - - v1.KmsConfig = (function() { - - /** - * Properties of a KmsConfig. - * @memberof google.cloud.netapp.v1 - * @interface IKmsConfig - * @property {string|null} [name] KmsConfig name - * @property {string|null} [cryptoKeyName] KmsConfig cryptoKeyName - * @property {google.cloud.netapp.v1.KmsConfig.State|null} [state] KmsConfig state - * @property {string|null} [stateDetails] KmsConfig stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] KmsConfig createTime - * @property {string|null} [description] KmsConfig description - * @property {Object.|null} [labels] KmsConfig labels - * @property {string|null} [instructions] KmsConfig instructions - * @property {string|null} [serviceAccount] KmsConfig serviceAccount - */ - - /** - * Constructs a new KmsConfig. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a KmsConfig. - * @implements IKmsConfig - * @constructor - * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set - */ - function KmsConfig(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KmsConfig name. - * @member {string} name - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.name = ""; - - /** - * KmsConfig cryptoKeyName. - * @member {string} cryptoKeyName - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.cryptoKeyName = ""; - - /** - * KmsConfig state. - * @member {google.cloud.netapp.v1.KmsConfig.State} state - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.state = 0; - - /** - * KmsConfig stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.stateDetails = ""; - - /** - * KmsConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.createTime = null; - - /** - * KmsConfig description. - * @member {string} description - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.description = ""; - - /** - * KmsConfig labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.labels = $util.emptyObject; - - /** - * KmsConfig instructions. - * @member {string} instructions - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.instructions = ""; - - /** - * KmsConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - */ - KmsConfig.prototype.serviceAccount = ""; - - /** - * Creates a new KmsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {google.cloud.netapp.v1.IKmsConfig=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig instance - */ - KmsConfig.create = function create(properties) { - return new KmsConfig(properties); - }; - - /** - * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KmsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.instructions); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - return writer; - }; - - /** - * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {google.cloud.netapp.v1.IKmsConfig} message KmsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KmsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KmsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KmsConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.KmsConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.cryptoKeyName = reader.string(); - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.stateDetails = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 8: { - message.instructions = reader.string(); - break; - } - case 9: { - message.serviceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KmsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KmsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KmsConfig message. - * @function verify - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KmsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) - if (!$util.isString(message.cryptoKeyName)) - return "cryptoKeyName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.instructions != null && message.hasOwnProperty("instructions")) - if (!$util.isString(message.instructions)) - return "instructions: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - return null; - }; - - /** - * Creates a KmsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.KmsConfig} KmsConfig - */ - KmsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.KmsConfig) - return object; - var message = new $root.google.cloud.netapp.v1.KmsConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.cryptoKeyName != null) - message.cryptoKeyName = String(object.cryptoKeyName); - 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 "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "UPDATING": - case 4: - message.state = 4; - break; - case "IN_USE": - case 5: - message.state = 5; - break; - case "ERROR": - case 6: - message.state = 6; - break; - case "KEY_CHECK_PENDING": - case 7: - message.state = 7; - break; - case "KEY_NOT_REACHABLE": - case 8: - message.state = 8; - break; - case "DISABLING": - case 9: - message.state = 9; - break; - case "DISABLED": - case 10: - message.state = 10; - break; - case "MIGRATING": - case 11: - message.state = 11; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.KmsConfig.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.KmsConfig.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.instructions != null) - message.instructions = String(object.instructions); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - return message; - }; - - /** - * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {google.cloud.netapp.v1.KmsConfig} message KmsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KmsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.cryptoKeyName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateDetails = ""; - object.createTime = null; - object.description = ""; - object.instructions = ""; - object.serviceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) - object.cryptoKeyName = message.cryptoKeyName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.KmsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.KmsConfig.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.instructions != null && message.hasOwnProperty("instructions")) - object.instructions = message.instructions; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - return object; - }; - - /** - * Converts this KmsConfig to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.KmsConfig - * @instance - * @returns {Object.} JSON object - */ - KmsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KmsConfig - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.KmsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KmsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.KmsConfig"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.KmsConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} UPDATING=4 UPDATING value - * @property {number} IN_USE=5 IN_USE value - * @property {number} ERROR=6 ERROR value - * @property {number} KEY_CHECK_PENDING=7 KEY_CHECK_PENDING value - * @property {number} KEY_NOT_REACHABLE=8 KEY_NOT_REACHABLE value - * @property {number} DISABLING=9 DISABLING value - * @property {number} DISABLED=10 DISABLED value - * @property {number} MIGRATING=11 MIGRATING value - */ - KmsConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "IN_USE"] = 5; - values[valuesById[6] = "ERROR"] = 6; - values[valuesById[7] = "KEY_CHECK_PENDING"] = 7; - values[valuesById[8] = "KEY_NOT_REACHABLE"] = 8; - values[valuesById[9] = "DISABLING"] = 9; - values[valuesById[10] = "DISABLED"] = 10; - values[valuesById[11] = "MIGRATING"] = 11; - return values; - })(); - - return KmsConfig; - })(); - - v1.ExecuteOntapPostRequest = (function() { - - /** - * Properties of an ExecuteOntapPostRequest. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapPostRequest - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostRequest body - * @property {string|null} [ontapPath] ExecuteOntapPostRequest ontapPath - */ - - /** - * Constructs a new ExecuteOntapPostRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapPostRequest. - * @implements IExecuteOntapPostRequest - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set - */ - function ExecuteOntapPostRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapPostRequest body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @instance - */ - ExecuteOntapPostRequest.prototype.body = null; - - /** - * ExecuteOntapPostRequest ontapPath. - * @member {string} ontapPath - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @instance - */ - ExecuteOntapPostRequest.prototype.ontapPath = ""; - - /** - * Creates a new ExecuteOntapPostRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest instance - */ - ExecuteOntapPostRequest.create = function create(properties) { - return new ExecuteOntapPostRequest(properties); - }; - - /** - * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPostRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPostRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPostRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ontapPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPostRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapPostRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapPostRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - if (!$util.isString(message.ontapPath)) - return "ontapPath: string expected"; - return null; - }; - - /** - * Creates an ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest - */ - ExecuteOntapPostRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostRequest.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - if (object.ontapPath != null) - message.ontapPath = String(object.ontapPath); - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapPostRequest} message ExecuteOntapPostRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapPostRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.body = null; - object.ontapPath = ""; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - object.ontapPath = message.ontapPath; - return object; - }; - - /** - * Converts this ExecuteOntapPostRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapPostRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapPostRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapPostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostRequest"; - }; - - return ExecuteOntapPostRequest; - })(); - - v1.ExecuteOntapPostResponse = (function() { - - /** - * Properties of an ExecuteOntapPostResponse. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapPostResponse - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostResponse body - */ - - /** - * Constructs a new ExecuteOntapPostResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapPostResponse. - * @implements IExecuteOntapPostResponse - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set - */ - function ExecuteOntapPostResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapPostResponse body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @instance - */ - ExecuteOntapPostResponse.prototype.body = null; - - /** - * Creates a new ExecuteOntapPostResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse instance - */ - ExecuteOntapPostResponse.create = function create(properties) { - return new ExecuteOntapPostResponse(properties); - }; - - /** - * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPostResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPostResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPostResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPostResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapPostResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapPostResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - return null; - }; - - /** - * Creates an ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse - */ - ExecuteOntapPostResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostResponse.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} message ExecuteOntapPostResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapPostResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.body = null; - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - return object; - }; - - /** - * Converts this ExecuteOntapPostResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapPostResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapPostResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapPostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostResponse"; - }; - - return ExecuteOntapPostResponse; - })(); - - v1.ExecuteOntapGetRequest = (function() { - - /** - * Properties of an ExecuteOntapGetRequest. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapGetRequest - * @property {string|null} [ontapPath] ExecuteOntapGetRequest ontapPath - */ - - /** - * Constructs a new ExecuteOntapGetRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapGetRequest. - * @implements IExecuteOntapGetRequest - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set - */ - function ExecuteOntapGetRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapGetRequest ontapPath. - * @member {string} ontapPath - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @instance - */ - ExecuteOntapGetRequest.prototype.ontapPath = ""; - - /** - * Creates a new ExecuteOntapGetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest instance - */ - ExecuteOntapGetRequest.create = function create(properties) { - return new ExecuteOntapGetRequest(properties); - }; - - /** - * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapGetRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ontapPath); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapGetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapGetRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ontapPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapGetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapGetRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapGetRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - if (!$util.isString(message.ontapPath)) - return "ontapPath: string expected"; - return null; - }; - - /** - * Creates an ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest - */ - ExecuteOntapGetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); - if (object.ontapPath != null) - message.ontapPath = String(object.ontapPath); - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapGetRequest} message ExecuteOntapGetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapGetRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.ontapPath = ""; - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - object.ontapPath = message.ontapPath; - return object; - }; - - /** - * Converts this ExecuteOntapGetRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapGetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapGetRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapGetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetRequest"; - }; - - return ExecuteOntapGetRequest; - })(); - - v1.ExecuteOntapGetResponse = (function() { - - /** - * Properties of an ExecuteOntapGetResponse. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapGetResponse - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapGetResponse body - */ - - /** - * Constructs a new ExecuteOntapGetResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapGetResponse. - * @implements IExecuteOntapGetResponse - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set - */ - function ExecuteOntapGetResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapGetResponse body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @instance - */ - ExecuteOntapGetResponse.prototype.body = null; - - /** - * Creates a new ExecuteOntapGetResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse instance - */ - ExecuteOntapGetResponse.create = function create(properties) { - return new ExecuteOntapGetResponse(properties); - }; - - /** - * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapGetResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapGetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapGetResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapGetResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapGetResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapGetResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - return null; - }; - - /** - * Creates an ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse - */ - ExecuteOntapGetResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapGetResponse.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} message ExecuteOntapGetResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapGetResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.body = null; - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - return object; - }; - - /** - * Converts this ExecuteOntapGetResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapGetResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapGetResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapGetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetResponse"; - }; - - return ExecuteOntapGetResponse; - })(); - - v1.ExecuteOntapDeleteRequest = (function() { - - /** - * Properties of an ExecuteOntapDeleteRequest. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapDeleteRequest - * @property {string|null} [ontapPath] ExecuteOntapDeleteRequest ontapPath - */ - - /** - * Constructs a new ExecuteOntapDeleteRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapDeleteRequest. - * @implements IExecuteOntapDeleteRequest - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set - */ - function ExecuteOntapDeleteRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapDeleteRequest ontapPath. - * @member {string} ontapPath - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @instance - */ - ExecuteOntapDeleteRequest.prototype.ontapPath = ""; - - /** - * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest instance - */ - ExecuteOntapDeleteRequest.create = function create(properties) { - return new ExecuteOntapDeleteRequest(properties); - }; - - /** - * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapDeleteRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ontapPath); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapDeleteRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.ontapPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapDeleteRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapDeleteRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapDeleteRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - if (!$util.isString(message.ontapPath)) - return "ontapPath: string expected"; - return null; - }; - - /** - * Creates an ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest - */ - ExecuteOntapDeleteRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); - if (object.ontapPath != null) - message.ontapPath = String(object.ontapPath); - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapDeleteRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.ontapPath = ""; - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - object.ontapPath = message.ontapPath; - return object; - }; - - /** - * Converts this ExecuteOntapDeleteRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapDeleteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapDeleteRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapDeleteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteRequest"; - }; - - return ExecuteOntapDeleteRequest; - })(); - - v1.ExecuteOntapDeleteResponse = (function() { - - /** - * Properties of an ExecuteOntapDeleteResponse. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapDeleteResponse - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapDeleteResponse body - */ - - /** - * Constructs a new ExecuteOntapDeleteResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapDeleteResponse. - * @implements IExecuteOntapDeleteResponse - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set - */ - function ExecuteOntapDeleteResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapDeleteResponse body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @instance - */ - ExecuteOntapDeleteResponse.prototype.body = null; - - /** - * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse instance - */ - ExecuteOntapDeleteResponse.create = function create(properties) { - return new ExecuteOntapDeleteResponse(properties); - }; - - /** - * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapDeleteResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapDeleteResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapDeleteResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapDeleteResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapDeleteResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapDeleteResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - return null; - }; - - /** - * Creates an ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse - */ - ExecuteOntapDeleteResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapDeleteResponse.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapDeleteResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.body = null; - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - return object; - }; - - /** - * Converts this ExecuteOntapDeleteResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapDeleteResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapDeleteResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapDeleteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteResponse"; - }; - - return ExecuteOntapDeleteResponse; - })(); - - v1.ExecuteOntapPatchRequest = (function() { - - /** - * Properties of an ExecuteOntapPatchRequest. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapPatchRequest - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchRequest body - * @property {string|null} [ontapPath] ExecuteOntapPatchRequest ontapPath - */ - - /** - * Constructs a new ExecuteOntapPatchRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapPatchRequest. - * @implements IExecuteOntapPatchRequest - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set - */ - function ExecuteOntapPatchRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapPatchRequest body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @instance - */ - ExecuteOntapPatchRequest.prototype.body = null; - - /** - * ExecuteOntapPatchRequest ontapPath. - * @member {string} ontapPath - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @instance - */ - ExecuteOntapPatchRequest.prototype.ontapPath = ""; - - /** - * Creates a new ExecuteOntapPatchRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest instance - */ - ExecuteOntapPatchRequest.create = function create(properties) { - return new ExecuteOntapPatchRequest(properties); - }; - - /** - * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPatchRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPatchRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPatchRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ontapPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPatchRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapPatchRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapPatchRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - if (!$util.isString(message.ontapPath)) - return "ontapPath: string expected"; - return null; - }; - - /** - * Creates an ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest - */ - ExecuteOntapPatchRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchRequest.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - if (object.ontapPath != null) - message.ontapPath = String(object.ontapPath); - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapPatchRequest} message ExecuteOntapPatchRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapPatchRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.body = null; - object.ontapPath = ""; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) - object.ontapPath = message.ontapPath; - return object; - }; - - /** - * Converts this ExecuteOntapPatchRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapPatchRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapPatchRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapPatchRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchRequest"; - }; - - return ExecuteOntapPatchRequest; - })(); - - v1.ExecuteOntapPatchResponse = (function() { - - /** - * Properties of an ExecuteOntapPatchResponse. - * @memberof google.cloud.netapp.v1 - * @interface IExecuteOntapPatchResponse - * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchResponse body - */ - - /** - * Constructs a new ExecuteOntapPatchResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExecuteOntapPatchResponse. - * @implements IExecuteOntapPatchResponse - * @constructor - * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set - */ - function ExecuteOntapPatchResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteOntapPatchResponse body. - * @member {google.protobuf.IStruct|null|undefined} body - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @instance - */ - ExecuteOntapPatchResponse.prototype.body = null; - - /** - * Creates a new ExecuteOntapPatchResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse instance - */ - ExecuteOntapPatchResponse.create = function create(properties) { - return new ExecuteOntapPatchResponse(properties); - }; - - /** - * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPatchResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteOntapPatchResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPatchResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteOntapPatchResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteOntapPatchResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteOntapPatchResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.google.protobuf.Struct.verify(message.body); - if (error) - return "body." + error; - } - return null; - }; - - /** - * Creates an ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse - */ - ExecuteOntapPatchResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchResponse.body: object expected"); - message.body = $root.google.protobuf.Struct.fromObject(object.body); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} message ExecuteOntapPatchResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteOntapPatchResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.body = null; - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.google.protobuf.Struct.toObject(message.body, options); - return object; - }; - - /** - * Converts this ExecuteOntapPatchResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteOntapPatchResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteOntapPatchResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteOntapPatchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchResponse"; - }; - - return ExecuteOntapPatchResponse; - })(); - - v1.ListQuotaRulesRequest = (function() { - - /** - * Properties of a ListQuotaRulesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListQuotaRulesRequest - * @property {string|null} [parent] ListQuotaRulesRequest parent - * @property {number|null} [pageSize] ListQuotaRulesRequest pageSize - * @property {string|null} [pageToken] ListQuotaRulesRequest pageToken - * @property {string|null} [filter] ListQuotaRulesRequest filter - * @property {string|null} [orderBy] ListQuotaRulesRequest orderBy - */ - - /** - * Constructs a new ListQuotaRulesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListQuotaRulesRequest. - * @implements IListQuotaRulesRequest - * @constructor - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set - */ - function ListQuotaRulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListQuotaRulesRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.parent = ""; - - /** - * ListQuotaRulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.pageSize = 0; - - /** - * ListQuotaRulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.pageToken = ""; - - /** - * ListQuotaRulesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.filter = ""; - - /** - * ListQuotaRulesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListQuotaRulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest instance - */ - ListQuotaRulesRequest.create = function create(properties) { - return new ListQuotaRulesRequest(properties); - }; - - /** - * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListQuotaRulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListQuotaRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListQuotaRulesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListQuotaRulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListQuotaRulesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListQuotaRulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest - */ - ListQuotaRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {google.cloud.netapp.v1.ListQuotaRulesRequest} message ListQuotaRulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListQuotaRulesRequest.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; - }; - - /** - * Converts this ListQuotaRulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListQuotaRulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListQuotaRulesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListQuotaRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesRequest"; - }; - - return ListQuotaRulesRequest; - })(); - - v1.ListQuotaRulesResponse = (function() { - - /** - * Properties of a ListQuotaRulesResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListQuotaRulesResponse - * @property {Array.|null} [quotaRules] ListQuotaRulesResponse quotaRules - * @property {string|null} [nextPageToken] ListQuotaRulesResponse nextPageToken - * @property {Array.|null} [unreachable] ListQuotaRulesResponse unreachable - */ - - /** - * Constructs a new ListQuotaRulesResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListQuotaRulesResponse. - * @implements IListQuotaRulesResponse - * @constructor - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set - */ - function ListQuotaRulesResponse(properties) { - this.quotaRules = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListQuotaRulesResponse quotaRules. - * @member {Array.} quotaRules - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - */ - ListQuotaRulesResponse.prototype.quotaRules = $util.emptyArray; - - /** - * ListQuotaRulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - */ - ListQuotaRulesResponse.prototype.nextPageToken = ""; - - /** - * ListQuotaRulesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - */ - ListQuotaRulesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListQuotaRulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse instance - */ - ListQuotaRulesResponse.create = function create(properties) { - return new ListQuotaRulesResponse(properties); - }; - - /** - * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListQuotaRulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quotaRules != null && message.quotaRules.length) - for (var i = 0; i < message.quotaRules.length; ++i) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListQuotaRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListQuotaRulesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.quotaRules && message.quotaRules.length)) - message.quotaRules = []; - message.quotaRules.push($root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListQuotaRulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListQuotaRulesResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListQuotaRulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quotaRules != null && message.hasOwnProperty("quotaRules")) { - if (!Array.isArray(message.quotaRules)) - return "quotaRules: array expected"; - for (var i = 0; i < message.quotaRules.length; ++i) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRules[i]); - if (error) - return "quotaRules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse - */ - ListQuotaRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); - if (object.quotaRules) { - if (!Array.isArray(object.quotaRules)) - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: array expected"); - message.quotaRules = []; - for (var i = 0; i < object.quotaRules.length; ++i) { - if (typeof object.quotaRules[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: object expected"); - message.quotaRules[i] = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} message ListQuotaRulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListQuotaRulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.quotaRules = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.quotaRules && message.quotaRules.length) { - object.quotaRules = []; - for (var j = 0; j < message.quotaRules.length; ++j) - object.quotaRules[j] = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListQuotaRulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListQuotaRulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListQuotaRulesResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListQuotaRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesResponse"; - }; - - return ListQuotaRulesResponse; - })(); - - v1.GetQuotaRuleRequest = (function() { - - /** - * Properties of a GetQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetQuotaRuleRequest - * @property {string|null} [name] GetQuotaRuleRequest name - */ - - /** - * Constructs a new GetQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetQuotaRuleRequest. - * @implements IGetQuotaRuleRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set - */ - function GetQuotaRuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetQuotaRuleRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @instance - */ - GetQuotaRuleRequest.prototype.name = ""; - - /** - * Creates a new GetQuotaRuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest instance - */ - GetQuotaRuleRequest.create = function create(properties) { - return new GetQuotaRuleRequest(properties); - }; - - /** - * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetQuotaRuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetQuotaRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetQuotaRuleRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetQuotaRuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest - */ - GetQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetQuotaRuleRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.GetQuotaRuleRequest} message GetQuotaRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetQuotaRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetQuotaRuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetQuotaRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetQuotaRuleRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetQuotaRuleRequest"; - }; - - return GetQuotaRuleRequest; - })(); - - v1.CreateQuotaRuleRequest = (function() { - - /** - * Properties of a CreateQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateQuotaRuleRequest - * @property {string|null} [parent] CreateQuotaRuleRequest parent - * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] CreateQuotaRuleRequest quotaRule - * @property {string|null} [quotaRuleId] CreateQuotaRuleRequest quotaRuleId - */ - - /** - * Constructs a new CreateQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateQuotaRuleRequest. - * @implements ICreateQuotaRuleRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set - */ - function CreateQuotaRuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateQuotaRuleRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - */ - CreateQuotaRuleRequest.prototype.parent = ""; - - /** - * CreateQuotaRuleRequest quotaRule. - * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - */ - CreateQuotaRuleRequest.prototype.quotaRule = null; - - /** - * CreateQuotaRuleRequest quotaRuleId. - * @member {string} quotaRuleId - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - */ - CreateQuotaRuleRequest.prototype.quotaRuleId = ""; - - /** - * Creates a new CreateQuotaRuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest instance - */ - CreateQuotaRuleRequest.create = function create(properties) { - return new CreateQuotaRuleRequest(properties); - }; - - /** - * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateQuotaRuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.quotaRuleId != null && Object.hasOwnProperty.call(message, "quotaRuleId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.quotaRuleId); - return writer; - }; - - /** - * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateQuotaRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.quotaRuleId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateQuotaRuleRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateQuotaRuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); - if (error) - return "quotaRule." + error; - } - if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) - if (!$util.isString(message.quotaRuleId)) - return "quotaRuleId: string expected"; - return null; - }; - - /** - * Creates a CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest - */ - CreateQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateQuotaRuleRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.quotaRule != null) { - if (typeof object.quotaRule !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateQuotaRuleRequest.quotaRule: object expected"); - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); - } - if (object.quotaRuleId != null) - message.quotaRuleId = String(object.quotaRuleId); - return message; - }; - - /** - * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.CreateQuotaRuleRequest} message CreateQuotaRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateQuotaRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.quotaRule = null; - object.quotaRuleId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) - object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); - if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) - object.quotaRuleId = message.quotaRuleId; - return object; - }; - - /** - * Converts this CreateQuotaRuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - * @returns {Object.} JSON object - */ - CreateQuotaRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateQuotaRuleRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateQuotaRuleRequest"; - }; - - return CreateQuotaRuleRequest; - })(); - - v1.UpdateQuotaRuleRequest = (function() { - - /** - * Properties of an UpdateQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateQuotaRuleRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQuotaRuleRequest updateMask - * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] UpdateQuotaRuleRequest quotaRule - */ - - /** - * Constructs a new UpdateQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateQuotaRuleRequest. - * @implements IUpdateQuotaRuleRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set - */ - function UpdateQuotaRuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateQuotaRuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @instance - */ - UpdateQuotaRuleRequest.prototype.updateMask = null; - - /** - * UpdateQuotaRuleRequest quotaRule. - * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @instance - */ - UpdateQuotaRuleRequest.prototype.quotaRule = null; - - /** - * Creates a new UpdateQuotaRuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest instance - */ - UpdateQuotaRuleRequest.create = function create(properties) { - return new UpdateQuotaRuleRequest(properties); - }; - - /** - * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateQuotaRuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateQuotaRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateQuotaRuleRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateQuotaRuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); - if (error) - return "quotaRule." + error; - } - return null; - }; - - /** - * Creates an UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest - */ - UpdateQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.quotaRule != null) { - if (typeof object.quotaRule !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.quotaRule: object expected"); - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); - } - return message; - }; - - /** - * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.UpdateQuotaRuleRequest} message UpdateQuotaRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateQuotaRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.quotaRule = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) - object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); - return object; - }; - - /** - * Converts this UpdateQuotaRuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateQuotaRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateQuotaRuleRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateQuotaRuleRequest"; - }; - - return UpdateQuotaRuleRequest; - })(); - - v1.DeleteQuotaRuleRequest = (function() { - - /** - * Properties of a DeleteQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteQuotaRuleRequest - * @property {string|null} [name] DeleteQuotaRuleRequest name - */ - - /** - * Constructs a new DeleteQuotaRuleRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteQuotaRuleRequest. - * @implements IDeleteQuotaRuleRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set - */ - function DeleteQuotaRuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteQuotaRuleRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @instance - */ - DeleteQuotaRuleRequest.prototype.name = ""; - - /** - * Creates a new DeleteQuotaRuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest instance - */ - DeleteQuotaRuleRequest.create = function create(properties) { - return new DeleteQuotaRuleRequest(properties); - }; - - /** - * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteQuotaRuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteQuotaRuleRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteQuotaRuleRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteQuotaRuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest - */ - DeleteQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {google.cloud.netapp.v1.DeleteQuotaRuleRequest} message DeleteQuotaRuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteQuotaRuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteQuotaRuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteQuotaRuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteQuotaRuleRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteQuotaRuleRequest"; - }; - - return DeleteQuotaRuleRequest; - })(); - - v1.QuotaRule = (function() { - - /** - * Properties of a QuotaRule. - * @memberof google.cloud.netapp.v1 - * @interface IQuotaRule - * @property {string|null} [name] QuotaRule name - * @property {string|null} [target] QuotaRule target - * @property {google.cloud.netapp.v1.QuotaRule.Type|null} [type] QuotaRule type - * @property {number|null} [diskLimitMib] QuotaRule diskLimitMib - * @property {google.cloud.netapp.v1.QuotaRule.State|null} [state] QuotaRule state - * @property {string|null} [stateDetails] QuotaRule stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] QuotaRule createTime - * @property {string|null} [description] QuotaRule description - * @property {Object.|null} [labels] QuotaRule labels - */ - - /** - * Constructs a new QuotaRule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a QuotaRule. - * @implements IQuotaRule - * @constructor - * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set - */ - function QuotaRule(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuotaRule name. - * @member {string} name - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.name = ""; - - /** - * QuotaRule target. - * @member {string} target - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.target = ""; - - /** - * QuotaRule type. - * @member {google.cloud.netapp.v1.QuotaRule.Type} type - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.type = 0; - - /** - * QuotaRule diskLimitMib. - * @member {number} diskLimitMib - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.diskLimitMib = 0; - - /** - * QuotaRule state. - * @member {google.cloud.netapp.v1.QuotaRule.State} state - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.state = 0; - - /** - * QuotaRule stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.stateDetails = ""; - - /** - * QuotaRule createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.createTime = null; - - /** - * QuotaRule description. - * @member {string} description - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.description = ""; - - /** - * QuotaRule labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.labels = $util.emptyObject; - - /** - * Creates a new QuotaRule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule instance - */ - QuotaRule.create = function create(properties) { - return new QuotaRule(properties); - }; - - /** - * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.diskLimitMib != null && Object.hasOwnProperty.call(message, "diskLimitMib")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.diskLimitMib); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuotaRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.QuotaRule(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.target = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - message.diskLimitMib = reader.int32(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.stateDetails = reader.string(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.description = reader.string(); - break; - } - case 10: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuotaRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuotaRule message. - * @function verify - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuotaRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: 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.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) - if (!$util.isInteger(message.diskLimitMib)) - return "diskLimitMib: integer expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a QuotaRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule - */ - QuotaRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.QuotaRule) - return object; - var message = new $root.google.cloud.netapp.v1.QuotaRule(); - if (object.name != null) - message.name = String(object.name); - if (object.target != null) - message.target = String(object.target); - 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 "INDIVIDUAL_USER_QUOTA": - case 1: - message.type = 1; - break; - case "INDIVIDUAL_GROUP_QUOTA": - case 2: - message.type = 2; - break; - case "DEFAULT_USER_QUOTA": - case 3: - message.type = 3; - break; - case "DEFAULT_GROUP_QUOTA": - case 4: - message.type = 4; - break; - } - if (object.diskLimitMib != null) - message.diskLimitMib = object.diskLimitMib | 0; - 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 "UPDATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "READY": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.QuotaRule.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.QuotaRule.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {google.cloud.netapp.v1.QuotaRule} message QuotaRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuotaRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.target = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.diskLimitMib = 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateDetails = ""; - object.createTime = null; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] : message.type; - if (message.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) - object.diskLimitMib = message.diskLimitMib; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.QuotaRule.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this QuotaRule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - * @returns {Object.} JSON object - */ - QuotaRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QuotaRule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.QuotaRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QuotaRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.QuotaRule"; - }; - - /** - * Type enum. - * @name google.cloud.netapp.v1.QuotaRule.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INDIVIDUAL_USER_QUOTA=1 INDIVIDUAL_USER_QUOTA value - * @property {number} INDIVIDUAL_GROUP_QUOTA=2 INDIVIDUAL_GROUP_QUOTA value - * @property {number} DEFAULT_USER_QUOTA=3 DEFAULT_USER_QUOTA value - * @property {number} DEFAULT_GROUP_QUOTA=4 DEFAULT_GROUP_QUOTA value - */ - QuotaRule.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INDIVIDUAL_USER_QUOTA"] = 1; - values[valuesById[2] = "INDIVIDUAL_GROUP_QUOTA"] = 2; - values[valuesById[3] = "DEFAULT_USER_QUOTA"] = 3; - values[valuesById[4] = "DEFAULT_GROUP_QUOTA"] = 4; - return values; - })(); - - /** - * State enum. - * @name google.cloud.netapp.v1.QuotaRule.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} UPDATING=2 UPDATING value - * @property {number} DELETING=3 DELETING value - * @property {number} READY=4 READY value - * @property {number} ERROR=5 ERROR value - */ - QuotaRule.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "UPDATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "READY"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; - })(); - - return QuotaRule; - })(); - - v1.TransferStats = (function() { - - /** - * Properties of a TransferStats. - * @memberof google.cloud.netapp.v1 - * @interface ITransferStats - * @property {number|Long|null} [transferBytes] TransferStats transferBytes - * @property {google.protobuf.IDuration|null} [totalTransferDuration] TransferStats totalTransferDuration - * @property {number|Long|null} [lastTransferBytes] TransferStats lastTransferBytes - * @property {google.protobuf.IDuration|null} [lastTransferDuration] TransferStats lastTransferDuration - * @property {google.protobuf.IDuration|null} [lagDuration] TransferStats lagDuration - * @property {google.protobuf.ITimestamp|null} [updateTime] TransferStats updateTime - * @property {google.protobuf.ITimestamp|null} [lastTransferEndTime] TransferStats lastTransferEndTime - * @property {string|null} [lastTransferError] TransferStats lastTransferError - */ - - /** - * Constructs a new TransferStats. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a TransferStats. - * @implements ITransferStats - * @constructor - * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set - */ - function TransferStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransferStats transferBytes. - * @member {number|Long|null|undefined} transferBytes - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.transferBytes = null; - - /** - * TransferStats totalTransferDuration. - * @member {google.protobuf.IDuration|null|undefined} totalTransferDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.totalTransferDuration = null; - - /** - * TransferStats lastTransferBytes. - * @member {number|Long|null|undefined} lastTransferBytes - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferBytes = null; - - /** - * TransferStats lastTransferDuration. - * @member {google.protobuf.IDuration|null|undefined} lastTransferDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferDuration = null; - - /** - * TransferStats lagDuration. - * @member {google.protobuf.IDuration|null|undefined} lagDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lagDuration = null; - - /** - * TransferStats updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.updateTime = null; - - /** - * TransferStats lastTransferEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastTransferEndTime - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferEndTime = null; - - /** - * TransferStats lastTransferError. - * @member {string|null|undefined} lastTransferError - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferError = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_transferBytes", { - get: $util.oneOfGetter($oneOfFields = ["transferBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_totalTransferDuration", { - get: $util.oneOfGetter($oneOfFields = ["totalTransferDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferBytes", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferDuration", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lagDuration", { - get: $util.oneOfGetter($oneOfFields = ["lagDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferEndTime", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferError", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferError"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TransferStats instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats instance - */ - TransferStats.create = function create(properties) { - return new TransferStats(properties); - }; - - /** - * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.transferBytes != null && Object.hasOwnProperty.call(message, "transferBytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transferBytes); - if (message.totalTransferDuration != null && Object.hasOwnProperty.call(message, "totalTransferDuration")) - $root.google.protobuf.Duration.encode(message.totalTransferDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastTransferBytes != null && Object.hasOwnProperty.call(message, "lastTransferBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastTransferBytes); - if (message.lastTransferDuration != null && Object.hasOwnProperty.call(message, "lastTransferDuration")) - $root.google.protobuf.Duration.encode(message.lastTransferDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lagDuration != null && Object.hasOwnProperty.call(message, "lagDuration")) - $root.google.protobuf.Duration.encode(message.lagDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastTransferEndTime != null && Object.hasOwnProperty.call(message, "lastTransferEndTime")) - $root.google.protobuf.Timestamp.encode(message.lastTransferEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastTransferError != null && Object.hasOwnProperty.call(message, "lastTransferError")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastTransferError); - return writer; - }; - - /** - * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransferStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferStats.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TransferStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.transferBytes = reader.int64(); - break; - } - case 2: { - message.totalTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastTransferBytes = reader.int64(); - break; - } - case 4: { - message.lastTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lagDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.lastTransferEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.lastTransferError = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TransferStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TransferStats message. - * @function verify - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TransferStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { - properties._transferBytes = 1; - if (!$util.isInteger(message.transferBytes) && !(message.transferBytes && $util.isInteger(message.transferBytes.low) && $util.isInteger(message.transferBytes.high))) - return "transferBytes: integer|Long expected"; - } - if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { - properties._totalTransferDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.totalTransferDuration); - if (error) - return "totalTransferDuration." + error; - } - } - if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { - properties._lastTransferBytes = 1; - if (!$util.isInteger(message.lastTransferBytes) && !(message.lastTransferBytes && $util.isInteger(message.lastTransferBytes.low) && $util.isInteger(message.lastTransferBytes.high))) - return "lastTransferBytes: integer|Long expected"; - } - if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { - properties._lastTransferDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.lastTransferDuration); - if (error) - return "lastTransferDuration." + error; - } - } - if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { - properties._lagDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.lagDuration); - if (error) - return "lagDuration." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { - properties._lastTransferEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.lastTransferEndTime); - if (error) - return "lastTransferEndTime." + error; - } - } - if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { - properties._lastTransferError = 1; - if (!$util.isString(message.lastTransferError)) - return "lastTransferError: string expected"; - } - return null; - }; - - /** - * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats - */ - TransferStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.TransferStats) - return object; - var message = new $root.google.cloud.netapp.v1.TransferStats(); - if (object.transferBytes != null) - if ($util.Long) - (message.transferBytes = $util.Long.fromValue(object.transferBytes)).unsigned = false; - else if (typeof object.transferBytes === "string") - message.transferBytes = parseInt(object.transferBytes, 10); - else if (typeof object.transferBytes === "number") - message.transferBytes = object.transferBytes; - else if (typeof object.transferBytes === "object") - message.transferBytes = new $util.LongBits(object.transferBytes.low >>> 0, object.transferBytes.high >>> 0).toNumber(); - if (object.totalTransferDuration != null) { - if (typeof object.totalTransferDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.totalTransferDuration: object expected"); - message.totalTransferDuration = $root.google.protobuf.Duration.fromObject(object.totalTransferDuration); - } - if (object.lastTransferBytes != null) - if ($util.Long) - (message.lastTransferBytes = $util.Long.fromValue(object.lastTransferBytes)).unsigned = false; - else if (typeof object.lastTransferBytes === "string") - message.lastTransferBytes = parseInt(object.lastTransferBytes, 10); - else if (typeof object.lastTransferBytes === "number") - message.lastTransferBytes = object.lastTransferBytes; - else if (typeof object.lastTransferBytes === "object") - message.lastTransferBytes = new $util.LongBits(object.lastTransferBytes.low >>> 0, object.lastTransferBytes.high >>> 0).toNumber(); - if (object.lastTransferDuration != null) { - if (typeof object.lastTransferDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferDuration: object expected"); - message.lastTransferDuration = $root.google.protobuf.Duration.fromObject(object.lastTransferDuration); - } - if (object.lagDuration != null) { - if (typeof object.lagDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lagDuration: object expected"); - message.lagDuration = $root.google.protobuf.Duration.fromObject(object.lagDuration); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastTransferEndTime != null) { - if (typeof object.lastTransferEndTime !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferEndTime: object expected"); - message.lastTransferEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastTransferEndTime); - } - if (object.lastTransferError != null) - message.lastTransferError = String(object.lastTransferError); - return message; - }; - - /** - * Creates a plain object from a TransferStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {google.cloud.netapp.v1.TransferStats} message TransferStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TransferStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { - if (typeof message.transferBytes === "number") - object.transferBytes = options.longs === String ? String(message.transferBytes) : message.transferBytes; - else - object.transferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transferBytes) : options.longs === Number ? new $util.LongBits(message.transferBytes.low >>> 0, message.transferBytes.high >>> 0).toNumber() : message.transferBytes; - if (options.oneofs) - object._transferBytes = "transferBytes"; - } - if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { - object.totalTransferDuration = $root.google.protobuf.Duration.toObject(message.totalTransferDuration, options); - if (options.oneofs) - object._totalTransferDuration = "totalTransferDuration"; - } - if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { - if (typeof message.lastTransferBytes === "number") - object.lastTransferBytes = options.longs === String ? String(message.lastTransferBytes) : message.lastTransferBytes; - else - object.lastTransferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.lastTransferBytes) : options.longs === Number ? new $util.LongBits(message.lastTransferBytes.low >>> 0, message.lastTransferBytes.high >>> 0).toNumber() : message.lastTransferBytes; - if (options.oneofs) - object._lastTransferBytes = "lastTransferBytes"; - } - if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { - object.lastTransferDuration = $root.google.protobuf.Duration.toObject(message.lastTransferDuration, options); - if (options.oneofs) - object._lastTransferDuration = "lastTransferDuration"; - } - if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { - object.lagDuration = $root.google.protobuf.Duration.toObject(message.lagDuration, options); - if (options.oneofs) - object._lagDuration = "lagDuration"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { - object.lastTransferEndTime = $root.google.protobuf.Timestamp.toObject(message.lastTransferEndTime, options); - if (options.oneofs) - object._lastTransferEndTime = "lastTransferEndTime"; - } - if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { - object.lastTransferError = message.lastTransferError; - if (options.oneofs) - object._lastTransferError = "lastTransferError"; - } - return object; - }; - - /** - * Converts this TransferStats to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - * @returns {Object.} JSON object - */ - TransferStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TransferStats - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.TransferStats - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TransferStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.TransferStats"; - }; - - return TransferStats; - })(); - - v1.Replication = (function() { - - /** - * Properties of a Replication. - * @memberof google.cloud.netapp.v1 - * @interface IReplication - * @property {string|null} [name] Replication name - * @property {google.cloud.netapp.v1.Replication.State|null} [state] Replication state - * @property {string|null} [stateDetails] Replication stateDetails - * @property {google.cloud.netapp.v1.Replication.ReplicationRole|null} [role] Replication role - * @property {google.cloud.netapp.v1.Replication.ReplicationSchedule|null} [replicationSchedule] Replication replicationSchedule - * @property {google.cloud.netapp.v1.Replication.MirrorState|null} [mirrorState] Replication mirrorState - * @property {boolean|null} [healthy] Replication healthy - * @property {google.protobuf.ITimestamp|null} [createTime] Replication createTime - * @property {string|null} [destinationVolume] Replication destinationVolume - * @property {google.cloud.netapp.v1.ITransferStats|null} [transferStats] Replication transferStats - * @property {Object.|null} [labels] Replication labels - * @property {string|null} [description] Replication description - * @property {google.cloud.netapp.v1.IDestinationVolumeParameters|null} [destinationVolumeParameters] Replication destinationVolumeParameters - * @property {string|null} [sourceVolume] Replication sourceVolume - * @property {google.cloud.netapp.v1.IHybridPeeringDetails|null} [hybridPeeringDetails] Replication hybridPeeringDetails - * @property {string|null} [clusterLocation] Replication clusterLocation - * @property {google.cloud.netapp.v1.Replication.HybridReplicationType|null} [hybridReplicationType] Replication hybridReplicationType - * @property {google.cloud.netapp.v1.IUserCommands|null} [hybridReplicationUserCommands] Replication hybridReplicationUserCommands - */ - - /** - * Constructs a new Replication. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Replication. - * @implements IReplication - * @constructor - * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set - */ - function Replication(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Replication name. - * @member {string} name - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.name = ""; - - /** - * Replication state. - * @member {google.cloud.netapp.v1.Replication.State} state - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.state = 0; - - /** - * Replication stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.stateDetails = ""; - - /** - * Replication role. - * @member {google.cloud.netapp.v1.Replication.ReplicationRole} role - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.role = 0; - - /** - * Replication replicationSchedule. - * @member {google.cloud.netapp.v1.Replication.ReplicationSchedule} replicationSchedule - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.replicationSchedule = 0; - - /** - * Replication mirrorState. - * @member {google.cloud.netapp.v1.Replication.MirrorState} mirrorState - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.mirrorState = 0; - - /** - * Replication healthy. - * @member {boolean|null|undefined} healthy - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.healthy = null; - - /** - * Replication createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.createTime = null; - - /** - * Replication destinationVolume. - * @member {string} destinationVolume - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.destinationVolume = ""; - - /** - * Replication transferStats. - * @member {google.cloud.netapp.v1.ITransferStats|null|undefined} transferStats - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.transferStats = null; - - /** - * Replication labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.labels = $util.emptyObject; - - /** - * Replication description. - * @member {string|null|undefined} description - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.description = null; - - /** - * Replication destinationVolumeParameters. - * @member {google.cloud.netapp.v1.IDestinationVolumeParameters|null|undefined} destinationVolumeParameters - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.destinationVolumeParameters = null; - - /** - * Replication sourceVolume. - * @member {string} sourceVolume - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.sourceVolume = ""; - - /** - * Replication hybridPeeringDetails. - * @member {google.cloud.netapp.v1.IHybridPeeringDetails|null|undefined} hybridPeeringDetails - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.hybridPeeringDetails = null; - - /** - * Replication clusterLocation. - * @member {string} clusterLocation - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.clusterLocation = ""; - - /** - * Replication hybridReplicationType. - * @member {google.cloud.netapp.v1.Replication.HybridReplicationType} hybridReplicationType - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.hybridReplicationType = 0; - - /** - * Replication hybridReplicationUserCommands. - * @member {google.cloud.netapp.v1.IUserCommands|null|undefined} hybridReplicationUserCommands - * @memberof google.cloud.netapp.v1.Replication - * @instance - */ - Replication.prototype.hybridReplicationUserCommands = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Replication.prototype, "_healthy", { - get: $util.oneOfGetter($oneOfFields = ["healthy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Replication.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Replication instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Replication} Replication instance - */ - Replication.create = function create(properties) { - return new Replication(properties); - }; - - /** - * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Replication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.role); - if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.replicationSchedule); - if (message.mirrorState != null && Object.hasOwnProperty.call(message, "mirrorState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mirrorState); - if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.healthy); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.destinationVolume != null && Object.hasOwnProperty.call(message, "destinationVolume")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationVolume); - if (message.transferStats != null && Object.hasOwnProperty.call(message, "transferStats")) - $root.google.cloud.netapp.v1.TransferStats.encode(message.transferStats, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); - if (message.destinationVolumeParameters != null && Object.hasOwnProperty.call(message, "destinationVolumeParameters")) - $root.google.cloud.netapp.v1.DestinationVolumeParameters.encode(message.destinationVolumeParameters, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.sourceVolume); - if (message.hybridPeeringDetails != null && Object.hasOwnProperty.call(message, "hybridPeeringDetails")) - $root.google.cloud.netapp.v1.HybridPeeringDetails.encode(message.hybridPeeringDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.clusterLocation); - if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.hybridReplicationType); - if (message.hybridReplicationUserCommands != null && Object.hasOwnProperty.call(message, "hybridReplicationUserCommands")) - $root.google.cloud.netapp.v1.UserCommands.encode(message.hybridReplicationUserCommands, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Replication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Replication message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Replication} Replication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Replication.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Replication(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.stateDetails = reader.string(); - break; - } - case 4: { - message.role = reader.int32(); - break; - } - case 5: { - message.replicationSchedule = reader.int32(); - break; - } - case 6: { - message.mirrorState = reader.int32(); - break; - } - case 8: { - message.healthy = reader.bool(); - break; - } - case 9: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.destinationVolume = reader.string(); - break; - } - case 11: { - message.transferStats = $root.google.cloud.netapp.v1.TransferStats.decode(reader, reader.uint32()); - break; - } - case 12: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 13: { - message.description = reader.string(); - break; - } - case 14: { - message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.decode(reader, reader.uint32()); - break; - } - case 15: { - message.sourceVolume = reader.string(); - break; - } - case 16: { - message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.decode(reader, reader.uint32()); - break; - } - case 18: { - message.clusterLocation = reader.string(); - break; - } - case 19: { - message.hybridReplicationType = reader.int32(); - break; - } - case 20: { - message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Replication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Replication} Replication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Replication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Replication message. - * @function verify - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Replication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 6: - case 8: - case 9: - case 10: - case 11: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.role != null && message.hasOwnProperty("role")) - switch (message.role) { - default: - return "role: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - switch (message.replicationSchedule) { - default: - return "replicationSchedule: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) - switch (message.mirrorState) { - default: - return "mirrorState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.healthy != null && message.hasOwnProperty("healthy")) { - properties._healthy = 1; - if (typeof message.healthy !== "boolean") - return "healthy: boolean expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) - if (!$util.isString(message.destinationVolume)) - return "destinationVolume: string expected"; - if (message.transferStats != null && message.hasOwnProperty("transferStats")) { - var error = $root.google.cloud.netapp.v1.TransferStats.verify(message.transferStats); - if (error) - return "transferStats." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) { - var error = $root.google.cloud.netapp.v1.DestinationVolumeParameters.verify(message.destinationVolumeParameters); - if (error) - return "destinationVolumeParameters." + error; - } - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - if (!$util.isString(message.sourceVolume)) - return "sourceVolume: string expected"; - if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) { - var error = $root.google.cloud.netapp.v1.HybridPeeringDetails.verify(message.hybridPeeringDetails); - if (error) - return "hybridPeeringDetails." + error; - } - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - if (!$util.isString(message.clusterLocation)) - return "clusterLocation: string expected"; - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - switch (message.hybridReplicationType) { - default: - return "hybridReplicationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) { - var error = $root.google.cloud.netapp.v1.UserCommands.verify(message.hybridReplicationUserCommands); - if (error) - return "hybridReplicationUserCommands." + error; - } - return null; - }; - - /** - * Creates a Replication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Replication} Replication - */ - Replication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Replication) - return object; - var message = new $root.google.cloud.netapp.v1.Replication(); - 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 "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 5: - message.state = 5; - break; - case "ERROR": - case 6: - message.state = 6; - break; - case "PENDING_CLUSTER_PEERING": - case 8: - message.state = 8; - break; - case "PENDING_SVM_PEERING": - case 9: - message.state = 9; - break; - case "PENDING_REMOTE_RESYNC": - case 10: - message.state = 10; - break; - case "EXTERNALLY_MANAGED_REPLICATION": - case 11: - message.state = 11; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - switch (object.role) { - default: - if (typeof object.role === "number") { - message.role = object.role; - break; - } - break; - case "REPLICATION_ROLE_UNSPECIFIED": - case 0: - message.role = 0; - break; - case "SOURCE": - case 1: - message.role = 1; - break; - case "DESTINATION": - case 2: - message.role = 2; - break; - } - switch (object.replicationSchedule) { - default: - if (typeof object.replicationSchedule === "number") { - message.replicationSchedule = object.replicationSchedule; - break; - } - break; - case "REPLICATION_SCHEDULE_UNSPECIFIED": - case 0: - message.replicationSchedule = 0; - break; - case "EVERY_10_MINUTES": - case 1: - message.replicationSchedule = 1; - break; - case "HOURLY": - case 2: - message.replicationSchedule = 2; - break; - case "DAILY": - case 3: - message.replicationSchedule = 3; - break; - } - switch (object.mirrorState) { - default: - if (typeof object.mirrorState === "number") { - message.mirrorState = object.mirrorState; - break; - } - break; - case "MIRROR_STATE_UNSPECIFIED": - case 0: - message.mirrorState = 0; - break; - case "PREPARING": - case 1: - message.mirrorState = 1; - break; - case "MIRRORED": - case 2: - message.mirrorState = 2; - break; - case "STOPPED": - case 3: - message.mirrorState = 3; - break; - case "TRANSFERRING": - case 4: - message.mirrorState = 4; - break; - case "BASELINE_TRANSFERRING": - case 5: - message.mirrorState = 5; - break; - case "ABORTED": - case 6: - message.mirrorState = 6; - break; - case "EXTERNALLY_MANAGED": - case 7: - message.mirrorState = 7; - break; - case "PENDING_PEERING": - case 8: - message.mirrorState = 8; - break; - } - if (object.healthy != null) - message.healthy = Boolean(object.healthy); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.destinationVolume != null) - message.destinationVolume = String(object.destinationVolume); - if (object.transferStats != null) { - if (typeof object.transferStats !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.transferStats: object expected"); - message.transferStats = $root.google.cloud.netapp.v1.TransferStats.fromObject(object.transferStats); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - if (object.destinationVolumeParameters != null) { - if (typeof object.destinationVolumeParameters !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.destinationVolumeParameters: object expected"); - message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.fromObject(object.destinationVolumeParameters); - } - if (object.sourceVolume != null) - message.sourceVolume = String(object.sourceVolume); - if (object.hybridPeeringDetails != null) { - if (typeof object.hybridPeeringDetails !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.hybridPeeringDetails: object expected"); - message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.fromObject(object.hybridPeeringDetails); - } - if (object.clusterLocation != null) - message.clusterLocation = String(object.clusterLocation); - switch (object.hybridReplicationType) { - default: - if (typeof object.hybridReplicationType === "number") { - message.hybridReplicationType = object.hybridReplicationType; - break; - } - break; - case "HYBRID_REPLICATION_TYPE_UNSPECIFIED": - case 0: - message.hybridReplicationType = 0; - break; - case "MIGRATION": - case 1: - message.hybridReplicationType = 1; - break; - case "CONTINUOUS_REPLICATION": - case 2: - message.hybridReplicationType = 2; - break; - case "ONPREM_REPLICATION": - case 3: - message.hybridReplicationType = 3; - break; - case "REVERSE_ONPREM_REPLICATION": - case 4: - message.hybridReplicationType = 4; - break; - } - if (object.hybridReplicationUserCommands != null) { - if (typeof object.hybridReplicationUserCommands !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.hybridReplicationUserCommands: object expected"); - message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.fromObject(object.hybridReplicationUserCommands); - } - return message; - }; - - /** - * Creates a plain object from a Replication message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {google.cloud.netapp.v1.Replication} message Replication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Replication.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.stateDetails = ""; - object.role = options.enums === String ? "REPLICATION_ROLE_UNSPECIFIED" : 0; - object.replicationSchedule = options.enums === String ? "REPLICATION_SCHEDULE_UNSPECIFIED" : 0; - object.mirrorState = options.enums === String ? "MIRROR_STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.destinationVolume = ""; - object.transferStats = null; - object.destinationVolumeParameters = null; - object.sourceVolume = ""; - object.hybridPeeringDetails = null; - object.clusterLocation = ""; - object.hybridReplicationType = options.enums === String ? "HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; - object.hybridReplicationUserCommands = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.Replication.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Replication.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.role != null && message.hasOwnProperty("role")) - object.role = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] === undefined ? message.role : $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] : message.role; - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; - if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) - object.mirrorState = options.enums === String ? $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] === undefined ? message.mirrorState : $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] : message.mirrorState; - if (message.healthy != null && message.hasOwnProperty("healthy")) { - object.healthy = message.healthy; - if (options.oneofs) - object._healthy = "healthy"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) - object.destinationVolume = message.destinationVolume; - if (message.transferStats != null && message.hasOwnProperty("transferStats")) - object.transferStats = $root.google.cloud.netapp.v1.TransferStats.toObject(message.transferStats, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) - object.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.toObject(message.destinationVolumeParameters, options); - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - object.sourceVolume = message.sourceVolume; - if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) - object.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.toObject(message.hybridPeeringDetails, options); - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - object.clusterLocation = message.clusterLocation; - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; - if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) - object.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.toObject(message.hybridReplicationUserCommands, options); - return object; - }; - - /** - * Converts this Replication to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.Replication - * @instance - * @returns {Object.} JSON object - */ - Replication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Replication - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Replication - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Replication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.Replication"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.Replication.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=5 DELETING value - * @property {number} ERROR=6 ERROR value - * @property {number} PENDING_CLUSTER_PEERING=8 PENDING_CLUSTER_PEERING value - * @property {number} PENDING_SVM_PEERING=9 PENDING_SVM_PEERING value - * @property {number} PENDING_REMOTE_RESYNC=10 PENDING_REMOTE_RESYNC value - * @property {number} EXTERNALLY_MANAGED_REPLICATION=11 EXTERNALLY_MANAGED_REPLICATION value - */ - Replication.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[5] = "DELETING"] = 5; - values[valuesById[6] = "ERROR"] = 6; - values[valuesById[8] = "PENDING_CLUSTER_PEERING"] = 8; - values[valuesById[9] = "PENDING_SVM_PEERING"] = 9; - values[valuesById[10] = "PENDING_REMOTE_RESYNC"] = 10; - values[valuesById[11] = "EXTERNALLY_MANAGED_REPLICATION"] = 11; - return values; - })(); - - /** - * ReplicationRole enum. - * @name google.cloud.netapp.v1.Replication.ReplicationRole - * @enum {number} - * @property {number} REPLICATION_ROLE_UNSPECIFIED=0 REPLICATION_ROLE_UNSPECIFIED value - * @property {number} SOURCE=1 SOURCE value - * @property {number} DESTINATION=2 DESTINATION value - */ - Replication.ReplicationRole = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPLICATION_ROLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SOURCE"] = 1; - values[valuesById[2] = "DESTINATION"] = 2; - return values; - })(); - - /** - * ReplicationSchedule enum. - * @name google.cloud.netapp.v1.Replication.ReplicationSchedule - * @enum {number} - * @property {number} REPLICATION_SCHEDULE_UNSPECIFIED=0 REPLICATION_SCHEDULE_UNSPECIFIED value - * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value - * @property {number} HOURLY=2 HOURLY value - * @property {number} DAILY=3 DAILY value - */ - Replication.ReplicationSchedule = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVERY_10_MINUTES"] = 1; - values[valuesById[2] = "HOURLY"] = 2; - values[valuesById[3] = "DAILY"] = 3; - return values; - })(); - - /** - * MirrorState enum. - * @name google.cloud.netapp.v1.Replication.MirrorState - * @enum {number} - * @property {number} MIRROR_STATE_UNSPECIFIED=0 MIRROR_STATE_UNSPECIFIED value - * @property {number} PREPARING=1 PREPARING value - * @property {number} MIRRORED=2 MIRRORED value - * @property {number} STOPPED=3 STOPPED value - * @property {number} TRANSFERRING=4 TRANSFERRING value - * @property {number} BASELINE_TRANSFERRING=5 BASELINE_TRANSFERRING value - * @property {number} ABORTED=6 ABORTED value - * @property {number} EXTERNALLY_MANAGED=7 EXTERNALLY_MANAGED value - * @property {number} PENDING_PEERING=8 PENDING_PEERING value - */ - Replication.MirrorState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MIRROR_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREPARING"] = 1; - values[valuesById[2] = "MIRRORED"] = 2; - values[valuesById[3] = "STOPPED"] = 3; - values[valuesById[4] = "TRANSFERRING"] = 4; - values[valuesById[5] = "BASELINE_TRANSFERRING"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - values[valuesById[7] = "EXTERNALLY_MANAGED"] = 7; - values[valuesById[8] = "PENDING_PEERING"] = 8; - return values; - })(); - - /** - * HybridReplicationType enum. - * @name google.cloud.netapp.v1.Replication.HybridReplicationType - * @enum {number} - * @property {number} HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 HYBRID_REPLICATION_TYPE_UNSPECIFIED value - * @property {number} MIGRATION=1 MIGRATION value - * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value - * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value - * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value - */ - Replication.HybridReplicationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MIGRATION"] = 1; - values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; - values[valuesById[3] = "ONPREM_REPLICATION"] = 3; - values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; - return values; - })(); - - return Replication; - })(); - - v1.HybridPeeringDetails = (function() { - - /** - * Properties of a HybridPeeringDetails. - * @memberof google.cloud.netapp.v1 - * @interface IHybridPeeringDetails - * @property {string|null} [subnetIp] HybridPeeringDetails subnetIp - * @property {string|null} [command] HybridPeeringDetails command - * @property {google.protobuf.ITimestamp|null} [commandExpiryTime] HybridPeeringDetails commandExpiryTime - * @property {string|null} [passphrase] HybridPeeringDetails passphrase - * @property {string|null} [peerVolumeName] HybridPeeringDetails peerVolumeName - * @property {string|null} [peerClusterName] HybridPeeringDetails peerClusterName - * @property {string|null} [peerSvmName] HybridPeeringDetails peerSvmName - */ - - /** - * Constructs a new HybridPeeringDetails. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a HybridPeeringDetails. - * @implements IHybridPeeringDetails - * @constructor - * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set - */ - function HybridPeeringDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HybridPeeringDetails subnetIp. - * @member {string} subnetIp - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.subnetIp = ""; - - /** - * HybridPeeringDetails command. - * @member {string} command - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.command = ""; - - /** - * HybridPeeringDetails commandExpiryTime. - * @member {google.protobuf.ITimestamp|null|undefined} commandExpiryTime - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.commandExpiryTime = null; - - /** - * HybridPeeringDetails passphrase. - * @member {string} passphrase - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.passphrase = ""; - - /** - * HybridPeeringDetails peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.peerVolumeName = ""; - - /** - * HybridPeeringDetails peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.peerClusterName = ""; - - /** - * HybridPeeringDetails peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.peerSvmName = ""; - - /** - * Creates a new HybridPeeringDetails instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails instance - */ - HybridPeeringDetails.create = function create(properties) { - return new HybridPeeringDetails(properties); - }; - - /** - * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HybridPeeringDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subnetIp != null && Object.hasOwnProperty.call(message, "subnetIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetIp); - if (message.command != null && Object.hasOwnProperty.call(message, "command")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); - if (message.commandExpiryTime != null && Object.hasOwnProperty.call(message, "commandExpiryTime")) - $root.google.protobuf.Timestamp.encode(message.commandExpiryTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.passphrase); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.peerSvmName); - return writer; - }; - - /** - * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HybridPeeringDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HybridPeeringDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subnetIp = reader.string(); - break; - } - case 2: { - message.command = reader.string(); - break; - } - case 3: { - message.commandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.passphrase = reader.string(); - break; - } - case 5: { - message.peerVolumeName = reader.string(); - break; - } - case 6: { - message.peerClusterName = reader.string(); - break; - } - case 7: { - message.peerSvmName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HybridPeeringDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HybridPeeringDetails message. - * @function verify - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HybridPeeringDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) - if (!$util.isString(message.subnetIp)) - return "subnetIp: string expected"; - if (message.command != null && message.hasOwnProperty("command")) - if (!$util.isString(message.command)) - return "command: string expected"; - if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.commandExpiryTime); - if (error) - return "commandExpiryTime." + error; - } - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - if (!$util.isString(message.passphrase)) - return "passphrase: string expected"; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - return null; - }; - - /** - * Creates a HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails - */ - HybridPeeringDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.HybridPeeringDetails) - return object; - var message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); - if (object.subnetIp != null) - message.subnetIp = String(object.subnetIp); - if (object.command != null) - message.command = String(object.command); - if (object.commandExpiryTime != null) { - if (typeof object.commandExpiryTime !== "object") - throw TypeError(".google.cloud.netapp.v1.HybridPeeringDetails.commandExpiryTime: object expected"); - message.commandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.commandExpiryTime); - } - if (object.passphrase != null) - message.passphrase = String(object.passphrase); - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - return message; - }; - - /** - * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {google.cloud.netapp.v1.HybridPeeringDetails} message HybridPeeringDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HybridPeeringDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.subnetIp = ""; - object.command = ""; - object.commandExpiryTime = null; - object.passphrase = ""; - object.peerVolumeName = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - } - if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) - object.subnetIp = message.subnetIp; - if (message.command != null && message.hasOwnProperty("command")) - object.command = message.command; - if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) - object.commandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.commandExpiryTime, options); - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - object.passphrase = message.passphrase; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - return object; - }; - - /** - * Converts this HybridPeeringDetails to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - * @returns {Object.} JSON object - */ - HybridPeeringDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HybridPeeringDetails - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HybridPeeringDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.HybridPeeringDetails"; - }; - - return HybridPeeringDetails; - })(); - - v1.ListReplicationsRequest = (function() { - - /** - * Properties of a ListReplicationsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListReplicationsRequest - * @property {string|null} [parent] ListReplicationsRequest parent - * @property {number|null} [pageSize] ListReplicationsRequest pageSize - * @property {string|null} [pageToken] ListReplicationsRequest pageToken - * @property {string|null} [orderBy] ListReplicationsRequest orderBy - * @property {string|null} [filter] ListReplicationsRequest filter - */ - - /** - * Constructs a new ListReplicationsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListReplicationsRequest. - * @implements IListReplicationsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set - */ - function ListReplicationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListReplicationsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.parent = ""; - - /** - * ListReplicationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.pageSize = 0; - - /** - * ListReplicationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.pageToken = ""; - - /** - * ListReplicationsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.orderBy = ""; - - /** - * ListReplicationsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.filter = ""; - - /** - * Creates a new ListReplicationsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest instance - */ - ListReplicationsRequest.create = function create(properties) { - return new ListReplicationsRequest(properties); - }; - - /** - * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReplicationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReplicationsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReplicationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListReplicationsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListReplicationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest - */ - ListReplicationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); - 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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {google.cloud.netapp.v1.ListReplicationsRequest} message ListReplicationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListReplicationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListReplicationsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListReplicationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListReplicationsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListReplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsRequest"; - }; - - return ListReplicationsRequest; - })(); - - v1.ListReplicationsResponse = (function() { - - /** - * Properties of a ListReplicationsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListReplicationsResponse - * @property {Array.|null} [replications] ListReplicationsResponse replications - * @property {string|null} [nextPageToken] ListReplicationsResponse nextPageToken - * @property {Array.|null} [unreachable] ListReplicationsResponse unreachable - */ - - /** - * Constructs a new ListReplicationsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListReplicationsResponse. - * @implements IListReplicationsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set - */ - function ListReplicationsResponse(properties) { - this.replications = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListReplicationsResponse replications. - * @member {Array.} replications - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @instance - */ - ListReplicationsResponse.prototype.replications = $util.emptyArray; - - /** - * ListReplicationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @instance - */ - ListReplicationsResponse.prototype.nextPageToken = ""; - - /** - * ListReplicationsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @instance - */ - ListReplicationsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListReplicationsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse instance - */ - ListReplicationsResponse.create = function create(properties) { - return new ListReplicationsResponse(properties); - }; - - /** - * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReplicationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.replications != null && message.replications.length) - for (var i = 0; i < message.replications.length; ++i) - $root.google.cloud.netapp.v1.Replication.encode(message.replications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListReplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReplicationsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.replications && message.replications.length)) - message.replications = []; - message.replications.push($root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListReplicationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListReplicationsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListReplicationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replications != null && message.hasOwnProperty("replications")) { - if (!Array.isArray(message.replications)) - return "replications: array expected"; - for (var i = 0; i < message.replications.length; ++i) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replications[i]); - if (error) - return "replications." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse - */ - ListReplicationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); - if (object.replications) { - if (!Array.isArray(object.replications)) - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: array expected"); - message.replications = []; - for (var i = 0; i < object.replications.length; ++i) { - if (typeof object.replications[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: object expected"); - message.replications[i] = $root.google.cloud.netapp.v1.Replication.fromObject(object.replications[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {google.cloud.netapp.v1.ListReplicationsResponse} message ListReplicationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListReplicationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.replications = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.replications && message.replications.length) { - object.replications = []; - for (var j = 0; j < message.replications.length; ++j) - object.replications[j] = $root.google.cloud.netapp.v1.Replication.toObject(message.replications[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListReplicationsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListReplicationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListReplicationsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListReplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsResponse"; - }; - - return ListReplicationsResponse; - })(); - - v1.GetReplicationRequest = (function() { - - /** - * Properties of a GetReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetReplicationRequest - * @property {string|null} [name] GetReplicationRequest name - */ - - /** - * Constructs a new GetReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetReplicationRequest. - * @implements IGetReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set - */ - function GetReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @instance - */ - GetReplicationRequest.prototype.name = ""; - - /** - * Creates a new GetReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest instance - */ - GetReplicationRequest.create = function create(properties) { - return new GetReplicationRequest(properties); - }; - - /** - * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest - */ - GetReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {google.cloud.netapp.v1.GetReplicationRequest} message GetReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - GetReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetReplicationRequest"; - }; - - return GetReplicationRequest; - })(); - - v1.DestinationVolumeParameters = (function() { - - /** - * Properties of a DestinationVolumeParameters. - * @memberof google.cloud.netapp.v1 - * @interface IDestinationVolumeParameters - * @property {string|null} [storagePool] DestinationVolumeParameters storagePool - * @property {string|null} [volumeId] DestinationVolumeParameters volumeId - * @property {string|null} [shareName] DestinationVolumeParameters shareName - * @property {string|null} [description] DestinationVolumeParameters description - * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] DestinationVolumeParameters tieringPolicy - */ - - /** - * Constructs a new DestinationVolumeParameters. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DestinationVolumeParameters. - * @implements IDestinationVolumeParameters - * @constructor - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set - */ - function DestinationVolumeParameters(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DestinationVolumeParameters storagePool. - * @member {string} storagePool - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - */ - DestinationVolumeParameters.prototype.storagePool = ""; - - /** - * DestinationVolumeParameters volumeId. - * @member {string} volumeId - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - */ - DestinationVolumeParameters.prototype.volumeId = ""; - - /** - * DestinationVolumeParameters shareName. - * @member {string} shareName - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - */ - DestinationVolumeParameters.prototype.shareName = ""; - - /** - * DestinationVolumeParameters description. - * @member {string|null|undefined} description - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - */ - DestinationVolumeParameters.prototype.description = null; - - /** - * DestinationVolumeParameters tieringPolicy. - * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - */ - DestinationVolumeParameters.prototype.tieringPolicy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DestinationVolumeParameters.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DestinationVolumeParameters.prototype, "_tieringPolicy", { - get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DestinationVolumeParameters instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters instance - */ - DestinationVolumeParameters.create = function create(properties) { - return new DestinationVolumeParameters(properties); - }; - - /** - * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationVolumeParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.storagePool); - if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); - if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shareName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) - $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestinationVolumeParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationVolumeParameters.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.storagePool = reader.string(); - break; - } - case 2: { - message.volumeId = reader.string(); - break; - } - case 3: { - message.shareName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestinationVolumeParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DestinationVolumeParameters message. - * @function verify - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DestinationVolumeParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - if (!$util.isString(message.storagePool)) - return "storagePool: string expected"; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - if (!$util.isString(message.volumeId)) - return "volumeId: string expected"; - if (message.shareName != null && message.hasOwnProperty("shareName")) - if (!$util.isString(message.shareName)) - return "shareName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - properties._tieringPolicy = 1; - { - var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); - if (error) - return "tieringPolicy." + error; - } - } - return null; - }; - - /** - * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters - */ - DestinationVolumeParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DestinationVolumeParameters) - return object; - var message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); - if (object.storagePool != null) - message.storagePool = String(object.storagePool); - if (object.volumeId != null) - message.volumeId = String(object.volumeId); - if (object.shareName != null) - message.shareName = String(object.shareName); - if (object.description != null) - message.description = String(object.description); - if (object.tieringPolicy != null) { - if (typeof object.tieringPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.DestinationVolumeParameters.tieringPolicy: object expected"); - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); - } - return message; - }; - - /** - * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {google.cloud.netapp.v1.DestinationVolumeParameters} message DestinationVolumeParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DestinationVolumeParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.storagePool = ""; - object.volumeId = ""; - object.shareName = ""; - } - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = message.storagePool; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - object.volumeId = message.volumeId; - if (message.shareName != null && message.hasOwnProperty("shareName")) - object.shareName = message.shareName; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); - if (options.oneofs) - object._tieringPolicy = "tieringPolicy"; - } - return object; - }; - - /** - * Converts this DestinationVolumeParameters to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @instance - * @returns {Object.} JSON object - */ - DestinationVolumeParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DestinationVolumeParameters - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DestinationVolumeParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DestinationVolumeParameters"; - }; - - return DestinationVolumeParameters; - })(); - - v1.CreateReplicationRequest = (function() { - - /** - * Properties of a CreateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateReplicationRequest - * @property {string|null} [parent] CreateReplicationRequest parent - * @property {google.cloud.netapp.v1.IReplication|null} [replication] CreateReplicationRequest replication - * @property {string|null} [replicationId] CreateReplicationRequest replicationId - */ - - /** - * Constructs a new CreateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateReplicationRequest. - * @implements ICreateReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set - */ - function CreateReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateReplicationRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @instance - */ - CreateReplicationRequest.prototype.parent = ""; - - /** - * CreateReplicationRequest replication. - * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @instance - */ - CreateReplicationRequest.prototype.replication = null; - - /** - * CreateReplicationRequest replicationId. - * @member {string} replicationId - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @instance - */ - CreateReplicationRequest.prototype.replicationId = ""; - - /** - * Creates a new CreateReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest instance - */ - CreateReplicationRequest.create = function create(properties) { - return new CreateReplicationRequest(properties); - }; - - /** - * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) - $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.replicationId != null && Object.hasOwnProperty.call(message, "replicationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationId); - return writer; - }; - - /** - * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); - break; - } - case 3: { - message.replicationId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.replication != null && message.hasOwnProperty("replication")) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); - if (error) - return "replication." + error; - } - if (message.replicationId != null && message.hasOwnProperty("replicationId")) - if (!$util.isString(message.replicationId)) - return "replicationId: string expected"; - return null; - }; - - /** - * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest - */ - CreateReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.replication != null) { - if (typeof object.replication !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateReplicationRequest.replication: object expected"); - message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); - } - if (object.replicationId != null) - message.replicationId = String(object.replicationId); - return message; - }; - - /** - * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.CreateReplicationRequest} message CreateReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.replication = null; - object.replicationId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.replication != null && message.hasOwnProperty("replication")) - object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); - if (message.replicationId != null && message.hasOwnProperty("replicationId")) - object.replicationId = message.replicationId; - return object; - }; - - /** - * Converts this CreateReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - CreateReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateReplicationRequest"; - }; - - return CreateReplicationRequest; - })(); - - v1.DeleteReplicationRequest = (function() { - - /** - * Properties of a DeleteReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteReplicationRequest - * @property {string|null} [name] DeleteReplicationRequest name - */ - - /** - * Constructs a new DeleteReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteReplicationRequest. - * @implements IDeleteReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set - */ - function DeleteReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @instance - */ - DeleteReplicationRequest.prototype.name = ""; - - /** - * Creates a new DeleteReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest instance - */ - DeleteReplicationRequest.create = function create(properties) { - return new DeleteReplicationRequest(properties); - }; - - /** - * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest - */ - DeleteReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.DeleteReplicationRequest} message DeleteReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteReplicationRequest"; - }; - - return DeleteReplicationRequest; - })(); - - v1.UpdateReplicationRequest = (function() { - - /** - * Properties of an UpdateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateReplicationRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReplicationRequest updateMask - * @property {google.cloud.netapp.v1.IReplication|null} [replication] UpdateReplicationRequest replication - */ - - /** - * Constructs a new UpdateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateReplicationRequest. - * @implements IUpdateReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set - */ - function UpdateReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateReplicationRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @instance - */ - UpdateReplicationRequest.prototype.updateMask = null; - - /** - * UpdateReplicationRequest replication. - * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @instance - */ - UpdateReplicationRequest.prototype.replication = null; - - /** - * Creates a new UpdateReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest instance - */ - UpdateReplicationRequest.create = function create(properties) { - return new UpdateReplicationRequest(properties); - }; - - /** - * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) - $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.replication != null && message.hasOwnProperty("replication")) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); - if (error) - return "replication." + error; - } - return null; - }; - - /** - * Creates an UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest - */ - UpdateReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.replication != null) { - if (typeof object.replication !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.replication: object expected"); - message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); - } - return message; - }; - - /** - * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {google.cloud.netapp.v1.UpdateReplicationRequest} message UpdateReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.replication = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.replication != null && message.hasOwnProperty("replication")) - object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); - return object; - }; - - /** - * Converts this UpdateReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateReplicationRequest"; - }; - - return UpdateReplicationRequest; - })(); - - v1.StopReplicationRequest = (function() { - - /** - * Properties of a StopReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IStopReplicationRequest - * @property {string|null} [name] StopReplicationRequest name - * @property {boolean|null} [force] StopReplicationRequest force - */ - - /** - * Constructs a new StopReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a StopReplicationRequest. - * @implements IStopReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set - */ - function StopReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @instance - */ - StopReplicationRequest.prototype.name = ""; - - /** - * StopReplicationRequest force. - * @member {boolean} force - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @instance - */ - StopReplicationRequest.prototype.force = false; - - /** - * Creates a new StopReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest instance - */ - StopReplicationRequest.create = function create(properties) { - return new StopReplicationRequest(properties); - }; - - /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest - */ - StopReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.StopReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {google.cloud.netapp.v1.StopReplicationRequest} message StopReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this StopReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - StopReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.StopReplicationRequest"; - }; - - return StopReplicationRequest; - })(); - - v1.ResumeReplicationRequest = (function() { - - /** - * Properties of a ResumeReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IResumeReplicationRequest - * @property {string|null} [name] ResumeReplicationRequest name - */ - - /** - * Constructs a new ResumeReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ResumeReplicationRequest. - * @implements IResumeReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set - */ - function ResumeReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResumeReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @instance - */ - ResumeReplicationRequest.prototype.name = ""; - - /** - * Creates a new ResumeReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest instance - */ - ResumeReplicationRequest.create = function create(properties) { - return new ResumeReplicationRequest(properties); - }; - - /** - * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResumeReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResumeReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResumeReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResumeReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResumeReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResumeReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest - */ - ResumeReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ResumeReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ResumeReplicationRequest} message ResumeReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResumeReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ResumeReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - ResumeReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResumeReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResumeReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ResumeReplicationRequest"; - }; - - return ResumeReplicationRequest; - })(); - - v1.ReverseReplicationDirectionRequest = (function() { - - /** - * Properties of a ReverseReplicationDirectionRequest. - * @memberof google.cloud.netapp.v1 - * @interface IReverseReplicationDirectionRequest - * @property {string|null} [name] ReverseReplicationDirectionRequest name - */ - - /** - * Constructs a new ReverseReplicationDirectionRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ReverseReplicationDirectionRequest. - * @implements IReverseReplicationDirectionRequest - * @constructor - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set - */ - function ReverseReplicationDirectionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReverseReplicationDirectionRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @instance - */ - ReverseReplicationDirectionRequest.prototype.name = ""; - - /** - * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest instance - */ - ReverseReplicationDirectionRequest.create = function create(properties) { - return new ReverseReplicationDirectionRequest(properties); - }; - - /** - * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReverseReplicationDirectionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReverseReplicationDirectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReverseReplicationDirectionRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReverseReplicationDirectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReverseReplicationDirectionRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReverseReplicationDirectionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest - */ - ReverseReplicationDirectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReverseReplicationDirectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this ReverseReplicationDirectionRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @instance - * @returns {Object.} JSON object - */ - ReverseReplicationDirectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReverseReplicationDirectionRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReverseReplicationDirectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ReverseReplicationDirectionRequest"; - }; - - return ReverseReplicationDirectionRequest; - })(); - - v1.EstablishPeeringRequest = (function() { - - /** - * Properties of an EstablishPeeringRequest. - * @memberof google.cloud.netapp.v1 - * @interface IEstablishPeeringRequest - * @property {string|null} [name] EstablishPeeringRequest name - * @property {string|null} [peerClusterName] EstablishPeeringRequest peerClusterName - * @property {string|null} [peerSvmName] EstablishPeeringRequest peerSvmName - * @property {Array.|null} [peerIpAddresses] EstablishPeeringRequest peerIpAddresses - * @property {string|null} [peerVolumeName] EstablishPeeringRequest peerVolumeName - */ - - /** - * Constructs a new EstablishPeeringRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an EstablishPeeringRequest. - * @implements IEstablishPeeringRequest - * @constructor - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set - */ - function EstablishPeeringRequest(properties) { - this.peerIpAddresses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EstablishPeeringRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.name = ""; - - /** - * EstablishPeeringRequest peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerClusterName = ""; - - /** - * EstablishPeeringRequest peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerSvmName = ""; - - /** - * EstablishPeeringRequest peerIpAddresses. - * @member {Array.} peerIpAddresses - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerIpAddresses = $util.emptyArray; - - /** - * EstablishPeeringRequest peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerVolumeName = ""; - - /** - * Creates a new EstablishPeeringRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest instance - */ - EstablishPeeringRequest.create = function create(properties) { - return new EstablishPeeringRequest(properties); - }; - - /** - * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EstablishPeeringRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); - if (message.peerIpAddresses != null && message.peerIpAddresses.length) - for (var i = 0; i < message.peerIpAddresses.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); - return writer; - }; - - /** - * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EstablishPeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EstablishPeeringRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.peerClusterName = reader.string(); - break; - } - case 3: { - message.peerSvmName = reader.string(); - break; - } - case 4: { - if (!(message.peerIpAddresses && message.peerIpAddresses.length)) - message.peerIpAddresses = []; - message.peerIpAddresses.push(reader.string()); - break; - } - case 5: { - message.peerVolumeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EstablishPeeringRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EstablishPeeringRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EstablishPeeringRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { - if (!Array.isArray(message.peerIpAddresses)) - return "peerIpAddresses: array expected"; - for (var i = 0; i < message.peerIpAddresses.length; ++i) - if (!$util.isString(message.peerIpAddresses[i])) - return "peerIpAddresses: string[] expected"; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - return null; - }; - - /** - * Creates an EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest - */ - EstablishPeeringRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.EstablishPeeringRequest) - return object; - var message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - if (object.peerIpAddresses) { - if (!Array.isArray(object.peerIpAddresses)) - throw TypeError(".google.cloud.netapp.v1.EstablishPeeringRequest.peerIpAddresses: array expected"); - message.peerIpAddresses = []; - for (var i = 0; i < object.peerIpAddresses.length; ++i) - message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); - } - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - return message; - }; - - /** - * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {google.cloud.netapp.v1.EstablishPeeringRequest} message EstablishPeeringRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EstablishPeeringRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.peerIpAddresses = []; - if (options.defaults) { - object.name = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - object.peerVolumeName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - if (message.peerIpAddresses && message.peerIpAddresses.length) { - object.peerIpAddresses = []; - for (var j = 0; j < message.peerIpAddresses.length; ++j) - object.peerIpAddresses[j] = message.peerIpAddresses[j]; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - return object; - }; - - /** - * Converts this EstablishPeeringRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - * @returns {Object.} JSON object - */ - EstablishPeeringRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EstablishPeeringRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EstablishPeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishPeeringRequest"; - }; - - return EstablishPeeringRequest; - })(); - - v1.SyncReplicationRequest = (function() { - - /** - * Properties of a SyncReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface ISyncReplicationRequest - * @property {string|null} [name] SyncReplicationRequest name - */ - - /** - * Constructs a new SyncReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a SyncReplicationRequest. - * @implements ISyncReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set - */ - function SyncReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SyncReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @instance - */ - SyncReplicationRequest.prototype.name = ""; - - /** - * Creates a new SyncReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest instance - */ - SyncReplicationRequest.create = function create(properties) { - return new SyncReplicationRequest(properties); - }; - - /** - * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SyncReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SyncReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest - */ - SyncReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.SyncReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {google.cloud.netapp.v1.SyncReplicationRequest} message SyncReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SyncReplicationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SyncReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @instance - * @returns {Object.} JSON object - */ - SyncReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SyncReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.SyncReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SyncReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.SyncReplicationRequest"; - }; - - return SyncReplicationRequest; - })(); - - /** - * Protocols enum. - * @name google.cloud.netapp.v1.Protocols - * @enum {number} - * @property {number} PROTOCOLS_UNSPECIFIED=0 PROTOCOLS_UNSPECIFIED value - * @property {number} NFSV3=1 NFSV3 value - * @property {number} NFSV4=2 NFSV4 value - * @property {number} SMB=3 SMB value - * @property {number} ISCSI=4 ISCSI value - */ - v1.Protocols = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROTOCOLS_UNSPECIFIED"] = 0; - values[valuesById[1] = "NFSV3"] = 1; - values[valuesById[2] = "NFSV4"] = 2; - values[valuesById[3] = "SMB"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * AccessType enum. - * @name google.cloud.netapp.v1.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} READ_ONLY=1 READ_ONLY value - * @property {number} READ_WRITE=2 READ_WRITE value - * @property {number} READ_NONE=3 READ_NONE value - */ - v1.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_ONLY"] = 1; - values[valuesById[2] = "READ_WRITE"] = 2; - values[valuesById[3] = "READ_NONE"] = 3; - return values; - })(); - - /** - * SMBSettings enum. - * @name google.cloud.netapp.v1.SMBSettings - * @enum {number} - * @property {number} SMB_SETTINGS_UNSPECIFIED=0 SMB_SETTINGS_UNSPECIFIED value - * @property {number} ENCRYPT_DATA=1 ENCRYPT_DATA value - * @property {number} BROWSABLE=2 BROWSABLE value - * @property {number} CHANGE_NOTIFY=3 CHANGE_NOTIFY value - * @property {number} NON_BROWSABLE=4 NON_BROWSABLE value - * @property {number} OPLOCKS=5 OPLOCKS value - * @property {number} SHOW_SNAPSHOT=6 SHOW_SNAPSHOT value - * @property {number} SHOW_PREVIOUS_VERSIONS=7 SHOW_PREVIOUS_VERSIONS value - * @property {number} ACCESS_BASED_ENUMERATION=8 ACCESS_BASED_ENUMERATION value - * @property {number} CONTINUOUSLY_AVAILABLE=9 CONTINUOUSLY_AVAILABLE value - */ - v1.SMBSettings = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SMB_SETTINGS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENCRYPT_DATA"] = 1; - values[valuesById[2] = "BROWSABLE"] = 2; - values[valuesById[3] = "CHANGE_NOTIFY"] = 3; - values[valuesById[4] = "NON_BROWSABLE"] = 4; - values[valuesById[5] = "OPLOCKS"] = 5; - values[valuesById[6] = "SHOW_SNAPSHOT"] = 6; - values[valuesById[7] = "SHOW_PREVIOUS_VERSIONS"] = 7; - values[valuesById[8] = "ACCESS_BASED_ENUMERATION"] = 8; - values[valuesById[9] = "CONTINUOUSLY_AVAILABLE"] = 9; - return values; - })(); - - /** - * SecurityStyle enum. - * @name google.cloud.netapp.v1.SecurityStyle - * @enum {number} - * @property {number} SECURITY_STYLE_UNSPECIFIED=0 SECURITY_STYLE_UNSPECIFIED value - * @property {number} NTFS=1 NTFS value - * @property {number} UNIX=2 UNIX value - */ - v1.SecurityStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SECURITY_STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NTFS"] = 1; - values[valuesById[2] = "UNIX"] = 2; - return values; - })(); - - /** - * RestrictedAction enum. - * @name google.cloud.netapp.v1.RestrictedAction - * @enum {number} - * @property {number} RESTRICTED_ACTION_UNSPECIFIED=0 RESTRICTED_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - */ - v1.RestrictedAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - return values; - })(); - - v1.ListVolumesRequest = (function() { - - /** - * Properties of a ListVolumesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListVolumesRequest - * @property {string|null} [parent] ListVolumesRequest parent - * @property {number|null} [pageSize] ListVolumesRequest pageSize - * @property {string|null} [pageToken] ListVolumesRequest pageToken - * @property {string|null} [filter] ListVolumesRequest filter - * @property {string|null} [orderBy] ListVolumesRequest orderBy - */ - - /** - * Constructs a new ListVolumesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListVolumesRequest. - * @implements IListVolumesRequest - * @constructor - * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set - */ - function ListVolumesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVolumesRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.parent = ""; - - /** - * ListVolumesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.pageSize = 0; - - /** - * ListVolumesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.pageToken = ""; - - /** - * ListVolumesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.filter = ""; - - /** - * ListVolumesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListVolumesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest instance - */ - ListVolumesRequest.create = function create(properties) { - return new ListVolumesRequest(properties); - }; - - /** - * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVolumesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; - - /** - * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVolumesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVolumesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVolumesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVolumesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVolumesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest - */ - ListVolumesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListVolumesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {google.cloud.netapp.v1.ListVolumesRequest} message ListVolumesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVolumesRequest.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; - }; - - /** - * Converts this ListVolumesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - * @returns {Object.} JSON object - */ - ListVolumesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVolumesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesRequest"; - }; - - return ListVolumesRequest; - })(); - - v1.ListVolumesResponse = (function() { - - /** - * Properties of a ListVolumesResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListVolumesResponse - * @property {Array.|null} [volumes] ListVolumesResponse volumes - * @property {string|null} [nextPageToken] ListVolumesResponse nextPageToken - * @property {Array.|null} [unreachable] ListVolumesResponse unreachable - */ - - /** - * Constructs a new ListVolumesResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListVolumesResponse. - * @implements IListVolumesResponse - * @constructor - * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set - */ - function ListVolumesResponse(properties) { - this.volumes = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVolumesResponse volumes. - * @member {Array.} volumes - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - */ - ListVolumesResponse.prototype.volumes = $util.emptyArray; - - /** - * ListVolumesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - */ - ListVolumesResponse.prototype.nextPageToken = ""; - - /** - * ListVolumesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - */ - ListVolumesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListVolumesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse instance - */ - ListVolumesResponse.create = function create(properties) { - return new ListVolumesResponse(properties); - }; - - /** - * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVolumesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.volumes != null && message.volumes.length) - for (var i = 0; i < message.volumes.length; ++i) - $root.google.cloud.netapp.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVolumesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVolumesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVolumesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVolumesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVolumesResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVolumesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.volumes != null && message.hasOwnProperty("volumes")) { - if (!Array.isArray(message.volumes)) - return "volumes: array expected"; - for (var i = 0; i < message.volumes.length; ++i) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volumes[i]); - if (error) - return "volumes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse - */ - ListVolumesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListVolumesResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); - if (object.volumes) { - if (!Array.isArray(object.volumes)) - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: array expected"); - message.volumes = []; - for (var i = 0; i < object.volumes.length; ++i) { - if (typeof object.volumes[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: object expected"); - message.volumes[i] = $root.google.cloud.netapp.v1.Volume.fromObject(object.volumes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {google.cloud.netapp.v1.ListVolumesResponse} message ListVolumesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVolumesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.volumes = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.volumes && message.volumes.length) { - object.volumes = []; - for (var j = 0; j < message.volumes.length; ++j) - object.volumes[j] = $root.google.cloud.netapp.v1.Volume.toObject(message.volumes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListVolumesResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - * @returns {Object.} JSON object - */ - ListVolumesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVolumesResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVolumesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesResponse"; - }; - - return ListVolumesResponse; - })(); - - v1.GetVolumeRequest = (function() { - - /** - * Properties of a GetVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetVolumeRequest - * @property {string|null} [name] GetVolumeRequest name - */ - - /** - * Constructs a new GetVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetVolumeRequest. - * @implements IGetVolumeRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set - */ - function GetVolumeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVolumeRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @instance - */ - GetVolumeRequest.prototype.name = ""; - - /** - * Creates a new GetVolumeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest instance - */ - GetVolumeRequest.create = function create(properties) { - return new GetVolumeRequest(properties); - }; - - /** - * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVolumeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVolumeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVolumeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVolumeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVolumeRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVolumeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest - */ - GetVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetVolumeRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {google.cloud.netapp.v1.GetVolumeRequest} message GetVolumeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVolumeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetVolumeRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @instance - * @returns {Object.} JSON object - */ - GetVolumeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetVolumeRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetVolumeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetVolumeRequest"; - }; - - return GetVolumeRequest; - })(); - - v1.CreateVolumeRequest = (function() { - - /** - * Properties of a CreateVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateVolumeRequest - * @property {string|null} [parent] CreateVolumeRequest parent - * @property {string|null} [volumeId] CreateVolumeRequest volumeId - * @property {google.cloud.netapp.v1.IVolume|null} [volume] CreateVolumeRequest volume - */ - - /** - * Constructs a new CreateVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateVolumeRequest. - * @implements ICreateVolumeRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set - */ - function CreateVolumeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateVolumeRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @instance - */ - CreateVolumeRequest.prototype.parent = ""; - - /** - * CreateVolumeRequest volumeId. - * @member {string} volumeId - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @instance - */ - CreateVolumeRequest.prototype.volumeId = ""; - - /** - * CreateVolumeRequest volume. - * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @instance - */ - CreateVolumeRequest.prototype.volume = null; - - /** - * Creates a new CreateVolumeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest instance - */ - CreateVolumeRequest.create = function create(properties) { - return new CreateVolumeRequest(properties); - }; - - /** - * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVolumeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); - if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) - $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVolumeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.volumeId = reader.string(); - break; - } - case 3: { - message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateVolumeRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateVolumeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - if (!$util.isString(message.volumeId)) - return "volumeId: string expected"; - if (message.volume != null && message.hasOwnProperty("volume")) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); - if (error) - return "volume." + error; - } - return null; - }; - - /** - * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest - */ - CreateVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateVolumeRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.volumeId != null) - message.volumeId = String(object.volumeId); - if (object.volume != null) { - if (typeof object.volume !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateVolumeRequest.volume: object expected"); - message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); - } - return message; - }; - - /** - * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.CreateVolumeRequest} message CreateVolumeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateVolumeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.volumeId = ""; - object.volume = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - object.volumeId = message.volumeId; - if (message.volume != null && message.hasOwnProperty("volume")) - object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); - return object; - }; - - /** - * Converts this CreateVolumeRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @instance - * @returns {Object.} JSON object - */ - CreateVolumeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateVolumeRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateVolumeRequest"; - }; - - return CreateVolumeRequest; - })(); - - v1.UpdateVolumeRequest = (function() { - - /** - * Properties of an UpdateVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateVolumeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVolumeRequest updateMask - * @property {google.cloud.netapp.v1.IVolume|null} [volume] UpdateVolumeRequest volume - */ - - /** - * Constructs a new UpdateVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateVolumeRequest. - * @implements IUpdateVolumeRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set - */ - function UpdateVolumeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateVolumeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @instance - */ - UpdateVolumeRequest.prototype.updateMask = null; - - /** - * UpdateVolumeRequest volume. - * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @instance - */ - UpdateVolumeRequest.prototype.volume = null; - - /** - * Creates a new UpdateVolumeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest instance - */ - UpdateVolumeRequest.create = function create(properties) { - return new UpdateVolumeRequest(properties); - }; - - /** - * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVolumeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) - $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVolumeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateVolumeRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateVolumeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.volume != null && message.hasOwnProperty("volume")) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); - if (error) - return "volume." + error; - } - return null; - }; - - /** - * Creates an UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest - */ - UpdateVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateVolumeRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.volume != null) { - if (typeof object.volume !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.volume: object expected"); - message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); - } - return message; - }; - - /** - * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {google.cloud.netapp.v1.UpdateVolumeRequest} message UpdateVolumeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateVolumeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.volume = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.volume != null && message.hasOwnProperty("volume")) - object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); - return object; - }; - - /** - * Converts this UpdateVolumeRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateVolumeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateVolumeRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateVolumeRequest"; - }; - - return UpdateVolumeRequest; - })(); - - v1.DeleteVolumeRequest = (function() { - - /** - * Properties of a DeleteVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteVolumeRequest - * @property {string|null} [name] DeleteVolumeRequest name - * @property {boolean|null} [force] DeleteVolumeRequest force - */ - - /** - * Constructs a new DeleteVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteVolumeRequest. - * @implements IDeleteVolumeRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set - */ - function DeleteVolumeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteVolumeRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @instance - */ - DeleteVolumeRequest.prototype.name = ""; - - /** - * DeleteVolumeRequest force. - * @member {boolean} force - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @instance - */ - DeleteVolumeRequest.prototype.force = false; - - /** - * Creates a new DeleteVolumeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest instance - */ - DeleteVolumeRequest.create = function create(properties) { - return new DeleteVolumeRequest(properties); - }; - - /** - * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVolumeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVolumeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVolumeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteVolumeRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteVolumeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest - */ - DeleteVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteVolumeRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {google.cloud.netapp.v1.DeleteVolumeRequest} message DeleteVolumeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteVolumeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteVolumeRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteVolumeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteVolumeRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteVolumeRequest"; - }; - - return DeleteVolumeRequest; - })(); - - v1.RevertVolumeRequest = (function() { - - /** - * Properties of a RevertVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @interface IRevertVolumeRequest - * @property {string|null} [name] RevertVolumeRequest name - * @property {string|null} [snapshotId] RevertVolumeRequest snapshotId - */ - - /** - * Constructs a new RevertVolumeRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a RevertVolumeRequest. - * @implements IRevertVolumeRequest - * @constructor - * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set - */ - function RevertVolumeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RevertVolumeRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @instance - */ - RevertVolumeRequest.prototype.name = ""; - - /** - * RevertVolumeRequest snapshotId. - * @member {string} snapshotId - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @instance - */ - RevertVolumeRequest.prototype.snapshotId = ""; - - /** - * Creates a new RevertVolumeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest instance - */ - RevertVolumeRequest.create = function create(properties) { - return new RevertVolumeRequest(properties); - }; - - /** - * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RevertVolumeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotId); - return writer; - }; - - /** - * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RevertVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RevertVolumeRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.snapshotId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RevertVolumeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RevertVolumeRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RevertVolumeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - if (!$util.isString(message.snapshotId)) - return "snapshotId: string expected"; - return null; - }; - - /** - * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest - */ - RevertVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.RevertVolumeRequest) - return object; - var message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.snapshotId != null) - message.snapshotId = String(object.snapshotId); - return message; - }; - - /** - * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {google.cloud.netapp.v1.RevertVolumeRequest} message RevertVolumeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RevertVolumeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.snapshotId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - object.snapshotId = message.snapshotId; - return object; - }; - - /** - * Converts this RevertVolumeRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @instance - * @returns {Object.} JSON object - */ - RevertVolumeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RevertVolumeRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.RevertVolumeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RevertVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.RevertVolumeRequest"; - }; - - return RevertVolumeRequest; - })(); - - v1.Volume = (function() { - - /** - * Properties of a Volume. - * @memberof google.cloud.netapp.v1 - * @interface IVolume - * @property {string|null} [name] Volume name - * @property {google.cloud.netapp.v1.Volume.State|null} [state] Volume state - * @property {string|null} [stateDetails] Volume stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] Volume createTime - * @property {string|null} [shareName] Volume shareName - * @property {string|null} [psaRange] Volume psaRange - * @property {string|null} [storagePool] Volume storagePool - * @property {string|null} [network] Volume network - * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] Volume serviceLevel - * @property {number|Long|null} [capacityGib] Volume capacityGib - * @property {google.cloud.netapp.v1.IExportPolicy|null} [exportPolicy] Volume exportPolicy - * @property {Array.|null} [protocols] Volume protocols - * @property {Array.|null} [smbSettings] Volume smbSettings - * @property {Array.|null} [mountOptions] Volume mountOptions - * @property {string|null} [unixPermissions] Volume unixPermissions - * @property {Object.|null} [labels] Volume labels - * @property {string|null} [description] Volume description - * @property {google.cloud.netapp.v1.ISnapshotPolicy|null} [snapshotPolicy] Volume snapshotPolicy - * @property {number|null} [snapReserve] Volume snapReserve - * @property {boolean|null} [snapshotDirectory] Volume snapshotDirectory - * @property {number|Long|null} [usedGib] Volume usedGib - * @property {google.cloud.netapp.v1.SecurityStyle|null} [securityStyle] Volume securityStyle - * @property {boolean|null} [kerberosEnabled] Volume kerberosEnabled - * @property {boolean|null} [ldapEnabled] Volume ldapEnabled - * @property {string|null} [activeDirectory] Volume activeDirectory - * @property {google.cloud.netapp.v1.IRestoreParameters|null} [restoreParameters] Volume restoreParameters - * @property {string|null} [kmsConfig] Volume kmsConfig - * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] Volume encryptionType - * @property {boolean|null} [hasReplication] Volume hasReplication - * @property {google.cloud.netapp.v1.IBackupConfig|null} [backupConfig] Volume backupConfig - * @property {Array.|null} [restrictedActions] Volume restrictedActions - * @property {boolean|null} [largeCapacity] Volume largeCapacity - * @property {boolean|null} [multipleEndpoints] Volume multipleEndpoints - * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] Volume tieringPolicy - * @property {string|null} [replicaZone] Volume replicaZone - * @property {string|null} [zone] Volume zone - * @property {number|Long|null} [coldTierSizeGib] Volume coldTierSizeGib - * @property {google.cloud.netapp.v1.IHybridReplicationParameters|null} [hybridReplicationParameters] Volume hybridReplicationParameters - * @property {number|null} [throughputMibps] Volume throughputMibps - * @property {google.cloud.netapp.v1.ICacheParameters|null} [cacheParameters] Volume cacheParameters - * @property {number|Long|null} [hotTierSizeUsedGib] Volume hotTierSizeUsedGib - * @property {Array.|null} [blockDevices] Volume blockDevices - * @property {google.cloud.netapp.v1.Volume.ICloneDetails|null} [cloneDetails] Volume cloneDetails - */ - - /** - * Constructs a new Volume. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Volume. - * @implements IVolume - * @constructor - * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set - */ - function Volume(properties) { - this.protocols = []; - this.smbSettings = []; - this.mountOptions = []; - this.labels = {}; - this.restrictedActions = []; - this.blockDevices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Volume name. - * @member {string} name - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.name = ""; - - /** - * Volume state. - * @member {google.cloud.netapp.v1.Volume.State} state - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.state = 0; - - /** - * Volume stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.stateDetails = ""; - - /** - * Volume createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.createTime = null; - - /** - * Volume shareName. - * @member {string} shareName - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.shareName = ""; - - /** - * Volume psaRange. - * @member {string} psaRange - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.psaRange = ""; - - /** - * Volume storagePool. - * @member {string} storagePool - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.storagePool = ""; - - /** - * Volume network. - * @member {string} network - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.network = ""; - - /** - * Volume serviceLevel. - * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.serviceLevel = 0; - - /** - * Volume capacityGib. - * @member {number|Long} capacityGib - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Volume exportPolicy. - * @member {google.cloud.netapp.v1.IExportPolicy|null|undefined} exportPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.exportPolicy = null; - - /** - * Volume protocols. - * @member {Array.} protocols - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.protocols = $util.emptyArray; - - /** - * Volume smbSettings. - * @member {Array.} smbSettings - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.smbSettings = $util.emptyArray; - - /** - * Volume mountOptions. - * @member {Array.} mountOptions - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.mountOptions = $util.emptyArray; - - /** - * Volume unixPermissions. - * @member {string} unixPermissions - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.unixPermissions = ""; - - /** - * Volume labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.labels = $util.emptyObject; - - /** - * Volume description. - * @member {string} description - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.description = ""; - - /** - * Volume snapshotPolicy. - * @member {google.cloud.netapp.v1.ISnapshotPolicy|null|undefined} snapshotPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.snapshotPolicy = null; - - /** - * Volume snapReserve. - * @member {number} snapReserve - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.snapReserve = 0; - - /** - * Volume snapshotDirectory. - * @member {boolean} snapshotDirectory - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.snapshotDirectory = false; - - /** - * Volume usedGib. - * @member {number|Long} usedGib - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.usedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Volume securityStyle. - * @member {google.cloud.netapp.v1.SecurityStyle} securityStyle - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.securityStyle = 0; - - /** - * Volume kerberosEnabled. - * @member {boolean} kerberosEnabled - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.kerberosEnabled = false; - - /** - * Volume ldapEnabled. - * @member {boolean} ldapEnabled - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.ldapEnabled = false; - - /** - * Volume activeDirectory. - * @member {string} activeDirectory - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.activeDirectory = ""; - - /** - * Volume restoreParameters. - * @member {google.cloud.netapp.v1.IRestoreParameters|null|undefined} restoreParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.restoreParameters = null; - - /** - * Volume kmsConfig. - * @member {string} kmsConfig - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.kmsConfig = ""; - - /** - * Volume encryptionType. - * @member {google.cloud.netapp.v1.EncryptionType} encryptionType - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.encryptionType = 0; - - /** - * Volume hasReplication. - * @member {boolean} hasReplication - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.hasReplication = false; - - /** - * Volume backupConfig. - * @member {google.cloud.netapp.v1.IBackupConfig|null|undefined} backupConfig - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.backupConfig = null; - - /** - * Volume restrictedActions. - * @member {Array.} restrictedActions - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.restrictedActions = $util.emptyArray; - - /** - * Volume largeCapacity. - * @member {boolean} largeCapacity - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.largeCapacity = false; - - /** - * Volume multipleEndpoints. - * @member {boolean} multipleEndpoints - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.multipleEndpoints = false; - - /** - * Volume tieringPolicy. - * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.tieringPolicy = null; - - /** - * Volume replicaZone. - * @member {string} replicaZone - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.replicaZone = ""; - - /** - * Volume zone. - * @member {string} zone - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.zone = ""; - - /** - * Volume coldTierSizeGib. - * @member {number|Long} coldTierSizeGib - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.coldTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Volume hybridReplicationParameters. - * @member {google.cloud.netapp.v1.IHybridReplicationParameters|null|undefined} hybridReplicationParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.hybridReplicationParameters = null; - - /** - * Volume throughputMibps. - * @member {number} throughputMibps - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.throughputMibps = 0; - - /** - * Volume cacheParameters. - * @member {google.cloud.netapp.v1.ICacheParameters|null|undefined} cacheParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.cacheParameters = null; - - /** - * Volume hotTierSizeUsedGib. - * @member {number|Long} hotTierSizeUsedGib - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Volume blockDevices. - * @member {Array.} blockDevices - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.blockDevices = $util.emptyArray; - - /** - * Volume cloneDetails. - * @member {google.cloud.netapp.v1.Volume.ICloneDetails|null|undefined} cloneDetails - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.cloneDetails = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Volume.prototype, "_backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["backupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Volume.prototype, "_tieringPolicy", { - get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Volume instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Volume} Volume instance - */ - Volume.create = function create(properties) { - return new Volume(properties); - }; - - /** - * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Volume.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.shareName); - if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.psaRange); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.storagePool); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); - if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.serviceLevel); - if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.capacityGib); - if (message.exportPolicy != null && Object.hasOwnProperty.call(message, "exportPolicy")) - $root.google.cloud.netapp.v1.ExportPolicy.encode(message.exportPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.protocols != null && message.protocols.length) { - writer.uint32(/* id 12, wireType 2 =*/98).fork(); - for (var i = 0; i < message.protocols.length; ++i) - writer.int32(message.protocols[i]); - writer.ldelim(); - } - if (message.smbSettings != null && message.smbSettings.length) { - writer.uint32(/* id 13, wireType 2 =*/106).fork(); - for (var i = 0; i < message.smbSettings.length; ++i) - writer.int32(message.smbSettings[i]); - writer.ldelim(); - } - if (message.mountOptions != null && message.mountOptions.length) - for (var i = 0; i < message.mountOptions.length; ++i) - $root.google.cloud.netapp.v1.MountOption.encode(message.mountOptions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.unixPermissions != null && Object.hasOwnProperty.call(message, "unixPermissions")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.unixPermissions); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); - if (message.snapshotPolicy != null && Object.hasOwnProperty.call(message, "snapshotPolicy")) - $root.google.cloud.netapp.v1.SnapshotPolicy.encode(message.snapshotPolicy, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.snapReserve != null && Object.hasOwnProperty.call(message, "snapReserve")) - writer.uint32(/* id 19, wireType 1 =*/153).double(message.snapReserve); - if (message.snapshotDirectory != null && Object.hasOwnProperty.call(message, "snapshotDirectory")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.snapshotDirectory); - if (message.usedGib != null && Object.hasOwnProperty.call(message, "usedGib")) - writer.uint32(/* id 21, wireType 0 =*/168).int64(message.usedGib); - if (message.securityStyle != null && Object.hasOwnProperty.call(message, "securityStyle")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.securityStyle); - if (message.kerberosEnabled != null && Object.hasOwnProperty.call(message, "kerberosEnabled")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.kerberosEnabled); - if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.ldapEnabled); - if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.activeDirectory); - if (message.restoreParameters != null && Object.hasOwnProperty.call(message, "restoreParameters")) - $root.google.cloud.netapp.v1.RestoreParameters.encode(message.restoreParameters, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.kmsConfig); - if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) - writer.uint32(/* id 28, wireType 0 =*/224).int32(message.encryptionType); - if (message.hasReplication != null && Object.hasOwnProperty.call(message, "hasReplication")) - writer.uint32(/* id 29, wireType 0 =*/232).bool(message.hasReplication); - if (message.backupConfig != null && Object.hasOwnProperty.call(message, "backupConfig")) - $root.google.cloud.netapp.v1.BackupConfig.encode(message.backupConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.restrictedActions != null && message.restrictedActions.length) { - writer.uint32(/* id 31, wireType 2 =*/250).fork(); - for (var i = 0; i < message.restrictedActions.length; ++i) - writer.int32(message.restrictedActions[i]); - writer.ldelim(); - } - if (message.largeCapacity != null && Object.hasOwnProperty.call(message, "largeCapacity")) - writer.uint32(/* id 32, wireType 0 =*/256).bool(message.largeCapacity); - if (message.multipleEndpoints != null && Object.hasOwnProperty.call(message, "multipleEndpoints")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.multipleEndpoints); - if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) - $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.replicaZone); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.zone); - if (message.coldTierSizeGib != null && Object.hasOwnProperty.call(message, "coldTierSizeGib")) - writer.uint32(/* id 39, wireType 0 =*/312).int64(message.coldTierSizeGib); - if (message.hybridReplicationParameters != null && Object.hasOwnProperty.call(message, "hybridReplicationParameters")) - $root.google.cloud.netapp.v1.HybridReplicationParameters.encode(message.hybridReplicationParameters, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.throughputMibps != null && Object.hasOwnProperty.call(message, "throughputMibps")) - writer.uint32(/* id 41, wireType 1 =*/329).double(message.throughputMibps); - if (message.cacheParameters != null && Object.hasOwnProperty.call(message, "cacheParameters")) - $root.google.cloud.netapp.v1.CacheParameters.encode(message.cacheParameters, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) - writer.uint32(/* id 44, wireType 0 =*/352).int64(message.hotTierSizeUsedGib); - if (message.blockDevices != null && message.blockDevices.length) - for (var i = 0; i < message.blockDevices.length; ++i) - $root.google.cloud.netapp.v1.BlockDevice.encode(message.blockDevices[i], writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); - if (message.cloneDetails != null && Object.hasOwnProperty.call(message, "cloneDetails")) - $root.google.cloud.netapp.v1.Volume.CloneDetails.encode(message.cloneDetails, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Volume.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Volume message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Volume} Volume - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Volume.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.stateDetails = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.shareName = reader.string(); - break; - } - case 6: { - message.psaRange = reader.string(); - break; - } - case 7: { - message.storagePool = reader.string(); - break; - } - case 8: { - message.network = reader.string(); - break; - } - case 9: { - message.serviceLevel = reader.int32(); - break; - } - case 10: { - message.capacityGib = reader.int64(); - break; - } - case 11: { - message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.protocols.push(reader.int32()); - } else - message.protocols.push(reader.int32()); - break; - } - case 13: { - if (!(message.smbSettings && message.smbSettings.length)) - message.smbSettings = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.smbSettings.push(reader.int32()); - } else - message.smbSettings.push(reader.int32()); - break; - } - case 14: { - if (!(message.mountOptions && message.mountOptions.length)) - message.mountOptions = []; - message.mountOptions.push($root.google.cloud.netapp.v1.MountOption.decode(reader, reader.uint32())); - break; - } - case 15: { - message.unixPermissions = reader.string(); - break; - } - case 16: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 17: { - message.description = reader.string(); - break; - } - case 18: { - message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.decode(reader, reader.uint32()); - break; - } - case 19: { - message.snapReserve = reader.double(); - break; - } - case 20: { - message.snapshotDirectory = reader.bool(); - break; - } - case 21: { - message.usedGib = reader.int64(); - break; - } - case 22: { - message.securityStyle = reader.int32(); - break; - } - case 23: { - message.kerberosEnabled = reader.bool(); - break; - } - case 24: { - message.ldapEnabled = reader.bool(); - break; - } - case 25: { - message.activeDirectory = reader.string(); - break; - } - case 26: { - message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.decode(reader, reader.uint32()); - break; - } - case 27: { - message.kmsConfig = reader.string(); - break; - } - case 28: { - message.encryptionType = reader.int32(); - break; - } - case 29: { - message.hasReplication = reader.bool(); - break; - } - case 30: { - message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.decode(reader, reader.uint32()); - break; - } - case 31: { - if (!(message.restrictedActions && message.restrictedActions.length)) - message.restrictedActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedActions.push(reader.int32()); - } else - message.restrictedActions.push(reader.int32()); - break; - } - case 32: { - message.largeCapacity = reader.bool(); - break; - } - case 33: { - message.multipleEndpoints = reader.bool(); - break; - } - case 34: { - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); - break; - } - case 36: { - message.replicaZone = reader.string(); - break; - } - case 37: { - message.zone = reader.string(); - break; - } - case 39: { - message.coldTierSizeGib = reader.int64(); - break; - } - case 40: { - message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.decode(reader, reader.uint32()); - break; - } - case 41: { - message.throughputMibps = reader.double(); - break; - } - case 42: { - message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.decode(reader, reader.uint32()); - break; - } - case 44: { - message.hotTierSizeUsedGib = reader.int64(); - break; - } - case 45: { - if (!(message.blockDevices && message.blockDevices.length)) - message.blockDevices = []; - message.blockDevices.push($root.google.cloud.netapp.v1.BlockDevice.decode(reader, reader.uint32())); - break; - } - case 47: { - message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Volume message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Volume} Volume - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Volume.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Volume message. - * @function verify - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Volume.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.shareName != null && message.hasOwnProperty("shareName")) - if (!$util.isString(message.shareName)) - return "shareName: string expected"; - if (message.psaRange != null && message.hasOwnProperty("psaRange")) - if (!$util.isString(message.psaRange)) - return "psaRange: string expected"; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - if (!$util.isString(message.storagePool)) - return "storagePool: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - switch (message.serviceLevel) { - default: - return "serviceLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) - if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) - return "capacityGib: integer|Long expected"; - if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) { - var error = $root.google.cloud.netapp.v1.ExportPolicy.verify(message.exportPolicy); - if (error) - return "exportPolicy." + error; - } - if (message.protocols != null && message.hasOwnProperty("protocols")) { - if (!Array.isArray(message.protocols)) - return "protocols: array expected"; - for (var i = 0; i < message.protocols.length; ++i) - switch (message.protocols[i]) { - default: - return "protocols: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.smbSettings != null && message.hasOwnProperty("smbSettings")) { - if (!Array.isArray(message.smbSettings)) - return "smbSettings: array expected"; - for (var i = 0; i < message.smbSettings.length; ++i) - switch (message.smbSettings[i]) { - default: - return "smbSettings: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.mountOptions != null && message.hasOwnProperty("mountOptions")) { - if (!Array.isArray(message.mountOptions)) - return "mountOptions: array expected"; - for (var i = 0; i < message.mountOptions.length; ++i) { - var error = $root.google.cloud.netapp.v1.MountOption.verify(message.mountOptions[i]); - if (error) - return "mountOptions." + error; - } - } - if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) - if (!$util.isString(message.unixPermissions)) - return "unixPermissions: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) { - var error = $root.google.cloud.netapp.v1.SnapshotPolicy.verify(message.snapshotPolicy); - if (error) - return "snapshotPolicy." + error; - } - if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) - if (typeof message.snapReserve !== "number") - return "snapReserve: number expected"; - if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) - if (typeof message.snapshotDirectory !== "boolean") - return "snapshotDirectory: boolean expected"; - if (message.usedGib != null && message.hasOwnProperty("usedGib")) - if (!$util.isInteger(message.usedGib) && !(message.usedGib && $util.isInteger(message.usedGib.low) && $util.isInteger(message.usedGib.high))) - return "usedGib: integer|Long expected"; - if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) - switch (message.securityStyle) { - default: - return "securityStyle: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) - if (typeof message.kerberosEnabled !== "boolean") - return "kerberosEnabled: boolean expected"; - if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) - if (typeof message.ldapEnabled !== "boolean") - return "ldapEnabled: boolean expected"; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - if (!$util.isString(message.activeDirectory)) - return "activeDirectory: string expected"; - if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) { - var error = $root.google.cloud.netapp.v1.RestoreParameters.verify(message.restoreParameters); - if (error) - return "restoreParameters." + error; - } - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - if (!$util.isString(message.kmsConfig)) - return "kmsConfig: string expected"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - switch (message.encryptionType) { - default: - return "encryptionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) - if (typeof message.hasReplication !== "boolean") - return "hasReplication: boolean expected"; - if (message.backupConfig != null && message.hasOwnProperty("backupConfig")) { - properties._backupConfig = 1; - { - var error = $root.google.cloud.netapp.v1.BackupConfig.verify(message.backupConfig); - if (error) - return "backupConfig." + error; - } - } - if (message.restrictedActions != null && message.hasOwnProperty("restrictedActions")) { - if (!Array.isArray(message.restrictedActions)) - return "restrictedActions: array expected"; - for (var i = 0; i < message.restrictedActions.length; ++i) - switch (message.restrictedActions[i]) { - default: - return "restrictedActions: enum value[] expected"; - case 0: - case 1: - break; - } - } - if (message.largeCapacity != null && message.hasOwnProperty("largeCapacity")) - if (typeof message.largeCapacity !== "boolean") - return "largeCapacity: boolean expected"; - if (message.multipleEndpoints != null && message.hasOwnProperty("multipleEndpoints")) - if (typeof message.multipleEndpoints !== "boolean") - return "multipleEndpoints: boolean expected"; - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - properties._tieringPolicy = 1; - { - var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); - if (error) - return "tieringPolicy." + error; - } - } - if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) - if (!$util.isString(message.replicaZone)) - return "replicaZone: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.coldTierSizeGib != null && message.hasOwnProperty("coldTierSizeGib")) - if (!$util.isInteger(message.coldTierSizeGib) && !(message.coldTierSizeGib && $util.isInteger(message.coldTierSizeGib.low) && $util.isInteger(message.coldTierSizeGib.high))) - return "coldTierSizeGib: integer|Long expected"; - if (message.hybridReplicationParameters != null && message.hasOwnProperty("hybridReplicationParameters")) { - var error = $root.google.cloud.netapp.v1.HybridReplicationParameters.verify(message.hybridReplicationParameters); - if (error) - return "hybridReplicationParameters." + error; - } - if (message.throughputMibps != null && message.hasOwnProperty("throughputMibps")) - if (typeof message.throughputMibps !== "number") - return "throughputMibps: number expected"; - if (message.cacheParameters != null && message.hasOwnProperty("cacheParameters")) { - var error = $root.google.cloud.netapp.v1.CacheParameters.verify(message.cacheParameters); - if (error) - return "cacheParameters." + error; - } - if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) - if (!$util.isInteger(message.hotTierSizeUsedGib) && !(message.hotTierSizeUsedGib && $util.isInteger(message.hotTierSizeUsedGib.low) && $util.isInteger(message.hotTierSizeUsedGib.high))) - return "hotTierSizeUsedGib: integer|Long expected"; - if (message.blockDevices != null && message.hasOwnProperty("blockDevices")) { - if (!Array.isArray(message.blockDevices)) - return "blockDevices: array expected"; - for (var i = 0; i < message.blockDevices.length; ++i) { - var error = $root.google.cloud.netapp.v1.BlockDevice.verify(message.blockDevices[i]); - if (error) - return "blockDevices." + error; - } - } - if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) { - var error = $root.google.cloud.netapp.v1.Volume.CloneDetails.verify(message.cloneDetails); - if (error) - return "cloneDetails." + error; - } - return null; - }; - - /** - * Creates a Volume message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Volume} Volume - */ - Volume.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Volume) - return object; - var message = new $root.google.cloud.netapp.v1.Volume(); - 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 "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "UPDATING": - case 4: - message.state = 4; - break; - case "RESTORING": - case 5: - message.state = 5; - break; - case "DISABLED": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; - case "PREPARING": - case 8: - message.state = 8; - break; - case "READ_ONLY": - case 9: - message.state = 9; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.shareName != null) - message.shareName = String(object.shareName); - if (object.psaRange != null) - message.psaRange = String(object.psaRange); - if (object.storagePool != null) - message.storagePool = String(object.storagePool); - if (object.network != null) - message.network = String(object.network); - switch (object.serviceLevel) { - default: - if (typeof object.serviceLevel === "number") { - message.serviceLevel = object.serviceLevel; - break; - } - break; - case "SERVICE_LEVEL_UNSPECIFIED": - case 0: - message.serviceLevel = 0; - break; - case "PREMIUM": - case 1: - message.serviceLevel = 1; - break; - case "EXTREME": - case 2: - message.serviceLevel = 2; - break; - case "STANDARD": - case 3: - message.serviceLevel = 3; - break; - case "FLEX": - case 4: - message.serviceLevel = 4; - break; - } - if (object.capacityGib != null) - if ($util.Long) - (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; - else if (typeof object.capacityGib === "string") - message.capacityGib = parseInt(object.capacityGib, 10); - else if (typeof object.capacityGib === "number") - message.capacityGib = object.capacityGib; - else if (typeof object.capacityGib === "object") - message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); - if (object.exportPolicy != null) { - if (typeof object.exportPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.exportPolicy: object expected"); - message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.fromObject(object.exportPolicy); - } - if (object.protocols) { - if (!Array.isArray(object.protocols)) - throw TypeError(".google.cloud.netapp.v1.Volume.protocols: array expected"); - message.protocols = []; - for (var i = 0; i < object.protocols.length; ++i) - switch (object.protocols[i]) { - default: - if (typeof object.protocols[i] === "number") { - message.protocols[i] = object.protocols[i]; - break; - } - case "PROTOCOLS_UNSPECIFIED": - case 0: - message.protocols[i] = 0; - break; - case "NFSV3": - case 1: - message.protocols[i] = 1; - break; - case "NFSV4": - case 2: - message.protocols[i] = 2; - break; - case "SMB": - case 3: - message.protocols[i] = 3; - break; - case "ISCSI": - case 4: - message.protocols[i] = 4; - break; - } - } - if (object.smbSettings) { - if (!Array.isArray(object.smbSettings)) - throw TypeError(".google.cloud.netapp.v1.Volume.smbSettings: array expected"); - message.smbSettings = []; - for (var i = 0; i < object.smbSettings.length; ++i) - switch (object.smbSettings[i]) { - default: - if (typeof object.smbSettings[i] === "number") { - message.smbSettings[i] = object.smbSettings[i]; - break; - } - case "SMB_SETTINGS_UNSPECIFIED": - case 0: - message.smbSettings[i] = 0; - break; - case "ENCRYPT_DATA": - case 1: - message.smbSettings[i] = 1; - break; - case "BROWSABLE": - case 2: - message.smbSettings[i] = 2; - break; - case "CHANGE_NOTIFY": - case 3: - message.smbSettings[i] = 3; - break; - case "NON_BROWSABLE": - case 4: - message.smbSettings[i] = 4; - break; - case "OPLOCKS": - case 5: - message.smbSettings[i] = 5; - break; - case "SHOW_SNAPSHOT": - case 6: - message.smbSettings[i] = 6; - break; - case "SHOW_PREVIOUS_VERSIONS": - case 7: - message.smbSettings[i] = 7; - break; - case "ACCESS_BASED_ENUMERATION": - case 8: - message.smbSettings[i] = 8; - break; - case "CONTINUOUSLY_AVAILABLE": - case 9: - message.smbSettings[i] = 9; - break; - } - } - if (object.mountOptions) { - if (!Array.isArray(object.mountOptions)) - throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: array expected"); - message.mountOptions = []; - for (var i = 0; i < object.mountOptions.length; ++i) { - if (typeof object.mountOptions[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.mountOptions: object expected"); - message.mountOptions[i] = $root.google.cloud.netapp.v1.MountOption.fromObject(object.mountOptions[i]); - } - } - if (object.unixPermissions != null) - message.unixPermissions = String(object.unixPermissions); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - if (object.snapshotPolicy != null) { - if (typeof object.snapshotPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.snapshotPolicy: object expected"); - message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.fromObject(object.snapshotPolicy); - } - if (object.snapReserve != null) - message.snapReserve = Number(object.snapReserve); - if (object.snapshotDirectory != null) - message.snapshotDirectory = Boolean(object.snapshotDirectory); - if (object.usedGib != null) - if ($util.Long) - (message.usedGib = $util.Long.fromValue(object.usedGib)).unsigned = false; - else if (typeof object.usedGib === "string") - message.usedGib = parseInt(object.usedGib, 10); - else if (typeof object.usedGib === "number") - message.usedGib = object.usedGib; - else if (typeof object.usedGib === "object") - message.usedGib = new $util.LongBits(object.usedGib.low >>> 0, object.usedGib.high >>> 0).toNumber(); - switch (object.securityStyle) { - default: - if (typeof object.securityStyle === "number") { - message.securityStyle = object.securityStyle; - break; - } - break; - case "SECURITY_STYLE_UNSPECIFIED": - case 0: - message.securityStyle = 0; - break; - case "NTFS": - case 1: - message.securityStyle = 1; - break; - case "UNIX": - case 2: - message.securityStyle = 2; - break; - } - if (object.kerberosEnabled != null) - message.kerberosEnabled = Boolean(object.kerberosEnabled); - if (object.ldapEnabled != null) - message.ldapEnabled = Boolean(object.ldapEnabled); - if (object.activeDirectory != null) - message.activeDirectory = String(object.activeDirectory); - if (object.restoreParameters != null) { - if (typeof object.restoreParameters !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.restoreParameters: object expected"); - message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.fromObject(object.restoreParameters); - } - if (object.kmsConfig != null) - message.kmsConfig = String(object.kmsConfig); - switch (object.encryptionType) { - default: - if (typeof object.encryptionType === "number") { - message.encryptionType = object.encryptionType; - break; - } - break; - case "ENCRYPTION_TYPE_UNSPECIFIED": - case 0: - message.encryptionType = 0; - break; - case "SERVICE_MANAGED": - case 1: - message.encryptionType = 1; - break; - case "CLOUD_KMS": - case 2: - message.encryptionType = 2; - break; - } - if (object.hasReplication != null) - message.hasReplication = Boolean(object.hasReplication); - if (object.backupConfig != null) { - if (typeof object.backupConfig !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.backupConfig: object expected"); - message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.fromObject(object.backupConfig); - } - if (object.restrictedActions) { - if (!Array.isArray(object.restrictedActions)) - throw TypeError(".google.cloud.netapp.v1.Volume.restrictedActions: array expected"); - message.restrictedActions = []; - for (var i = 0; i < object.restrictedActions.length; ++i) - switch (object.restrictedActions[i]) { - default: - if (typeof object.restrictedActions[i] === "number") { - message.restrictedActions[i] = object.restrictedActions[i]; - break; - } - case "RESTRICTED_ACTION_UNSPECIFIED": - case 0: - message.restrictedActions[i] = 0; - break; - case "DELETE": - case 1: - message.restrictedActions[i] = 1; - break; - } - } - if (object.largeCapacity != null) - message.largeCapacity = Boolean(object.largeCapacity); - if (object.multipleEndpoints != null) - message.multipleEndpoints = Boolean(object.multipleEndpoints); - if (object.tieringPolicy != null) { - if (typeof object.tieringPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.tieringPolicy: object expected"); - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); - } - if (object.replicaZone != null) - message.replicaZone = String(object.replicaZone); - if (object.zone != null) - message.zone = String(object.zone); - if (object.coldTierSizeGib != null) - if ($util.Long) - (message.coldTierSizeGib = $util.Long.fromValue(object.coldTierSizeGib)).unsigned = false; - else if (typeof object.coldTierSizeGib === "string") - message.coldTierSizeGib = parseInt(object.coldTierSizeGib, 10); - else if (typeof object.coldTierSizeGib === "number") - message.coldTierSizeGib = object.coldTierSizeGib; - else if (typeof object.coldTierSizeGib === "object") - message.coldTierSizeGib = new $util.LongBits(object.coldTierSizeGib.low >>> 0, object.coldTierSizeGib.high >>> 0).toNumber(); - if (object.hybridReplicationParameters != null) { - if (typeof object.hybridReplicationParameters !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.hybridReplicationParameters: object expected"); - message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.fromObject(object.hybridReplicationParameters); - } - if (object.throughputMibps != null) - message.throughputMibps = Number(object.throughputMibps); - if (object.cacheParameters != null) { - if (typeof object.cacheParameters !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.cacheParameters: object expected"); - message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.fromObject(object.cacheParameters); - } - if (object.hotTierSizeUsedGib != null) - if ($util.Long) - (message.hotTierSizeUsedGib = $util.Long.fromValue(object.hotTierSizeUsedGib)).unsigned = false; - else if (typeof object.hotTierSizeUsedGib === "string") - message.hotTierSizeUsedGib = parseInt(object.hotTierSizeUsedGib, 10); - else if (typeof object.hotTierSizeUsedGib === "number") - message.hotTierSizeUsedGib = object.hotTierSizeUsedGib; - else if (typeof object.hotTierSizeUsedGib === "object") - message.hotTierSizeUsedGib = new $util.LongBits(object.hotTierSizeUsedGib.low >>> 0, object.hotTierSizeUsedGib.high >>> 0).toNumber(); - if (object.blockDevices) { - if (!Array.isArray(object.blockDevices)) - throw TypeError(".google.cloud.netapp.v1.Volume.blockDevices: array expected"); - message.blockDevices = []; - for (var i = 0; i < object.blockDevices.length; ++i) { - if (typeof object.blockDevices[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.blockDevices: object expected"); - message.blockDevices[i] = $root.google.cloud.netapp.v1.BlockDevice.fromObject(object.blockDevices[i]); - } - } - if (object.cloneDetails != null) { - if (typeof object.cloneDetails !== "object") - throw TypeError(".google.cloud.netapp.v1.Volume.cloneDetails: object expected"); - message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.fromObject(object.cloneDetails); - } - return message; - }; - - /** - * Creates a plain object from a Volume message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {google.cloud.netapp.v1.Volume} message Volume - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Volume.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.protocols = []; - object.smbSettings = []; - object.mountOptions = []; - object.restrictedActions = []; - object.blockDevices = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateDetails = ""; - object.createTime = null; - object.shareName = ""; - object.psaRange = ""; - object.storagePool = ""; - object.network = ""; - object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.capacityGib = options.longs === String ? "0" : 0; - object.exportPolicy = null; - object.unixPermissions = ""; - object.description = ""; - object.snapshotPolicy = null; - object.snapReserve = 0; - object.snapshotDirectory = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.usedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.usedGib = options.longs === String ? "0" : 0; - object.securityStyle = options.enums === String ? "SECURITY_STYLE_UNSPECIFIED" : 0; - object.kerberosEnabled = false; - object.ldapEnabled = false; - object.activeDirectory = ""; - object.restoreParameters = null; - object.kmsConfig = ""; - object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; - object.hasReplication = false; - object.largeCapacity = false; - object.multipleEndpoints = false; - object.replicaZone = ""; - object.zone = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.coldTierSizeGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.coldTierSizeGib = options.longs === String ? "0" : 0; - object.hybridReplicationParameters = null; - object.throughputMibps = 0; - object.cacheParameters = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hotTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hotTierSizeUsedGib = options.longs === String ? "0" : 0; - object.cloneDetails = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.Volume.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Volume.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.shareName != null && message.hasOwnProperty("shareName")) - object.shareName = message.shareName; - if (message.psaRange != null && message.hasOwnProperty("psaRange")) - object.psaRange = message.psaRange; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = message.storagePool; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; - if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) - if (typeof message.capacityGib === "number") - object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; - else - object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; - if (message.exportPolicy != null && message.hasOwnProperty("exportPolicy")) - object.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.toObject(message.exportPolicy, options); - if (message.protocols && message.protocols.length) { - object.protocols = []; - for (var j = 0; j < message.protocols.length; ++j) - object.protocols[j] = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] === undefined ? message.protocols[j] : $root.google.cloud.netapp.v1.Protocols[message.protocols[j]] : message.protocols[j]; - } - if (message.smbSettings && message.smbSettings.length) { - object.smbSettings = []; - for (var j = 0; j < message.smbSettings.length; ++j) - object.smbSettings[j] = options.enums === String ? $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] === undefined ? message.smbSettings[j] : $root.google.cloud.netapp.v1.SMBSettings[message.smbSettings[j]] : message.smbSettings[j]; - } - if (message.mountOptions && message.mountOptions.length) { - object.mountOptions = []; - for (var j = 0; j < message.mountOptions.length; ++j) - object.mountOptions[j] = $root.google.cloud.netapp.v1.MountOption.toObject(message.mountOptions[j], options); - } - if (message.unixPermissions != null && message.hasOwnProperty("unixPermissions")) - object.unixPermissions = message.unixPermissions; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.snapshotPolicy != null && message.hasOwnProperty("snapshotPolicy")) - object.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.toObject(message.snapshotPolicy, options); - if (message.snapReserve != null && message.hasOwnProperty("snapReserve")) - object.snapReserve = options.json && !isFinite(message.snapReserve) ? String(message.snapReserve) : message.snapReserve; - if (message.snapshotDirectory != null && message.hasOwnProperty("snapshotDirectory")) - object.snapshotDirectory = message.snapshotDirectory; - if (message.usedGib != null && message.hasOwnProperty("usedGib")) - if (typeof message.usedGib === "number") - object.usedGib = options.longs === String ? String(message.usedGib) : message.usedGib; - else - object.usedGib = options.longs === String ? $util.Long.prototype.toString.call(message.usedGib) : options.longs === Number ? new $util.LongBits(message.usedGib.low >>> 0, message.usedGib.high >>> 0).toNumber() : message.usedGib; - if (message.securityStyle != null && message.hasOwnProperty("securityStyle")) - object.securityStyle = options.enums === String ? $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] === undefined ? message.securityStyle : $root.google.cloud.netapp.v1.SecurityStyle[message.securityStyle] : message.securityStyle; - if (message.kerberosEnabled != null && message.hasOwnProperty("kerberosEnabled")) - object.kerberosEnabled = message.kerberosEnabled; - if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) - object.ldapEnabled = message.ldapEnabled; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - object.activeDirectory = message.activeDirectory; - if (message.restoreParameters != null && message.hasOwnProperty("restoreParameters")) - object.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.toObject(message.restoreParameters, options); - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - object.kmsConfig = message.kmsConfig; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; - if (message.hasReplication != null && message.hasOwnProperty("hasReplication")) - object.hasReplication = message.hasReplication; - if (message.backupConfig != null && message.hasOwnProperty("backupConfig")) { - object.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.toObject(message.backupConfig, options); - if (options.oneofs) - object._backupConfig = "backupConfig"; - } - if (message.restrictedActions && message.restrictedActions.length) { - object.restrictedActions = []; - for (var j = 0; j < message.restrictedActions.length; ++j) - object.restrictedActions[j] = options.enums === String ? $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] === undefined ? message.restrictedActions[j] : $root.google.cloud.netapp.v1.RestrictedAction[message.restrictedActions[j]] : message.restrictedActions[j]; - } - if (message.largeCapacity != null && message.hasOwnProperty("largeCapacity")) - object.largeCapacity = message.largeCapacity; - if (message.multipleEndpoints != null && message.hasOwnProperty("multipleEndpoints")) - object.multipleEndpoints = message.multipleEndpoints; - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); - if (options.oneofs) - object._tieringPolicy = "tieringPolicy"; - } - if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) - object.replicaZone = message.replicaZone; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.coldTierSizeGib != null && message.hasOwnProperty("coldTierSizeGib")) - if (typeof message.coldTierSizeGib === "number") - object.coldTierSizeGib = options.longs === String ? String(message.coldTierSizeGib) : message.coldTierSizeGib; - else - object.coldTierSizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.coldTierSizeGib) : options.longs === Number ? new $util.LongBits(message.coldTierSizeGib.low >>> 0, message.coldTierSizeGib.high >>> 0).toNumber() : message.coldTierSizeGib; - if (message.hybridReplicationParameters != null && message.hasOwnProperty("hybridReplicationParameters")) - object.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.toObject(message.hybridReplicationParameters, options); - if (message.throughputMibps != null && message.hasOwnProperty("throughputMibps")) - object.throughputMibps = options.json && !isFinite(message.throughputMibps) ? String(message.throughputMibps) : message.throughputMibps; - if (message.cacheParameters != null && message.hasOwnProperty("cacheParameters")) - object.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.toObject(message.cacheParameters, options); - if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) - if (typeof message.hotTierSizeUsedGib === "number") - object.hotTierSizeUsedGib = options.longs === String ? String(message.hotTierSizeUsedGib) : message.hotTierSizeUsedGib; - else - object.hotTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeUsedGib.low >>> 0, message.hotTierSizeUsedGib.high >>> 0).toNumber() : message.hotTierSizeUsedGib; - if (message.blockDevices && message.blockDevices.length) { - object.blockDevices = []; - for (var j = 0; j < message.blockDevices.length; ++j) - object.blockDevices[j] = $root.google.cloud.netapp.v1.BlockDevice.toObject(message.blockDevices[j], options); - } - if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) - object.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.toObject(message.cloneDetails, options); - return object; - }; - - /** - * Converts this Volume to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.Volume - * @instance - * @returns {Object.} JSON object - */ - Volume.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Volume - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Volume - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.Volume"; - }; - - Volume.CloneDetails = (function() { - - /** - * Properties of a CloneDetails. - * @memberof google.cloud.netapp.v1.Volume - * @interface ICloneDetails - * @property {string|null} [sourceSnapshot] CloneDetails sourceSnapshot - * @property {string|null} [sourceVolume] CloneDetails sourceVolume - * @property {number|Long|null} [sharedSpaceGib] CloneDetails sharedSpaceGib - */ - - /** - * Constructs a new CloneDetails. - * @memberof google.cloud.netapp.v1.Volume - * @classdesc Represents a CloneDetails. - * @implements ICloneDetails - * @constructor - * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set - */ - function CloneDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloneDetails sourceSnapshot. - * @member {string} sourceSnapshot - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @instance - */ - CloneDetails.prototype.sourceSnapshot = ""; - - /** - * CloneDetails sourceVolume. - * @member {string} sourceVolume - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @instance - */ - CloneDetails.prototype.sourceVolume = ""; - - /** - * CloneDetails sharedSpaceGib. - * @member {number|Long} sharedSpaceGib - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @instance - */ - CloneDetails.prototype.sharedSpaceGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CloneDetails instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails instance - */ - CloneDetails.create = function create(properties) { - return new CloneDetails(properties); - }; - - /** - * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloneDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); - if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceVolume); - if (message.sharedSpaceGib != null && Object.hasOwnProperty.call(message, "sharedSpaceGib")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sharedSpaceGib); - return writer; - }; - - /** - * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloneDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloneDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloneDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sourceSnapshot = reader.string(); - break; - } - case 2: { - message.sourceVolume = reader.string(); - break; - } - case 3: { - message.sharedSpaceGib = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloneDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloneDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloneDetails message. - * @function verify - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloneDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) - if (!$util.isString(message.sourceSnapshot)) - return "sourceSnapshot: string expected"; - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - if (!$util.isString(message.sourceVolume)) - return "sourceVolume: string expected"; - if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) - if (!$util.isInteger(message.sharedSpaceGib) && !(message.sharedSpaceGib && $util.isInteger(message.sharedSpaceGib.low) && $util.isInteger(message.sharedSpaceGib.high))) - return "sharedSpaceGib: integer|Long expected"; - return null; - }; - - /** - * Creates a CloneDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails - */ - CloneDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Volume.CloneDetails) - return object; - var message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); - if (object.sourceSnapshot != null) - message.sourceSnapshot = String(object.sourceSnapshot); - if (object.sourceVolume != null) - message.sourceVolume = String(object.sourceVolume); - if (object.sharedSpaceGib != null) - if ($util.Long) - (message.sharedSpaceGib = $util.Long.fromValue(object.sharedSpaceGib)).unsigned = false; - else if (typeof object.sharedSpaceGib === "string") - message.sharedSpaceGib = parseInt(object.sharedSpaceGib, 10); - else if (typeof object.sharedSpaceGib === "number") - message.sharedSpaceGib = object.sharedSpaceGib; - else if (typeof object.sharedSpaceGib === "object") - message.sharedSpaceGib = new $util.LongBits(object.sharedSpaceGib.low >>> 0, object.sharedSpaceGib.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {google.cloud.netapp.v1.Volume.CloneDetails} message CloneDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloneDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceSnapshot = ""; - object.sourceVolume = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sharedSpaceGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sharedSpaceGib = options.longs === String ? "0" : 0; - } - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) - object.sourceSnapshot = message.sourceSnapshot; - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - object.sourceVolume = message.sourceVolume; - if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) - if (typeof message.sharedSpaceGib === "number") - object.sharedSpaceGib = options.longs === String ? String(message.sharedSpaceGib) : message.sharedSpaceGib; - else - object.sharedSpaceGib = options.longs === String ? $util.Long.prototype.toString.call(message.sharedSpaceGib) : options.longs === Number ? new $util.LongBits(message.sharedSpaceGib.low >>> 0, message.sharedSpaceGib.high >>> 0).toNumber() : message.sharedSpaceGib; - return object; - }; - - /** - * Converts this CloneDetails to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @instance - * @returns {Object.} JSON object - */ - CloneDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloneDetails - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Volume.CloneDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloneDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.Volume.CloneDetails"; - }; - - return CloneDetails; - })(); - - /** - * State enum. - * @name google.cloud.netapp.v1.Volume.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} UPDATING=4 UPDATING value - * @property {number} RESTORING=5 RESTORING value - * @property {number} DISABLED=6 DISABLED value - * @property {number} ERROR=7 ERROR value - * @property {number} PREPARING=8 PREPARING value - * @property {number} READ_ONLY=9 READ_ONLY value - */ - Volume.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "RESTORING"] = 5; - values[valuesById[6] = "DISABLED"] = 6; - values[valuesById[7] = "ERROR"] = 7; - values[valuesById[8] = "PREPARING"] = 8; - values[valuesById[9] = "READ_ONLY"] = 9; - return values; - })(); - - return Volume; - })(); - - v1.ExportPolicy = (function() { - - /** - * Properties of an ExportPolicy. - * @memberof google.cloud.netapp.v1 - * @interface IExportPolicy - * @property {Array.|null} [rules] ExportPolicy rules - */ - - /** - * Constructs a new ExportPolicy. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an ExportPolicy. - * @implements IExportPolicy - * @constructor - * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set - */ - function ExportPolicy(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportPolicy rules. - * @member {Array.} rules - * @memberof google.cloud.netapp.v1.ExportPolicy - * @instance - */ - ExportPolicy.prototype.rules = $util.emptyArray; - - /** - * Creates a new ExportPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {google.cloud.netapp.v1.IExportPolicy=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy instance - */ - ExportPolicy.create = function create(properties) { - return new ExportPolicy(properties); - }; - - /** - * Encodes the specified ExportPolicy message. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.netapp.v1.SimpleExportPolicyRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExportPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {google.cloud.netapp.v1.IExportPolicy} message ExportPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExportPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.cloud.netapp.v1.SimpleExportPolicyRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportPolicy message. - * @function verify - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - return null; - }; - - /** - * Creates an ExportPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ExportPolicy} ExportPolicy - */ - ExportPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ExportPolicy) - return object; - var message = new $root.google.cloud.netapp.v1.ExportPolicy(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ExportPolicy.rules: object expected"); - message.rules[i] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.fromObject(object.rules[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExportPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {google.cloud.netapp.v1.ExportPolicy} message ExportPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.netapp.v1.SimpleExportPolicyRule.toObject(message.rules[j], options); - } - return object; - }; - - /** - * Converts this ExportPolicy to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ExportPolicy - * @instance - * @returns {Object.} JSON object - */ - ExportPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportPolicy - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ExportPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ExportPolicy"; - }; - - return ExportPolicy; - })(); - - v1.SimpleExportPolicyRule = (function() { - - /** - * Properties of a SimpleExportPolicyRule. - * @memberof google.cloud.netapp.v1 - * @interface ISimpleExportPolicyRule - * @property {string|null} [allowedClients] SimpleExportPolicyRule allowedClients - * @property {string|null} [hasRootAccess] SimpleExportPolicyRule hasRootAccess - * @property {google.cloud.netapp.v1.AccessType|null} [accessType] SimpleExportPolicyRule accessType - * @property {boolean|null} [nfsv3] SimpleExportPolicyRule nfsv3 - * @property {boolean|null} [nfsv4] SimpleExportPolicyRule nfsv4 - * @property {boolean|null} [kerberos_5ReadOnly] SimpleExportPolicyRule kerberos_5ReadOnly - * @property {boolean|null} [kerberos_5ReadWrite] SimpleExportPolicyRule kerberos_5ReadWrite - * @property {boolean|null} [kerberos_5iReadOnly] SimpleExportPolicyRule kerberos_5iReadOnly - * @property {boolean|null} [kerberos_5iReadWrite] SimpleExportPolicyRule kerberos_5iReadWrite - * @property {boolean|null} [kerberos_5pReadOnly] SimpleExportPolicyRule kerberos_5pReadOnly - * @property {boolean|null} [kerberos_5pReadWrite] SimpleExportPolicyRule kerberos_5pReadWrite - * @property {google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null} [squashMode] SimpleExportPolicyRule squashMode - * @property {number|Long|null} [anonUid] SimpleExportPolicyRule anonUid - */ - - /** - * Constructs a new SimpleExportPolicyRule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a SimpleExportPolicyRule. - * @implements ISimpleExportPolicyRule - * @constructor - * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set - */ - function SimpleExportPolicyRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimpleExportPolicyRule allowedClients. - * @member {string|null|undefined} allowedClients - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.allowedClients = null; - - /** - * SimpleExportPolicyRule hasRootAccess. - * @member {string|null|undefined} hasRootAccess - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.hasRootAccess = null; - - /** - * SimpleExportPolicyRule accessType. - * @member {google.cloud.netapp.v1.AccessType|null|undefined} accessType - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.accessType = null; - - /** - * SimpleExportPolicyRule nfsv3. - * @member {boolean|null|undefined} nfsv3 - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.nfsv3 = null; - - /** - * SimpleExportPolicyRule nfsv4. - * @member {boolean|null|undefined} nfsv4 - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.nfsv4 = null; - - /** - * SimpleExportPolicyRule kerberos_5ReadOnly. - * @member {boolean|null|undefined} kerberos_5ReadOnly - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5ReadOnly = null; - - /** - * SimpleExportPolicyRule kerberos_5ReadWrite. - * @member {boolean|null|undefined} kerberos_5ReadWrite - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5ReadWrite = null; - - /** - * SimpleExportPolicyRule kerberos_5iReadOnly. - * @member {boolean|null|undefined} kerberos_5iReadOnly - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5iReadOnly = null; - - /** - * SimpleExportPolicyRule kerberos_5iReadWrite. - * @member {boolean|null|undefined} kerberos_5iReadWrite - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5iReadWrite = null; - - /** - * SimpleExportPolicyRule kerberos_5pReadOnly. - * @member {boolean|null|undefined} kerberos_5pReadOnly - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5pReadOnly = null; - - /** - * SimpleExportPolicyRule kerberos_5pReadWrite. - * @member {boolean|null|undefined} kerberos_5pReadWrite - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.kerberos_5pReadWrite = null; - - /** - * SimpleExportPolicyRule squashMode. - * @member {google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode|null|undefined} squashMode - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.squashMode = null; - - /** - * SimpleExportPolicyRule anonUid. - * @member {number|Long|null|undefined} anonUid - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - */ - SimpleExportPolicyRule.prototype.anonUid = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_allowedClients", { - get: $util.oneOfGetter($oneOfFields = ["allowedClients"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_hasRootAccess", { - get: $util.oneOfGetter($oneOfFields = ["hasRootAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_accessType", { - get: $util.oneOfGetter($oneOfFields = ["accessType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv3", { - get: $util.oneOfGetter($oneOfFields = ["nfsv3"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_nfsv4", { - get: $util.oneOfGetter($oneOfFields = ["nfsv4"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadOnly", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5ReadWrite", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5ReadWrite"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadOnly", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5iReadWrite", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5iReadWrite"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadOnly", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_kerberos_5pReadWrite", { - get: $util.oneOfGetter($oneOfFields = ["kerberos_5pReadWrite"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_squashMode", { - get: $util.oneOfGetter($oneOfFields = ["squashMode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SimpleExportPolicyRule.prototype, "_anonUid", { - get: $util.oneOfGetter($oneOfFields = ["anonUid"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SimpleExportPolicyRule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule instance - */ - SimpleExportPolicyRule.create = function create(properties) { - return new SimpleExportPolicyRule(properties); - }; - - /** - * Encodes the specified SimpleExportPolicyRule message. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleExportPolicyRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedClients != null && Object.hasOwnProperty.call(message, "allowedClients")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients); - if (message.hasRootAccess != null && Object.hasOwnProperty.call(message, "hasRootAccess")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.hasRootAccess); - if (message.accessType != null && Object.hasOwnProperty.call(message, "accessType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accessType); - if (message.nfsv3 != null && Object.hasOwnProperty.call(message, "nfsv3")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.nfsv3); - if (message.nfsv4 != null && Object.hasOwnProperty.call(message, "nfsv4")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.nfsv4); - if (message.kerberos_5ReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5ReadOnly")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.kerberos_5ReadOnly); - if (message.kerberos_5ReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5ReadWrite")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.kerberos_5ReadWrite); - if (message.kerberos_5iReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5iReadOnly")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.kerberos_5iReadOnly); - if (message.kerberos_5iReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5iReadWrite")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.kerberos_5iReadWrite); - if (message.kerberos_5pReadOnly != null && Object.hasOwnProperty.call(message, "kerberos_5pReadOnly")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.kerberos_5pReadOnly); - if (message.kerberos_5pReadWrite != null && Object.hasOwnProperty.call(message, "kerberos_5pReadWrite")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.kerberos_5pReadWrite); - if (message.squashMode != null && Object.hasOwnProperty.call(message, "squashMode")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.squashMode); - if (message.anonUid != null && Object.hasOwnProperty.call(message, "anonUid")) - writer.uint32(/* id 13, wireType 0 =*/104).int64(message.anonUid); - return writer; - }; - - /** - * Encodes the specified SimpleExportPolicyRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SimpleExportPolicyRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {google.cloud.netapp.v1.ISimpleExportPolicyRule} message SimpleExportPolicyRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleExportPolicyRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimpleExportPolicyRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleExportPolicyRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allowedClients = reader.string(); - break; - } - case 2: { - message.hasRootAccess = reader.string(); - break; - } - case 3: { - message.accessType = reader.int32(); - break; - } - case 4: { - message.nfsv3 = reader.bool(); - break; - } - case 5: { - message.nfsv4 = reader.bool(); - break; - } - case 6: { - message.kerberos_5ReadOnly = reader.bool(); - break; - } - case 7: { - message.kerberos_5ReadWrite = reader.bool(); - break; - } - case 8: { - message.kerberos_5iReadOnly = reader.bool(); - break; - } - case 9: { - message.kerberos_5iReadWrite = reader.bool(); - break; - } - case 10: { - message.kerberos_5pReadOnly = reader.bool(); - break; - } - case 11: { - message.kerberos_5pReadWrite = reader.bool(); - break; - } - case 12: { - message.squashMode = reader.int32(); - break; - } - case 13: { - message.anonUid = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimpleExportPolicyRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleExportPolicyRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimpleExportPolicyRule message. - * @function verify - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimpleExportPolicyRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { - properties._allowedClients = 1; - if (!$util.isString(message.allowedClients)) - return "allowedClients: string expected"; - } - if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { - properties._hasRootAccess = 1; - if (!$util.isString(message.hasRootAccess)) - return "hasRootAccess: string expected"; - } - if (message.accessType != null && message.hasOwnProperty("accessType")) { - properties._accessType = 1; - switch (message.accessType) { - default: - return "accessType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { - properties._nfsv3 = 1; - if (typeof message.nfsv3 !== "boolean") - return "nfsv3: boolean expected"; - } - if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { - properties._nfsv4 = 1; - if (typeof message.nfsv4 !== "boolean") - return "nfsv4: boolean expected"; - } - if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { - properties._kerberos_5ReadOnly = 1; - if (typeof message.kerberos_5ReadOnly !== "boolean") - return "kerberos_5ReadOnly: boolean expected"; - } - if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { - properties._kerberos_5ReadWrite = 1; - if (typeof message.kerberos_5ReadWrite !== "boolean") - return "kerberos_5ReadWrite: boolean expected"; - } - if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { - properties._kerberos_5iReadOnly = 1; - if (typeof message.kerberos_5iReadOnly !== "boolean") - return "kerberos_5iReadOnly: boolean expected"; - } - if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { - properties._kerberos_5iReadWrite = 1; - if (typeof message.kerberos_5iReadWrite !== "boolean") - return "kerberos_5iReadWrite: boolean expected"; - } - if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { - properties._kerberos_5pReadOnly = 1; - if (typeof message.kerberos_5pReadOnly !== "boolean") - return "kerberos_5pReadOnly: boolean expected"; - } - if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { - properties._kerberos_5pReadWrite = 1; - if (typeof message.kerberos_5pReadWrite !== "boolean") - return "kerberos_5pReadWrite: boolean expected"; - } - if (message.squashMode != null && message.hasOwnProperty("squashMode")) { - properties._squashMode = 1; - switch (message.squashMode) { - default: - return "squashMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.anonUid != null && message.hasOwnProperty("anonUid")) { - properties._anonUid = 1; - if (!$util.isInteger(message.anonUid) && !(message.anonUid && $util.isInteger(message.anonUid.low) && $util.isInteger(message.anonUid.high))) - return "anonUid: integer|Long expected"; - } - return null; - }; - - /** - * Creates a SimpleExportPolicyRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.SimpleExportPolicyRule} SimpleExportPolicyRule - */ - SimpleExportPolicyRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.SimpleExportPolicyRule) - return object; - var message = new $root.google.cloud.netapp.v1.SimpleExportPolicyRule(); - if (object.allowedClients != null) - message.allowedClients = String(object.allowedClients); - if (object.hasRootAccess != null) - message.hasRootAccess = String(object.hasRootAccess); - switch (object.accessType) { - default: - if (typeof object.accessType === "number") { - message.accessType = object.accessType; - break; - } - break; - case "ACCESS_TYPE_UNSPECIFIED": - case 0: - message.accessType = 0; - break; - case "READ_ONLY": - case 1: - message.accessType = 1; - break; - case "READ_WRITE": - case 2: - message.accessType = 2; - break; - case "READ_NONE": - case 3: - message.accessType = 3; - break; - } - if (object.nfsv3 != null) - message.nfsv3 = Boolean(object.nfsv3); - if (object.nfsv4 != null) - message.nfsv4 = Boolean(object.nfsv4); - if (object.kerberos_5ReadOnly != null) - message.kerberos_5ReadOnly = Boolean(object.kerberos_5ReadOnly); - if (object.kerberos_5ReadWrite != null) - message.kerberos_5ReadWrite = Boolean(object.kerberos_5ReadWrite); - if (object.kerberos_5iReadOnly != null) - message.kerberos_5iReadOnly = Boolean(object.kerberos_5iReadOnly); - if (object.kerberos_5iReadWrite != null) - message.kerberos_5iReadWrite = Boolean(object.kerberos_5iReadWrite); - if (object.kerberos_5pReadOnly != null) - message.kerberos_5pReadOnly = Boolean(object.kerberos_5pReadOnly); - if (object.kerberos_5pReadWrite != null) - message.kerberos_5pReadWrite = Boolean(object.kerberos_5pReadWrite); - switch (object.squashMode) { - default: - if (typeof object.squashMode === "number") { - message.squashMode = object.squashMode; - break; - } - break; - case "SQUASH_MODE_UNSPECIFIED": - case 0: - message.squashMode = 0; - break; - case "NO_ROOT_SQUASH": - case 1: - message.squashMode = 1; - break; - case "ROOT_SQUASH": - case 2: - message.squashMode = 2; - break; - case "ALL_SQUASH": - case 3: - message.squashMode = 3; - break; - } - if (object.anonUid != null) - if ($util.Long) - (message.anonUid = $util.Long.fromValue(object.anonUid)).unsigned = false; - else if (typeof object.anonUid === "string") - message.anonUid = parseInt(object.anonUid, 10); - else if (typeof object.anonUid === "number") - message.anonUid = object.anonUid; - else if (typeof object.anonUid === "object") - message.anonUid = new $util.LongBits(object.anonUid.low >>> 0, object.anonUid.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SimpleExportPolicyRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {google.cloud.netapp.v1.SimpleExportPolicyRule} message SimpleExportPolicyRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleExportPolicyRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { - object.allowedClients = message.allowedClients; - if (options.oneofs) - object._allowedClients = "allowedClients"; - } - if (message.hasRootAccess != null && message.hasOwnProperty("hasRootAccess")) { - object.hasRootAccess = message.hasRootAccess; - if (options.oneofs) - object._hasRootAccess = "hasRootAccess"; - } - if (message.accessType != null && message.hasOwnProperty("accessType")) { - object.accessType = options.enums === String ? $root.google.cloud.netapp.v1.AccessType[message.accessType] === undefined ? message.accessType : $root.google.cloud.netapp.v1.AccessType[message.accessType] : message.accessType; - if (options.oneofs) - object._accessType = "accessType"; - } - if (message.nfsv3 != null && message.hasOwnProperty("nfsv3")) { - object.nfsv3 = message.nfsv3; - if (options.oneofs) - object._nfsv3 = "nfsv3"; - } - if (message.nfsv4 != null && message.hasOwnProperty("nfsv4")) { - object.nfsv4 = message.nfsv4; - if (options.oneofs) - object._nfsv4 = "nfsv4"; - } - if (message.kerberos_5ReadOnly != null && message.hasOwnProperty("kerberos_5ReadOnly")) { - object.kerberos_5ReadOnly = message.kerberos_5ReadOnly; - if (options.oneofs) - object._kerberos_5ReadOnly = "kerberos_5ReadOnly"; - } - if (message.kerberos_5ReadWrite != null && message.hasOwnProperty("kerberos_5ReadWrite")) { - object.kerberos_5ReadWrite = message.kerberos_5ReadWrite; - if (options.oneofs) - object._kerberos_5ReadWrite = "kerberos_5ReadWrite"; - } - if (message.kerberos_5iReadOnly != null && message.hasOwnProperty("kerberos_5iReadOnly")) { - object.kerberos_5iReadOnly = message.kerberos_5iReadOnly; - if (options.oneofs) - object._kerberos_5iReadOnly = "kerberos_5iReadOnly"; - } - if (message.kerberos_5iReadWrite != null && message.hasOwnProperty("kerberos_5iReadWrite")) { - object.kerberos_5iReadWrite = message.kerberos_5iReadWrite; - if (options.oneofs) - object._kerberos_5iReadWrite = "kerberos_5iReadWrite"; - } - if (message.kerberos_5pReadOnly != null && message.hasOwnProperty("kerberos_5pReadOnly")) { - object.kerberos_5pReadOnly = message.kerberos_5pReadOnly; - if (options.oneofs) - object._kerberos_5pReadOnly = "kerberos_5pReadOnly"; - } - if (message.kerberos_5pReadWrite != null && message.hasOwnProperty("kerberos_5pReadWrite")) { - object.kerberos_5pReadWrite = message.kerberos_5pReadWrite; - if (options.oneofs) - object._kerberos_5pReadWrite = "kerberos_5pReadWrite"; - } - if (message.squashMode != null && message.hasOwnProperty("squashMode")) { - object.squashMode = options.enums === String ? $root.google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode[message.squashMode] === undefined ? message.squashMode : $root.google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode[message.squashMode] : message.squashMode; - if (options.oneofs) - object._squashMode = "squashMode"; - } - if (message.anonUid != null && message.hasOwnProperty("anonUid")) { - if (typeof message.anonUid === "number") - object.anonUid = options.longs === String ? String(message.anonUid) : message.anonUid; - else - object.anonUid = options.longs === String ? $util.Long.prototype.toString.call(message.anonUid) : options.longs === Number ? new $util.LongBits(message.anonUid.low >>> 0, message.anonUid.high >>> 0).toNumber() : message.anonUid; - if (options.oneofs) - object._anonUid = "anonUid"; - } - return object; - }; - - /** - * Converts this SimpleExportPolicyRule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @instance - * @returns {Object.} JSON object - */ - SimpleExportPolicyRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimpleExportPolicyRule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.SimpleExportPolicyRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimpleExportPolicyRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.SimpleExportPolicyRule"; - }; - - /** - * SquashMode enum. - * @name google.cloud.netapp.v1.SimpleExportPolicyRule.SquashMode - * @enum {number} - * @property {number} SQUASH_MODE_UNSPECIFIED=0 SQUASH_MODE_UNSPECIFIED value - * @property {number} NO_ROOT_SQUASH=1 NO_ROOT_SQUASH value - * @property {number} ROOT_SQUASH=2 ROOT_SQUASH value - * @property {number} ALL_SQUASH=3 ALL_SQUASH value - */ - SimpleExportPolicyRule.SquashMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQUASH_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_ROOT_SQUASH"] = 1; - values[valuesById[2] = "ROOT_SQUASH"] = 2; - values[valuesById[3] = "ALL_SQUASH"] = 3; - return values; - })(); - - return SimpleExportPolicyRule; - })(); - - v1.SnapshotPolicy = (function() { - - /** - * Properties of a SnapshotPolicy. - * @memberof google.cloud.netapp.v1 - * @interface ISnapshotPolicy - * @property {boolean|null} [enabled] SnapshotPolicy enabled - * @property {google.cloud.netapp.v1.IHourlySchedule|null} [hourlySchedule] SnapshotPolicy hourlySchedule - * @property {google.cloud.netapp.v1.IDailySchedule|null} [dailySchedule] SnapshotPolicy dailySchedule - * @property {google.cloud.netapp.v1.IWeeklySchedule|null} [weeklySchedule] SnapshotPolicy weeklySchedule - * @property {google.cloud.netapp.v1.IMonthlySchedule|null} [monthlySchedule] SnapshotPolicy monthlySchedule - */ - - /** - * Constructs a new SnapshotPolicy. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a SnapshotPolicy. - * @implements ISnapshotPolicy - * @constructor - * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set - */ - function SnapshotPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SnapshotPolicy enabled. - * @member {boolean|null|undefined} enabled - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - */ - SnapshotPolicy.prototype.enabled = null; - - /** - * SnapshotPolicy hourlySchedule. - * @member {google.cloud.netapp.v1.IHourlySchedule|null|undefined} hourlySchedule - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - */ - SnapshotPolicy.prototype.hourlySchedule = null; - - /** - * SnapshotPolicy dailySchedule. - * @member {google.cloud.netapp.v1.IDailySchedule|null|undefined} dailySchedule - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - */ - SnapshotPolicy.prototype.dailySchedule = null; - - /** - * SnapshotPolicy weeklySchedule. - * @member {google.cloud.netapp.v1.IWeeklySchedule|null|undefined} weeklySchedule - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - */ - SnapshotPolicy.prototype.weeklySchedule = null; - - /** - * SnapshotPolicy monthlySchedule. - * @member {google.cloud.netapp.v1.IMonthlySchedule|null|undefined} monthlySchedule - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - */ - SnapshotPolicy.prototype.monthlySchedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SnapshotPolicy.prototype, "_enabled", { - get: $util.oneOfGetter($oneOfFields = ["enabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SnapshotPolicy.prototype, "_hourlySchedule", { - get: $util.oneOfGetter($oneOfFields = ["hourlySchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SnapshotPolicy.prototype, "_dailySchedule", { - get: $util.oneOfGetter($oneOfFields = ["dailySchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SnapshotPolicy.prototype, "_weeklySchedule", { - get: $util.oneOfGetter($oneOfFields = ["weeklySchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SnapshotPolicy.prototype, "_monthlySchedule", { - get: $util.oneOfGetter($oneOfFields = ["monthlySchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SnapshotPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {google.cloud.netapp.v1.ISnapshotPolicy=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy instance - */ - SnapshotPolicy.create = function create(properties) { - return new SnapshotPolicy(properties); - }; - - /** - * Encodes the specified SnapshotPolicy message. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SnapshotPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); - if (message.hourlySchedule != null && Object.hasOwnProperty.call(message, "hourlySchedule")) - $root.google.cloud.netapp.v1.HourlySchedule.encode(message.hourlySchedule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dailySchedule != null && Object.hasOwnProperty.call(message, "dailySchedule")) - $root.google.cloud.netapp.v1.DailySchedule.encode(message.dailySchedule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.weeklySchedule != null && Object.hasOwnProperty.call(message, "weeklySchedule")) - $root.google.cloud.netapp.v1.WeeklySchedule.encode(message.weeklySchedule, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.monthlySchedule != null && Object.hasOwnProperty.call(message, "monthlySchedule")) - $root.google.cloud.netapp.v1.MonthlySchedule.encode(message.monthlySchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SnapshotPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SnapshotPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {google.cloud.netapp.v1.ISnapshotPolicy} message SnapshotPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SnapshotPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SnapshotPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SnapshotPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.decode(reader, reader.uint32()); - break; - } - case 4: { - message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.decode(reader, reader.uint32()); - break; - } - case 5: { - message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SnapshotPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SnapshotPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SnapshotPolicy message. - * @function verify - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SnapshotPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - properties._enabled = 1; - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - } - if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { - properties._hourlySchedule = 1; - { - var error = $root.google.cloud.netapp.v1.HourlySchedule.verify(message.hourlySchedule); - if (error) - return "hourlySchedule." + error; - } - } - if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { - properties._dailySchedule = 1; - { - var error = $root.google.cloud.netapp.v1.DailySchedule.verify(message.dailySchedule); - if (error) - return "dailySchedule." + error; - } - } - if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { - properties._weeklySchedule = 1; - { - var error = $root.google.cloud.netapp.v1.WeeklySchedule.verify(message.weeklySchedule); - if (error) - return "weeklySchedule." + error; - } - } - if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { - properties._monthlySchedule = 1; - { - var error = $root.google.cloud.netapp.v1.MonthlySchedule.verify(message.monthlySchedule); - if (error) - return "monthlySchedule." + error; - } - } - return null; - }; - - /** - * Creates a SnapshotPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.SnapshotPolicy} SnapshotPolicy - */ - SnapshotPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.SnapshotPolicy) - return object; - var message = new $root.google.cloud.netapp.v1.SnapshotPolicy(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.hourlySchedule != null) { - if (typeof object.hourlySchedule !== "object") - throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.hourlySchedule: object expected"); - message.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.fromObject(object.hourlySchedule); - } - if (object.dailySchedule != null) { - if (typeof object.dailySchedule !== "object") - throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.dailySchedule: object expected"); - message.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.fromObject(object.dailySchedule); - } - if (object.weeklySchedule != null) { - if (typeof object.weeklySchedule !== "object") - throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.weeklySchedule: object expected"); - message.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.fromObject(object.weeklySchedule); - } - if (object.monthlySchedule != null) { - if (typeof object.monthlySchedule !== "object") - throw TypeError(".google.cloud.netapp.v1.SnapshotPolicy.monthlySchedule: object expected"); - message.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.fromObject(object.monthlySchedule); - } - return message; - }; - - /** - * Creates a plain object from a SnapshotPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {google.cloud.netapp.v1.SnapshotPolicy} message SnapshotPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SnapshotPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enabled != null && message.hasOwnProperty("enabled")) { - object.enabled = message.enabled; - if (options.oneofs) - object._enabled = "enabled"; - } - if (message.hourlySchedule != null && message.hasOwnProperty("hourlySchedule")) { - object.hourlySchedule = $root.google.cloud.netapp.v1.HourlySchedule.toObject(message.hourlySchedule, options); - if (options.oneofs) - object._hourlySchedule = "hourlySchedule"; - } - if (message.dailySchedule != null && message.hasOwnProperty("dailySchedule")) { - object.dailySchedule = $root.google.cloud.netapp.v1.DailySchedule.toObject(message.dailySchedule, options); - if (options.oneofs) - object._dailySchedule = "dailySchedule"; - } - if (message.weeklySchedule != null && message.hasOwnProperty("weeklySchedule")) { - object.weeklySchedule = $root.google.cloud.netapp.v1.WeeklySchedule.toObject(message.weeklySchedule, options); - if (options.oneofs) - object._weeklySchedule = "weeklySchedule"; - } - if (message.monthlySchedule != null && message.hasOwnProperty("monthlySchedule")) { - object.monthlySchedule = $root.google.cloud.netapp.v1.MonthlySchedule.toObject(message.monthlySchedule, options); - if (options.oneofs) - object._monthlySchedule = "monthlySchedule"; - } - return object; - }; - - /** - * Converts this SnapshotPolicy to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @instance - * @returns {Object.} JSON object - */ - SnapshotPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SnapshotPolicy - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.SnapshotPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SnapshotPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.SnapshotPolicy"; - }; - - return SnapshotPolicy; - })(); - - v1.HourlySchedule = (function() { - - /** - * Properties of an HourlySchedule. - * @memberof google.cloud.netapp.v1 - * @interface IHourlySchedule - * @property {number|null} [snapshotsToKeep] HourlySchedule snapshotsToKeep - * @property {number|null} [minute] HourlySchedule minute - */ - - /** - * Constructs a new HourlySchedule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an HourlySchedule. - * @implements IHourlySchedule - * @constructor - * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set - */ - function HourlySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HourlySchedule snapshotsToKeep. - * @member {number|null|undefined} snapshotsToKeep - * @memberof google.cloud.netapp.v1.HourlySchedule - * @instance - */ - HourlySchedule.prototype.snapshotsToKeep = null; - - /** - * HourlySchedule minute. - * @member {number|null|undefined} minute - * @memberof google.cloud.netapp.v1.HourlySchedule - * @instance - */ - HourlySchedule.prototype.minute = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(HourlySchedule.prototype, "_snapshotsToKeep", { - get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(HourlySchedule.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HourlySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {google.cloud.netapp.v1.IHourlySchedule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule instance - */ - HourlySchedule.create = function create(properties) { - return new HourlySchedule(properties); - }; - - /** - * Encodes the specified HourlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HourlySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); - return writer; - }; - - /** - * Encodes the specified HourlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HourlySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {google.cloud.netapp.v1.IHourlySchedule} message HourlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HourlySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an HourlySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HourlySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HourlySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshotsToKeep = reader.double(); - break; - } - case 2: { - message.minute = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an HourlySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HourlySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an HourlySchedule message. - * @function verify - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HourlySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - properties._snapshotsToKeep = 1; - if (typeof message.snapshotsToKeep !== "number") - return "snapshotsToKeep: number expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (typeof message.minute !== "number") - return "minute: number expected"; - } - return null; - }; - - /** - * Creates an HourlySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.HourlySchedule} HourlySchedule - */ - HourlySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.HourlySchedule) - return object; - var message = new $root.google.cloud.netapp.v1.HourlySchedule(); - if (object.snapshotsToKeep != null) - message.snapshotsToKeep = Number(object.snapshotsToKeep); - if (object.minute != null) - message.minute = Number(object.minute); - return message; - }; - - /** - * Creates a plain object from an HourlySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {google.cloud.netapp.v1.HourlySchedule} message HourlySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HourlySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; - if (options.oneofs) - object._snapshotsToKeep = "snapshotsToKeep"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; - if (options.oneofs) - object._minute = "minute"; - } - return object; - }; - - /** - * Converts this HourlySchedule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.HourlySchedule - * @instance - * @returns {Object.} JSON object - */ - HourlySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HourlySchedule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.HourlySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HourlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.HourlySchedule"; - }; - - return HourlySchedule; - })(); - - v1.DailySchedule = (function() { - - /** - * Properties of a DailySchedule. - * @memberof google.cloud.netapp.v1 - * @interface IDailySchedule - * @property {number|null} [snapshotsToKeep] DailySchedule snapshotsToKeep - * @property {number|null} [minute] DailySchedule minute - * @property {number|null} [hour] DailySchedule hour - */ - - /** - * Constructs a new DailySchedule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DailySchedule. - * @implements IDailySchedule - * @constructor - * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set - */ - function DailySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DailySchedule snapshotsToKeep. - * @member {number|null|undefined} snapshotsToKeep - * @memberof google.cloud.netapp.v1.DailySchedule - * @instance - */ - DailySchedule.prototype.snapshotsToKeep = null; - - /** - * DailySchedule minute. - * @member {number|null|undefined} minute - * @memberof google.cloud.netapp.v1.DailySchedule - * @instance - */ - DailySchedule.prototype.minute = null; - - /** - * DailySchedule hour. - * @member {number|null|undefined} hour - * @memberof google.cloud.netapp.v1.DailySchedule - * @instance - */ - DailySchedule.prototype.hour = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DailySchedule.prototype, "_snapshotsToKeep", { - get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DailySchedule.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(DailySchedule.prototype, "_hour", { - get: $util.oneOfGetter($oneOfFields = ["hour"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DailySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {google.cloud.netapp.v1.IDailySchedule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule instance - */ - DailySchedule.create = function create(properties) { - return new DailySchedule(properties); - }; - - /** - * Encodes the specified DailySchedule message. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); - return writer; - }; - - /** - * Encodes the specified DailySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DailySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {google.cloud.netapp.v1.IDailySchedule} message DailySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DailySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DailySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DailySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshotsToKeep = reader.double(); - break; - } - case 2: { - message.minute = reader.double(); - break; - } - case 3: { - message.hour = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DailySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DailySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DailySchedule message. - * @function verify - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DailySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - properties._snapshotsToKeep = 1; - if (typeof message.snapshotsToKeep !== "number") - return "snapshotsToKeep: number expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (typeof message.minute !== "number") - return "minute: number expected"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - properties._hour = 1; - if (typeof message.hour !== "number") - return "hour: number expected"; - } - return null; - }; - - /** - * Creates a DailySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DailySchedule} DailySchedule - */ - DailySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DailySchedule) - return object; - var message = new $root.google.cloud.netapp.v1.DailySchedule(); - if (object.snapshotsToKeep != null) - message.snapshotsToKeep = Number(object.snapshotsToKeep); - if (object.minute != null) - message.minute = Number(object.minute); - if (object.hour != null) - message.hour = Number(object.hour); - return message; - }; - - /** - * Creates a plain object from a DailySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {google.cloud.netapp.v1.DailySchedule} message DailySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DailySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; - if (options.oneofs) - object._snapshotsToKeep = "snapshotsToKeep"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; - if (options.oneofs) - object._minute = "minute"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; - if (options.oneofs) - object._hour = "hour"; - } - return object; - }; - - /** - * Converts this DailySchedule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DailySchedule - * @instance - * @returns {Object.} JSON object - */ - DailySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DailySchedule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DailySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DailySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DailySchedule"; - }; - - return DailySchedule; - })(); - - v1.WeeklySchedule = (function() { - - /** - * Properties of a WeeklySchedule. - * @memberof google.cloud.netapp.v1 - * @interface IWeeklySchedule - * @property {number|null} [snapshotsToKeep] WeeklySchedule snapshotsToKeep - * @property {number|null} [minute] WeeklySchedule minute - * @property {number|null} [hour] WeeklySchedule hour - * @property {string|null} [day] WeeklySchedule day - */ - - /** - * Constructs a new WeeklySchedule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a WeeklySchedule. - * @implements IWeeklySchedule - * @constructor - * @param {google.cloud.netapp.v1.IWeeklySchedule=} [properties] Properties to set - */ - function WeeklySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeeklySchedule snapshotsToKeep. - * @member {number|null|undefined} snapshotsToKeep - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.snapshotsToKeep = null; - - /** - * WeeklySchedule minute. - * @member {number|null|undefined} minute - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.minute = null; - - /** - * WeeklySchedule hour. - * @member {number|null|undefined} hour - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.hour = null; - - /** - * WeeklySchedule day. - * @member {string|null|undefined} day - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @instance - */ - WeeklySchedule.prototype.day = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WeeklySchedule.prototype, "_snapshotsToKeep", { - get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WeeklySchedule.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WeeklySchedule.prototype, "_hour", { - get: $util.oneOfGetter($oneOfFields = ["hour"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(WeeklySchedule.prototype, "_day", { - get: $util.oneOfGetter($oneOfFields = ["day"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WeeklySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {google.cloud.netapp.v1.IWeeklySchedule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule instance - */ - WeeklySchedule.create = function create(properties) { - return new WeeklySchedule(properties); - }; - - /** - * Encodes the specified WeeklySchedule message. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {google.cloud.netapp.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.day); - return writer; - }; - - /** - * Encodes the specified WeeklySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.WeeklySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {google.cloud.netapp.v1.IWeeklySchedule} message WeeklySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeeklySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.WeeklySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshotsToKeep = reader.double(); - break; - } - case 2: { - message.minute = reader.double(); - break; - } - case 3: { - message.hour = reader.double(); - break; - } - case 4: { - message.day = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeeklySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeeklySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeeklySchedule message. - * @function verify - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeeklySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - properties._snapshotsToKeep = 1; - if (typeof message.snapshotsToKeep !== "number") - return "snapshotsToKeep: number expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (typeof message.minute !== "number") - return "minute: number expected"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - properties._hour = 1; - if (typeof message.hour !== "number") - return "hour: number expected"; - } - if (message.day != null && message.hasOwnProperty("day")) { - properties._day = 1; - if (!$util.isString(message.day)) - return "day: string expected"; - } - return null; - }; - - /** - * Creates a WeeklySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.WeeklySchedule} WeeklySchedule - */ - WeeklySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.WeeklySchedule) - return object; - var message = new $root.google.cloud.netapp.v1.WeeklySchedule(); - if (object.snapshotsToKeep != null) - message.snapshotsToKeep = Number(object.snapshotsToKeep); - if (object.minute != null) - message.minute = Number(object.minute); - if (object.hour != null) - message.hour = Number(object.hour); - if (object.day != null) - message.day = String(object.day); - return message; - }; - - /** - * Creates a plain object from a WeeklySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {google.cloud.netapp.v1.WeeklySchedule} message WeeklySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeeklySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; - if (options.oneofs) - object._snapshotsToKeep = "snapshotsToKeep"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; - if (options.oneofs) - object._minute = "minute"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; - if (options.oneofs) - object._hour = "hour"; - } - if (message.day != null && message.hasOwnProperty("day")) { - object.day = message.day; - if (options.oneofs) - object._day = "day"; - } - return object; - }; - - /** - * Converts this WeeklySchedule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @instance - * @returns {Object.} JSON object - */ - WeeklySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WeeklySchedule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.WeeklySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WeeklySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.WeeklySchedule"; - }; - - return WeeklySchedule; - })(); - - v1.MonthlySchedule = (function() { - - /** - * Properties of a MonthlySchedule. - * @memberof google.cloud.netapp.v1 - * @interface IMonthlySchedule - * @property {number|null} [snapshotsToKeep] MonthlySchedule snapshotsToKeep - * @property {number|null} [minute] MonthlySchedule minute - * @property {number|null} [hour] MonthlySchedule hour - * @property {string|null} [daysOfMonth] MonthlySchedule daysOfMonth - */ - - /** - * Constructs a new MonthlySchedule. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a MonthlySchedule. - * @implements IMonthlySchedule - * @constructor - * @param {google.cloud.netapp.v1.IMonthlySchedule=} [properties] Properties to set - */ - function MonthlySchedule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MonthlySchedule snapshotsToKeep. - * @member {number|null|undefined} snapshotsToKeep - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.snapshotsToKeep = null; - - /** - * MonthlySchedule minute. - * @member {number|null|undefined} minute - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.minute = null; - - /** - * MonthlySchedule hour. - * @member {number|null|undefined} hour - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.hour = null; - - /** - * MonthlySchedule daysOfMonth. - * @member {string|null|undefined} daysOfMonth - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @instance - */ - MonthlySchedule.prototype.daysOfMonth = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MonthlySchedule.prototype, "_snapshotsToKeep", { - get: $util.oneOfGetter($oneOfFields = ["snapshotsToKeep"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MonthlySchedule.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MonthlySchedule.prototype, "_hour", { - get: $util.oneOfGetter($oneOfFields = ["hour"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(MonthlySchedule.prototype, "_daysOfMonth", { - get: $util.oneOfGetter($oneOfFields = ["daysOfMonth"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MonthlySchedule instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {google.cloud.netapp.v1.IMonthlySchedule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule instance - */ - MonthlySchedule.create = function create(properties) { - return new MonthlySchedule(properties); - }; - - /** - * Encodes the specified MonthlySchedule message. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {google.cloud.netapp.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotsToKeep != null && Object.hasOwnProperty.call(message, "snapshotsToKeep")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.snapshotsToKeep); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.minute); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.hour); - if (message.daysOfMonth != null && Object.hasOwnProperty.call(message, "daysOfMonth")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.daysOfMonth); - return writer; - }; - - /** - * Encodes the specified MonthlySchedule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MonthlySchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {google.cloud.netapp.v1.IMonthlySchedule} message MonthlySchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MonthlySchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.MonthlySchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshotsToKeep = reader.double(); - break; - } - case 2: { - message.minute = reader.double(); - break; - } - case 3: { - message.hour = reader.double(); - break; - } - case 4: { - message.daysOfMonth = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MonthlySchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MonthlySchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MonthlySchedule message. - * @function verify - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MonthlySchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - properties._snapshotsToKeep = 1; - if (typeof message.snapshotsToKeep !== "number") - return "snapshotsToKeep: number expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (typeof message.minute !== "number") - return "minute: number expected"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - properties._hour = 1; - if (typeof message.hour !== "number") - return "hour: number expected"; - } - if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { - properties._daysOfMonth = 1; - if (!$util.isString(message.daysOfMonth)) - return "daysOfMonth: string expected"; - } - return null; - }; - - /** - * Creates a MonthlySchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.MonthlySchedule} MonthlySchedule - */ - MonthlySchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.MonthlySchedule) - return object; - var message = new $root.google.cloud.netapp.v1.MonthlySchedule(); - if (object.snapshotsToKeep != null) - message.snapshotsToKeep = Number(object.snapshotsToKeep); - if (object.minute != null) - message.minute = Number(object.minute); - if (object.hour != null) - message.hour = Number(object.hour); - if (object.daysOfMonth != null) - message.daysOfMonth = String(object.daysOfMonth); - return message; - }; - - /** - * Creates a plain object from a MonthlySchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {google.cloud.netapp.v1.MonthlySchedule} message MonthlySchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MonthlySchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.snapshotsToKeep != null && message.hasOwnProperty("snapshotsToKeep")) { - object.snapshotsToKeep = options.json && !isFinite(message.snapshotsToKeep) ? String(message.snapshotsToKeep) : message.snapshotsToKeep; - if (options.oneofs) - object._snapshotsToKeep = "snapshotsToKeep"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = options.json && !isFinite(message.minute) ? String(message.minute) : message.minute; - if (options.oneofs) - object._minute = "minute"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - object.hour = options.json && !isFinite(message.hour) ? String(message.hour) : message.hour; - if (options.oneofs) - object._hour = "hour"; - } - if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { - object.daysOfMonth = message.daysOfMonth; - if (options.oneofs) - object._daysOfMonth = "daysOfMonth"; - } - return object; - }; - - /** - * Converts this MonthlySchedule to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @instance - * @returns {Object.} JSON object - */ - MonthlySchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MonthlySchedule - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.MonthlySchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MonthlySchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.MonthlySchedule"; - }; - - return MonthlySchedule; - })(); - - v1.MountOption = (function() { - - /** - * Properties of a MountOption. - * @memberof google.cloud.netapp.v1 - * @interface IMountOption - * @property {string|null} ["export"] MountOption export - * @property {string|null} [exportFull] MountOption exportFull - * @property {google.cloud.netapp.v1.Protocols|null} [protocol] MountOption protocol - * @property {string|null} [instructions] MountOption instructions - * @property {string|null} [ipAddress] MountOption ipAddress - */ - - /** - * Constructs a new MountOption. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a MountOption. - * @implements IMountOption - * @constructor - * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set - */ - function MountOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MountOption export. - * @member {string} export - * @memberof google.cloud.netapp.v1.MountOption - * @instance - */ - MountOption.prototype["export"] = ""; - - /** - * MountOption exportFull. - * @member {string} exportFull - * @memberof google.cloud.netapp.v1.MountOption - * @instance - */ - MountOption.prototype.exportFull = ""; - - /** - * MountOption protocol. - * @member {google.cloud.netapp.v1.Protocols} protocol - * @memberof google.cloud.netapp.v1.MountOption - * @instance - */ - MountOption.prototype.protocol = 0; - - /** - * MountOption instructions. - * @member {string} instructions - * @memberof google.cloud.netapp.v1.MountOption - * @instance - */ - MountOption.prototype.instructions = ""; - - /** - * MountOption ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.netapp.v1.MountOption - * @instance - */ - MountOption.prototype.ipAddress = ""; - - /** - * Creates a new MountOption instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {google.cloud.netapp.v1.IMountOption=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.MountOption} MountOption instance - */ - MountOption.create = function create(properties) { - return new MountOption(properties); - }; - - /** - * Encodes the specified MountOption message. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MountOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["export"] != null && Object.hasOwnProperty.call(message, "export")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message["export"]); - if (message.exportFull != null && Object.hasOwnProperty.call(message, "exportFull")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exportFull); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.protocol); - if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instructions); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified MountOption message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.MountOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {google.cloud.netapp.v1.IMountOption} message MountOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MountOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MountOption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.MountOption} MountOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MountOption.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.MountOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message["export"] = reader.string(); - break; - } - case 2: { - message.exportFull = reader.string(); - break; - } - case 3: { - message.protocol = reader.int32(); - break; - } - case 4: { - message.instructions = reader.string(); - break; - } - case 5: { - message.ipAddress = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MountOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.MountOption} MountOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MountOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MountOption message. - * @function verify - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MountOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["export"] != null && message.hasOwnProperty("export")) - if (!$util.isString(message["export"])) - return "export: string expected"; - if (message.exportFull != null && message.hasOwnProperty("exportFull")) - if (!$util.isString(message.exportFull)) - return "exportFull: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - switch (message.protocol) { - default: - return "protocol: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.instructions != null && message.hasOwnProperty("instructions")) - if (!$util.isString(message.instructions)) - return "instructions: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - return null; - }; - - /** - * Creates a MountOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.MountOption} MountOption - */ - MountOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.MountOption) - return object; - var message = new $root.google.cloud.netapp.v1.MountOption(); - if (object["export"] != null) - message["export"] = String(object["export"]); - if (object.exportFull != null) - message.exportFull = String(object.exportFull); - switch (object.protocol) { - default: - if (typeof object.protocol === "number") { - message.protocol = object.protocol; - break; - } - break; - case "PROTOCOLS_UNSPECIFIED": - case 0: - message.protocol = 0; - break; - case "NFSV3": - case 1: - message.protocol = 1; - break; - case "NFSV4": - case 2: - message.protocol = 2; - break; - case "SMB": - case 3: - message.protocol = 3; - break; - case "ISCSI": - case 4: - message.protocol = 4; - break; - } - if (object.instructions != null) - message.instructions = String(object.instructions); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - return message; - }; - - /** - * Creates a plain object from a MountOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {google.cloud.netapp.v1.MountOption} message MountOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MountOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object["export"] = ""; - object.exportFull = ""; - object.protocol = options.enums === String ? "PROTOCOLS_UNSPECIFIED" : 0; - object.instructions = ""; - object.ipAddress = ""; - } - if (message["export"] != null && message.hasOwnProperty("export")) - object["export"] = message["export"]; - if (message.exportFull != null && message.hasOwnProperty("exportFull")) - object.exportFull = message.exportFull; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = options.enums === String ? $root.google.cloud.netapp.v1.Protocols[message.protocol] === undefined ? message.protocol : $root.google.cloud.netapp.v1.Protocols[message.protocol] : message.protocol; - if (message.instructions != null && message.hasOwnProperty("instructions")) - object.instructions = message.instructions; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this MountOption to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.MountOption - * @instance - * @returns {Object.} JSON object - */ - MountOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MountOption - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.MountOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MountOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.MountOption"; - }; - - return MountOption; - })(); - - v1.RestoreParameters = (function() { - - /** - * Properties of a RestoreParameters. - * @memberof google.cloud.netapp.v1 - * @interface IRestoreParameters - * @property {string|null} [sourceSnapshot] RestoreParameters sourceSnapshot - * @property {string|null} [sourceBackup] RestoreParameters sourceBackup - */ - - /** - * Constructs a new RestoreParameters. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a RestoreParameters. - * @implements IRestoreParameters - * @constructor - * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set - */ - function RestoreParameters(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreParameters sourceSnapshot. - * @member {string|null|undefined} sourceSnapshot - * @memberof google.cloud.netapp.v1.RestoreParameters - * @instance - */ - RestoreParameters.prototype.sourceSnapshot = null; - - /** - * RestoreParameters sourceBackup. - * @member {string|null|undefined} sourceBackup - * @memberof google.cloud.netapp.v1.RestoreParameters - * @instance - */ - RestoreParameters.prototype.sourceBackup = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RestoreParameters source. - * @member {"sourceSnapshot"|"sourceBackup"|undefined} source - * @memberof google.cloud.netapp.v1.RestoreParameters - * @instance - */ - Object.defineProperty(RestoreParameters.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot", "sourceBackup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RestoreParameters instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {google.cloud.netapp.v1.IRestoreParameters=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters instance - */ - RestoreParameters.create = function create(properties) { - return new RestoreParameters(properties); - }; - - /** - * Encodes the specified RestoreParameters message. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); - if (message.sourceBackup != null && Object.hasOwnProperty.call(message, "sourceBackup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceBackup); - return writer; - }; - - /** - * Encodes the specified RestoreParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {google.cloud.netapp.v1.IRestoreParameters} message RestoreParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreParameters message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreParameters.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sourceSnapshot = reader.string(); - break; - } - case 2: { - message.sourceBackup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreParameters message. - * @function verify - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { - properties.source = 1; - if (!$util.isString(message.sourceSnapshot)) - return "sourceSnapshot: string expected"; - } - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.sourceBackup)) - return "sourceBackup: string expected"; - } - return null; - }; - - /** - * Creates a RestoreParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.RestoreParameters} RestoreParameters - */ - RestoreParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.RestoreParameters) - return object; - var message = new $root.google.cloud.netapp.v1.RestoreParameters(); - if (object.sourceSnapshot != null) - message.sourceSnapshot = String(object.sourceSnapshot); - if (object.sourceBackup != null) - message.sourceBackup = String(object.sourceBackup); - return message; - }; - - /** - * Creates a plain object from a RestoreParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {google.cloud.netapp.v1.RestoreParameters} message RestoreParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) { - object.sourceSnapshot = message.sourceSnapshot; - if (options.oneofs) - object.source = "sourceSnapshot"; - } - if (message.sourceBackup != null && message.hasOwnProperty("sourceBackup")) { - object.sourceBackup = message.sourceBackup; - if (options.oneofs) - object.source = "sourceBackup"; - } - return object; - }; - - /** - * Converts this RestoreParameters to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.RestoreParameters - * @instance - * @returns {Object.} JSON object - */ - RestoreParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreParameters - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.RestoreParameters - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreParameters"; - }; - - return RestoreParameters; - })(); - - v1.BackupConfig = (function() { - - /** - * Properties of a BackupConfig. - * @memberof google.cloud.netapp.v1 - * @interface IBackupConfig - * @property {Array.|null} [backupPolicies] BackupConfig backupPolicies - * @property {string|null} [backupVault] BackupConfig backupVault - * @property {boolean|null} [scheduledBackupEnabled] BackupConfig scheduledBackupEnabled - * @property {number|Long|null} [backupChainBytes] BackupConfig backupChainBytes - */ - - /** - * Constructs a new BackupConfig. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a BackupConfig. - * @implements IBackupConfig - * @constructor - * @param {google.cloud.netapp.v1.IBackupConfig=} [properties] Properties to set - */ - function BackupConfig(properties) { - this.backupPolicies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupConfig backupPolicies. - * @member {Array.} backupPolicies - * @memberof google.cloud.netapp.v1.BackupConfig - * @instance - */ - BackupConfig.prototype.backupPolicies = $util.emptyArray; - - /** - * BackupConfig backupVault. - * @member {string} backupVault - * @memberof google.cloud.netapp.v1.BackupConfig - * @instance - */ - BackupConfig.prototype.backupVault = ""; - - /** - * BackupConfig scheduledBackupEnabled. - * @member {boolean|null|undefined} scheduledBackupEnabled - * @memberof google.cloud.netapp.v1.BackupConfig - * @instance - */ - BackupConfig.prototype.scheduledBackupEnabled = null; - - /** - * BackupConfig backupChainBytes. - * @member {number|Long|null|undefined} backupChainBytes - * @memberof google.cloud.netapp.v1.BackupConfig - * @instance - */ - BackupConfig.prototype.backupChainBytes = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupConfig.prototype, "_scheduledBackupEnabled", { - get: $util.oneOfGetter($oneOfFields = ["scheduledBackupEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupConfig.prototype, "_backupChainBytes", { - get: $util.oneOfGetter($oneOfFields = ["backupChainBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {google.cloud.netapp.v1.IBackupConfig=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig instance - */ - BackupConfig.create = function create(properties) { - return new BackupConfig(properties); - }; - - /** - * Encodes the specified BackupConfig message. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {google.cloud.netapp.v1.IBackupConfig} message BackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPolicies != null && message.backupPolicies.length) - for (var i = 0; i < message.backupPolicies.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPolicies[i]); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVault); - if (message.scheduledBackupEnabled != null && Object.hasOwnProperty.call(message, "scheduledBackupEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.scheduledBackupEnabled); - if (message.backupChainBytes != null && Object.hasOwnProperty.call(message, "backupChainBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.backupChainBytes); - return writer; - }; - - /** - * Encodes the specified BackupConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {google.cloud.netapp.v1.IBackupConfig} message BackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.backupPolicies && message.backupPolicies.length)) - message.backupPolicies = []; - message.backupPolicies.push(reader.string()); - break; - } - case 2: { - message.backupVault = reader.string(); - break; - } - case 3: { - message.scheduledBackupEnabled = reader.bool(); - break; - } - case 4: { - message.backupChainBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupConfig message. - * @function verify - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.backupPolicies != null && message.hasOwnProperty("backupPolicies")) { - if (!Array.isArray(message.backupPolicies)) - return "backupPolicies: array expected"; - for (var i = 0; i < message.backupPolicies.length; ++i) - if (!$util.isString(message.backupPolicies[i])) - return "backupPolicies: string[] expected"; - } - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - if (!$util.isString(message.backupVault)) - return "backupVault: string expected"; - if (message.scheduledBackupEnabled != null && message.hasOwnProperty("scheduledBackupEnabled")) { - properties._scheduledBackupEnabled = 1; - if (typeof message.scheduledBackupEnabled !== "boolean") - return "scheduledBackupEnabled: boolean expected"; - } - if (message.backupChainBytes != null && message.hasOwnProperty("backupChainBytes")) { - properties._backupChainBytes = 1; - if (!$util.isInteger(message.backupChainBytes) && !(message.backupChainBytes && $util.isInteger(message.backupChainBytes.low) && $util.isInteger(message.backupChainBytes.high))) - return "backupChainBytes: integer|Long expected"; - } - return null; - }; - - /** - * Creates a BackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.BackupConfig} BackupConfig - */ - BackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.BackupConfig) - return object; - var message = new $root.google.cloud.netapp.v1.BackupConfig(); - if (object.backupPolicies) { - if (!Array.isArray(object.backupPolicies)) - throw TypeError(".google.cloud.netapp.v1.BackupConfig.backupPolicies: array expected"); - message.backupPolicies = []; - for (var i = 0; i < object.backupPolicies.length; ++i) - message.backupPolicies[i] = String(object.backupPolicies[i]); - } - if (object.backupVault != null) - message.backupVault = String(object.backupVault); - if (object.scheduledBackupEnabled != null) - message.scheduledBackupEnabled = Boolean(object.scheduledBackupEnabled); - if (object.backupChainBytes != null) - if ($util.Long) - (message.backupChainBytes = $util.Long.fromValue(object.backupChainBytes)).unsigned = false; - else if (typeof object.backupChainBytes === "string") - message.backupChainBytes = parseInt(object.backupChainBytes, 10); - else if (typeof object.backupChainBytes === "number") - message.backupChainBytes = object.backupChainBytes; - else if (typeof object.backupChainBytes === "object") - message.backupChainBytes = new $util.LongBits(object.backupChainBytes.low >>> 0, object.backupChainBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {google.cloud.netapp.v1.BackupConfig} message BackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupPolicies = []; - if (options.defaults) - object.backupVault = ""; - if (message.backupPolicies && message.backupPolicies.length) { - object.backupPolicies = []; - for (var j = 0; j < message.backupPolicies.length; ++j) - object.backupPolicies[j] = message.backupPolicies[j]; - } - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = message.backupVault; - if (message.scheduledBackupEnabled != null && message.hasOwnProperty("scheduledBackupEnabled")) { - object.scheduledBackupEnabled = message.scheduledBackupEnabled; - if (options.oneofs) - object._scheduledBackupEnabled = "scheduledBackupEnabled"; - } - if (message.backupChainBytes != null && message.hasOwnProperty("backupChainBytes")) { - if (typeof message.backupChainBytes === "number") - object.backupChainBytes = options.longs === String ? String(message.backupChainBytes) : message.backupChainBytes; - else - object.backupChainBytes = options.longs === String ? $util.Long.prototype.toString.call(message.backupChainBytes) : options.longs === Number ? new $util.LongBits(message.backupChainBytes.low >>> 0, message.backupChainBytes.high >>> 0).toNumber() : message.backupChainBytes; - if (options.oneofs) - object._backupChainBytes = "backupChainBytes"; - } - return object; - }; - - /** - * Converts this BackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.BackupConfig - * @instance - * @returns {Object.} JSON object - */ - BackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupConfig - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.BackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.BackupConfig"; - }; - - return BackupConfig; - })(); - - v1.TieringPolicy = (function() { - - /** - * Properties of a TieringPolicy. - * @memberof google.cloud.netapp.v1 - * @interface ITieringPolicy - * @property {google.cloud.netapp.v1.TieringPolicy.TierAction|null} [tierAction] TieringPolicy tierAction - * @property {number|null} [coolingThresholdDays] TieringPolicy coolingThresholdDays - * @property {boolean|null} [hotTierBypassModeEnabled] TieringPolicy hotTierBypassModeEnabled - */ - - /** - * Constructs a new TieringPolicy. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a TieringPolicy. - * @implements ITieringPolicy - * @constructor - * @param {google.cloud.netapp.v1.ITieringPolicy=} [properties] Properties to set - */ - function TieringPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TieringPolicy tierAction. - * @member {google.cloud.netapp.v1.TieringPolicy.TierAction|null|undefined} tierAction - * @memberof google.cloud.netapp.v1.TieringPolicy - * @instance - */ - TieringPolicy.prototype.tierAction = null; - - /** - * TieringPolicy coolingThresholdDays. - * @member {number|null|undefined} coolingThresholdDays - * @memberof google.cloud.netapp.v1.TieringPolicy - * @instance - */ - TieringPolicy.prototype.coolingThresholdDays = null; - - /** - * TieringPolicy hotTierBypassModeEnabled. - * @member {boolean|null|undefined} hotTierBypassModeEnabled - * @memberof google.cloud.netapp.v1.TieringPolicy - * @instance - */ - TieringPolicy.prototype.hotTierBypassModeEnabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TieringPolicy.prototype, "_tierAction", { - get: $util.oneOfGetter($oneOfFields = ["tierAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TieringPolicy.prototype, "_coolingThresholdDays", { - get: $util.oneOfGetter($oneOfFields = ["coolingThresholdDays"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TieringPolicy.prototype, "_hotTierBypassModeEnabled", { - get: $util.oneOfGetter($oneOfFields = ["hotTierBypassModeEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TieringPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {google.cloud.netapp.v1.ITieringPolicy=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy instance - */ - TieringPolicy.create = function create(properties) { - return new TieringPolicy(properties); - }; - - /** - * Encodes the specified TieringPolicy message. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {google.cloud.netapp.v1.ITieringPolicy} message TieringPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TieringPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tierAction != null && Object.hasOwnProperty.call(message, "tierAction")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tierAction); - if (message.coolingThresholdDays != null && Object.hasOwnProperty.call(message, "coolingThresholdDays")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.coolingThresholdDays); - if (message.hotTierBypassModeEnabled != null && Object.hasOwnProperty.call(message, "hotTierBypassModeEnabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hotTierBypassModeEnabled); - return writer; - }; - - /** - * Encodes the specified TieringPolicy message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TieringPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {google.cloud.netapp.v1.ITieringPolicy} message TieringPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TieringPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TieringPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TieringPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TieringPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.tierAction = reader.int32(); - break; - } - case 2: { - message.coolingThresholdDays = reader.int32(); - break; - } - case 3: { - message.hotTierBypassModeEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TieringPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TieringPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TieringPolicy message. - * @function verify - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TieringPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tierAction != null && message.hasOwnProperty("tierAction")) { - properties._tierAction = 1; - switch (message.tierAction) { - default: - return "tierAction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.coolingThresholdDays != null && message.hasOwnProperty("coolingThresholdDays")) { - properties._coolingThresholdDays = 1; - if (!$util.isInteger(message.coolingThresholdDays)) - return "coolingThresholdDays: integer expected"; - } - if (message.hotTierBypassModeEnabled != null && message.hasOwnProperty("hotTierBypassModeEnabled")) { - properties._hotTierBypassModeEnabled = 1; - if (typeof message.hotTierBypassModeEnabled !== "boolean") - return "hotTierBypassModeEnabled: boolean expected"; - } - return null; - }; - - /** - * Creates a TieringPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.TieringPolicy} TieringPolicy - */ - TieringPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.TieringPolicy) - return object; - var message = new $root.google.cloud.netapp.v1.TieringPolicy(); - switch (object.tierAction) { - default: - if (typeof object.tierAction === "number") { - message.tierAction = object.tierAction; - break; - } - break; - case "TIER_ACTION_UNSPECIFIED": - case 0: - message.tierAction = 0; - break; - case "ENABLED": - case 1: - message.tierAction = 1; - break; - case "PAUSED": - case 2: - message.tierAction = 2; - break; - } - if (object.coolingThresholdDays != null) - message.coolingThresholdDays = object.coolingThresholdDays | 0; - if (object.hotTierBypassModeEnabled != null) - message.hotTierBypassModeEnabled = Boolean(object.hotTierBypassModeEnabled); - return message; - }; - - /** - * Creates a plain object from a TieringPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {google.cloud.netapp.v1.TieringPolicy} message TieringPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TieringPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.tierAction != null && message.hasOwnProperty("tierAction")) { - object.tierAction = options.enums === String ? $root.google.cloud.netapp.v1.TieringPolicy.TierAction[message.tierAction] === undefined ? message.tierAction : $root.google.cloud.netapp.v1.TieringPolicy.TierAction[message.tierAction] : message.tierAction; - if (options.oneofs) - object._tierAction = "tierAction"; - } - if (message.coolingThresholdDays != null && message.hasOwnProperty("coolingThresholdDays")) { - object.coolingThresholdDays = message.coolingThresholdDays; - if (options.oneofs) - object._coolingThresholdDays = "coolingThresholdDays"; - } - if (message.hotTierBypassModeEnabled != null && message.hasOwnProperty("hotTierBypassModeEnabled")) { - object.hotTierBypassModeEnabled = message.hotTierBypassModeEnabled; - if (options.oneofs) - object._hotTierBypassModeEnabled = "hotTierBypassModeEnabled"; - } - return object; - }; - - /** - * Converts this TieringPolicy to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.TieringPolicy - * @instance - * @returns {Object.} JSON object - */ - TieringPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TieringPolicy - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.TieringPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TieringPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.TieringPolicy"; - }; - - /** - * TierAction enum. - * @name google.cloud.netapp.v1.TieringPolicy.TierAction - * @enum {number} - * @property {number} TIER_ACTION_UNSPECIFIED=0 TIER_ACTION_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} PAUSED=2 PAUSED value - */ - TieringPolicy.TierAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "PAUSED"] = 2; - return values; - })(); - - return TieringPolicy; - })(); - - v1.HybridReplicationParameters = (function() { - - /** - * Properties of a HybridReplicationParameters. - * @memberof google.cloud.netapp.v1 - * @interface IHybridReplicationParameters - * @property {string|null} [replication] HybridReplicationParameters replication - * @property {string|null} [peerVolumeName] HybridReplicationParameters peerVolumeName - * @property {string|null} [peerClusterName] HybridReplicationParameters peerClusterName - * @property {string|null} [peerSvmName] HybridReplicationParameters peerSvmName - * @property {Array.|null} [peerIpAddresses] HybridReplicationParameters peerIpAddresses - * @property {string|null} [clusterLocation] HybridReplicationParameters clusterLocation - * @property {string|null} [description] HybridReplicationParameters description - * @property {Object.|null} [labels] HybridReplicationParameters labels - * @property {google.cloud.netapp.v1.HybridReplicationSchedule|null} [replicationSchedule] HybridReplicationParameters replicationSchedule - * @property {google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType|null} [hybridReplicationType] HybridReplicationParameters hybridReplicationType - * @property {number|null} [largeVolumeConstituentCount] HybridReplicationParameters largeVolumeConstituentCount - */ - - /** - * Constructs a new HybridReplicationParameters. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a HybridReplicationParameters. - * @implements IHybridReplicationParameters - * @constructor - * @param {google.cloud.netapp.v1.IHybridReplicationParameters=} [properties] Properties to set - */ - function HybridReplicationParameters(properties) { - this.peerIpAddresses = []; - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HybridReplicationParameters replication. - * @member {string} replication - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.replication = ""; - - /** - * HybridReplicationParameters peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.peerVolumeName = ""; - - /** - * HybridReplicationParameters peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.peerClusterName = ""; - - /** - * HybridReplicationParameters peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.peerSvmName = ""; - - /** - * HybridReplicationParameters peerIpAddresses. - * @member {Array.} peerIpAddresses - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.peerIpAddresses = $util.emptyArray; - - /** - * HybridReplicationParameters clusterLocation. - * @member {string} clusterLocation - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.clusterLocation = ""; - - /** - * HybridReplicationParameters description. - * @member {string} description - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.description = ""; - - /** - * HybridReplicationParameters labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.labels = $util.emptyObject; - - /** - * HybridReplicationParameters replicationSchedule. - * @member {google.cloud.netapp.v1.HybridReplicationSchedule} replicationSchedule - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.replicationSchedule = 0; - - /** - * HybridReplicationParameters hybridReplicationType. - * @member {google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType} hybridReplicationType - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.hybridReplicationType = 0; - - /** - * HybridReplicationParameters largeVolumeConstituentCount. - * @member {number} largeVolumeConstituentCount - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - */ - HybridReplicationParameters.prototype.largeVolumeConstituentCount = 0; - - /** - * Creates a new HybridReplicationParameters instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {google.cloud.netapp.v1.IHybridReplicationParameters=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters instance - */ - HybridReplicationParameters.create = function create(properties) { - return new HybridReplicationParameters(properties); - }; - - /** - * Encodes the specified HybridReplicationParameters message. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {google.cloud.netapp.v1.IHybridReplicationParameters} message HybridReplicationParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HybridReplicationParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.replication); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerVolumeName); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerSvmName); - if (message.peerIpAddresses != null && message.peerIpAddresses.length) - for (var i = 0; i < message.peerIpAddresses.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerIpAddresses[i]); - if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.clusterLocation); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.replicationSchedule); - if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.hybridReplicationType); - if (message.largeVolumeConstituentCount != null && Object.hasOwnProperty.call(message, "largeVolumeConstituentCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.largeVolumeConstituentCount); - return writer; - }; - - /** - * Encodes the specified HybridReplicationParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridReplicationParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {google.cloud.netapp.v1.IHybridReplicationParameters} message HybridReplicationParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HybridReplicationParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HybridReplicationParameters message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HybridReplicationParameters.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridReplicationParameters(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.replication = reader.string(); - break; - } - case 2: { - message.peerVolumeName = reader.string(); - break; - } - case 3: { - message.peerClusterName = reader.string(); - break; - } - case 4: { - message.peerSvmName = reader.string(); - break; - } - case 5: { - if (!(message.peerIpAddresses && message.peerIpAddresses.length)) - message.peerIpAddresses = []; - message.peerIpAddresses.push(reader.string()); - break; - } - case 6: { - message.clusterLocation = reader.string(); - break; - } - case 7: { - message.description = reader.string(); - break; - } - case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 9: { - message.replicationSchedule = reader.int32(); - break; - } - case 10: { - message.hybridReplicationType = reader.int32(); - break; - } - case 11: { - message.largeVolumeConstituentCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HybridReplicationParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HybridReplicationParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HybridReplicationParameters message. - * @function verify - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HybridReplicationParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replication != null && message.hasOwnProperty("replication")) - if (!$util.isString(message.replication)) - return "replication: string expected"; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { - if (!Array.isArray(message.peerIpAddresses)) - return "peerIpAddresses: array expected"; - for (var i = 0; i < message.peerIpAddresses.length; ++i) - if (!$util.isString(message.peerIpAddresses[i])) - return "peerIpAddresses: string[] expected"; - } - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - if (!$util.isString(message.clusterLocation)) - return "clusterLocation: 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - switch (message.replicationSchedule) { - default: - return "replicationSchedule: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - switch (message.hybridReplicationType) { - default: - return "hybridReplicationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.largeVolumeConstituentCount != null && message.hasOwnProperty("largeVolumeConstituentCount")) - if (!$util.isInteger(message.largeVolumeConstituentCount)) - return "largeVolumeConstituentCount: integer expected"; - return null; - }; - - /** - * Creates a HybridReplicationParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.HybridReplicationParameters} HybridReplicationParameters - */ - HybridReplicationParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.HybridReplicationParameters) - return object; - var message = new $root.google.cloud.netapp.v1.HybridReplicationParameters(); - if (object.replication != null) - message.replication = String(object.replication); - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - if (object.peerIpAddresses) { - if (!Array.isArray(object.peerIpAddresses)) - throw TypeError(".google.cloud.netapp.v1.HybridReplicationParameters.peerIpAddresses: array expected"); - message.peerIpAddresses = []; - for (var i = 0; i < object.peerIpAddresses.length; ++i) - message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); - } - if (object.clusterLocation != null) - message.clusterLocation = String(object.clusterLocation); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.HybridReplicationParameters.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.replicationSchedule) { - default: - if (typeof object.replicationSchedule === "number") { - message.replicationSchedule = object.replicationSchedule; - break; - } - break; - case "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED": - case 0: - message.replicationSchedule = 0; - break; - case "EVERY_10_MINUTES": - case 1: - message.replicationSchedule = 1; - break; - case "HOURLY": - case 2: - message.replicationSchedule = 2; - break; - case "DAILY": - case 3: - message.replicationSchedule = 3; - break; - } - switch (object.hybridReplicationType) { - default: - if (typeof object.hybridReplicationType === "number") { - message.hybridReplicationType = object.hybridReplicationType; - break; - } - break; - case "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED": - case 0: - message.hybridReplicationType = 0; - break; - case "MIGRATION": - case 1: - message.hybridReplicationType = 1; - break; - case "CONTINUOUS_REPLICATION": - case 2: - message.hybridReplicationType = 2; - break; - case "ONPREM_REPLICATION": - case 3: - message.hybridReplicationType = 3; - break; - case "REVERSE_ONPREM_REPLICATION": - case 4: - message.hybridReplicationType = 4; - break; - } - if (object.largeVolumeConstituentCount != null) - message.largeVolumeConstituentCount = object.largeVolumeConstituentCount | 0; - return message; - }; - - /** - * Creates a plain object from a HybridReplicationParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {google.cloud.netapp.v1.HybridReplicationParameters} message HybridReplicationParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HybridReplicationParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.peerIpAddresses = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.replication = ""; - object.peerVolumeName = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - object.clusterLocation = ""; - object.description = ""; - object.replicationSchedule = options.enums === String ? "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED" : 0; - object.hybridReplicationType = options.enums === String ? "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; - object.largeVolumeConstituentCount = 0; - } - if (message.replication != null && message.hasOwnProperty("replication")) - object.replication = message.replication; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - if (message.peerIpAddresses && message.peerIpAddresses.length) { - object.peerIpAddresses = []; - for (var j = 0; j < message.peerIpAddresses.length; ++j) - object.peerIpAddresses[j] = message.peerIpAddresses[j]; - } - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - object.clusterLocation = message.clusterLocation; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.HybridReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.HybridReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; - if (message.largeVolumeConstituentCount != null && message.hasOwnProperty("largeVolumeConstituentCount")) - object.largeVolumeConstituentCount = message.largeVolumeConstituentCount; - return object; - }; - - /** - * Converts this HybridReplicationParameters to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @instance - * @returns {Object.} JSON object - */ - HybridReplicationParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HybridReplicationParameters - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.HybridReplicationParameters - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HybridReplicationParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.HybridReplicationParameters"; - }; - - /** - * VolumeHybridReplicationType enum. - * @name google.cloud.netapp.v1.HybridReplicationParameters.VolumeHybridReplicationType - * @enum {number} - * @property {number} VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED value - * @property {number} MIGRATION=1 MIGRATION value - * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value - * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value - * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value - */ - HybridReplicationParameters.VolumeHybridReplicationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MIGRATION"] = 1; - values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; - values[valuesById[3] = "ONPREM_REPLICATION"] = 3; - values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; - return values; - })(); - - return HybridReplicationParameters; - })(); - - v1.CacheParameters = (function() { - - /** - * Properties of a CacheParameters. - * @memberof google.cloud.netapp.v1 - * @interface ICacheParameters - * @property {string|null} [peerVolumeName] CacheParameters peerVolumeName - * @property {string|null} [peerClusterName] CacheParameters peerClusterName - * @property {string|null} [peerSvmName] CacheParameters peerSvmName - * @property {Array.|null} [peerIpAddresses] CacheParameters peerIpAddresses - * @property {boolean|null} [enableGlobalFileLock] CacheParameters enableGlobalFileLock - * @property {google.cloud.netapp.v1.ICacheConfig|null} [cacheConfig] CacheParameters cacheConfig - * @property {google.cloud.netapp.v1.CacheParameters.CacheState|null} [cacheState] CacheParameters cacheState - * @property {string|null} [command] CacheParameters command - * @property {google.protobuf.ITimestamp|null} [peeringCommandExpiryTime] CacheParameters peeringCommandExpiryTime - * @property {string|null} [passphrase] CacheParameters passphrase - * @property {string|null} [stateDetails] CacheParameters stateDetails - */ - - /** - * Constructs a new CacheParameters. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CacheParameters. - * @implements ICacheParameters - * @constructor - * @param {google.cloud.netapp.v1.ICacheParameters=} [properties] Properties to set - */ - function CacheParameters(properties) { - this.peerIpAddresses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CacheParameters peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.peerVolumeName = ""; - - /** - * CacheParameters peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.peerClusterName = ""; - - /** - * CacheParameters peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.peerSvmName = ""; - - /** - * CacheParameters peerIpAddresses. - * @member {Array.} peerIpAddresses - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.peerIpAddresses = $util.emptyArray; - - /** - * CacheParameters enableGlobalFileLock. - * @member {boolean|null|undefined} enableGlobalFileLock - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.enableGlobalFileLock = null; - - /** - * CacheParameters cacheConfig. - * @member {google.cloud.netapp.v1.ICacheConfig|null|undefined} cacheConfig - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.cacheConfig = null; - - /** - * CacheParameters cacheState. - * @member {google.cloud.netapp.v1.CacheParameters.CacheState} cacheState - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.cacheState = 0; - - /** - * CacheParameters command. - * @member {string} command - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.command = ""; - - /** - * CacheParameters peeringCommandExpiryTime. - * @member {google.protobuf.ITimestamp|null|undefined} peeringCommandExpiryTime - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.peeringCommandExpiryTime = null; - - /** - * CacheParameters passphrase. - * @member {string} passphrase - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.passphrase = ""; - - /** - * CacheParameters stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - */ - CacheParameters.prototype.stateDetails = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CacheParameters.prototype, "_enableGlobalFileLock", { - get: $util.oneOfGetter($oneOfFields = ["enableGlobalFileLock"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CacheParameters instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {google.cloud.netapp.v1.ICacheParameters=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters instance - */ - CacheParameters.create = function create(properties) { - return new CacheParameters(properties); - }; - - /** - * Encodes the specified CacheParameters message. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {google.cloud.netapp.v1.ICacheParameters} message CacheParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CacheParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.peerVolumeName); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); - if (message.peerIpAddresses != null && message.peerIpAddresses.length) - for (var i = 0; i < message.peerIpAddresses.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); - if (message.enableGlobalFileLock != null && Object.hasOwnProperty.call(message, "enableGlobalFileLock")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableGlobalFileLock); - if (message.cacheConfig != null && Object.hasOwnProperty.call(message, "cacheConfig")) - $root.google.cloud.netapp.v1.CacheConfig.encode(message.cacheConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cacheState != null && Object.hasOwnProperty.call(message, "cacheState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.cacheState); - if (message.command != null && Object.hasOwnProperty.call(message, "command")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.command); - if (message.peeringCommandExpiryTime != null && Object.hasOwnProperty.call(message, "peeringCommandExpiryTime")) - $root.google.protobuf.Timestamp.encode(message.peeringCommandExpiryTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.passphrase); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.stateDetails); - return writer; - }; - - /** - * Encodes the specified CacheParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {google.cloud.netapp.v1.ICacheParameters} message CacheParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CacheParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CacheParameters message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CacheParameters.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CacheParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.peerVolumeName = reader.string(); - break; - } - case 2: { - message.peerClusterName = reader.string(); - break; - } - case 3: { - message.peerSvmName = reader.string(); - break; - } - case 4: { - if (!(message.peerIpAddresses && message.peerIpAddresses.length)) - message.peerIpAddresses = []; - message.peerIpAddresses.push(reader.string()); - break; - } - case 5: { - message.enableGlobalFileLock = reader.bool(); - break; - } - case 6: { - message.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.cacheState = reader.int32(); - break; - } - case 8: { - message.command = reader.string(); - break; - } - case 9: { - message.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.passphrase = reader.string(); - break; - } - case 12: { - message.stateDetails = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CacheParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CacheParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CacheParameters message. - * @function verify - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CacheParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { - if (!Array.isArray(message.peerIpAddresses)) - return "peerIpAddresses: array expected"; - for (var i = 0; i < message.peerIpAddresses.length; ++i) - if (!$util.isString(message.peerIpAddresses[i])) - return "peerIpAddresses: string[] expected"; - } - if (message.enableGlobalFileLock != null && message.hasOwnProperty("enableGlobalFileLock")) { - properties._enableGlobalFileLock = 1; - if (typeof message.enableGlobalFileLock !== "boolean") - return "enableGlobalFileLock: boolean expected"; - } - if (message.cacheConfig != null && message.hasOwnProperty("cacheConfig")) { - var error = $root.google.cloud.netapp.v1.CacheConfig.verify(message.cacheConfig); - if (error) - return "cacheConfig." + error; - } - if (message.cacheState != null && message.hasOwnProperty("cacheState")) - switch (message.cacheState) { - default: - return "cacheState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.command != null && message.hasOwnProperty("command")) - if (!$util.isString(message.command)) - return "command: string expected"; - if (message.peeringCommandExpiryTime != null && message.hasOwnProperty("peeringCommandExpiryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.peeringCommandExpiryTime); - if (error) - return "peeringCommandExpiryTime." + error; - } - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - if (!$util.isString(message.passphrase)) - return "passphrase: string expected"; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - return null; - }; - - /** - * Creates a CacheParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CacheParameters} CacheParameters - */ - CacheParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CacheParameters) - return object; - var message = new $root.google.cloud.netapp.v1.CacheParameters(); - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - if (object.peerIpAddresses) { - if (!Array.isArray(object.peerIpAddresses)) - throw TypeError(".google.cloud.netapp.v1.CacheParameters.peerIpAddresses: array expected"); - message.peerIpAddresses = []; - for (var i = 0; i < object.peerIpAddresses.length; ++i) - message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); - } - if (object.enableGlobalFileLock != null) - message.enableGlobalFileLock = Boolean(object.enableGlobalFileLock); - if (object.cacheConfig != null) { - if (typeof object.cacheConfig !== "object") - throw TypeError(".google.cloud.netapp.v1.CacheParameters.cacheConfig: object expected"); - message.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.fromObject(object.cacheConfig); - } - switch (object.cacheState) { - default: - if (typeof object.cacheState === "number") { - message.cacheState = object.cacheState; - break; - } - break; - case "CACHE_STATE_UNSPECIFIED": - case 0: - message.cacheState = 0; - break; - case "PENDING_CLUSTER_PEERING": - case 1: - message.cacheState = 1; - break; - case "PENDING_SVM_PEERING": - case 2: - message.cacheState = 2; - break; - case "PEERED": - case 3: - message.cacheState = 3; - break; - case "ERROR": - case 4: - message.cacheState = 4; - break; - } - if (object.command != null) - message.command = String(object.command); - if (object.peeringCommandExpiryTime != null) { - if (typeof object.peeringCommandExpiryTime !== "object") - throw TypeError(".google.cloud.netapp.v1.CacheParameters.peeringCommandExpiryTime: object expected"); - message.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.peeringCommandExpiryTime); - } - if (object.passphrase != null) - message.passphrase = String(object.passphrase); - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - return message; - }; - - /** - * Creates a plain object from a CacheParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {google.cloud.netapp.v1.CacheParameters} message CacheParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CacheParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.peerIpAddresses = []; - if (options.defaults) { - object.peerVolumeName = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - object.cacheConfig = null; - object.cacheState = options.enums === String ? "CACHE_STATE_UNSPECIFIED" : 0; - object.command = ""; - object.peeringCommandExpiryTime = null; - object.passphrase = ""; - object.stateDetails = ""; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - if (message.peerIpAddresses && message.peerIpAddresses.length) { - object.peerIpAddresses = []; - for (var j = 0; j < message.peerIpAddresses.length; ++j) - object.peerIpAddresses[j] = message.peerIpAddresses[j]; - } - if (message.enableGlobalFileLock != null && message.hasOwnProperty("enableGlobalFileLock")) { - object.enableGlobalFileLock = message.enableGlobalFileLock; - if (options.oneofs) - object._enableGlobalFileLock = "enableGlobalFileLock"; - } - if (message.cacheConfig != null && message.hasOwnProperty("cacheConfig")) - object.cacheConfig = $root.google.cloud.netapp.v1.CacheConfig.toObject(message.cacheConfig, options); - if (message.cacheState != null && message.hasOwnProperty("cacheState")) - object.cacheState = options.enums === String ? $root.google.cloud.netapp.v1.CacheParameters.CacheState[message.cacheState] === undefined ? message.cacheState : $root.google.cloud.netapp.v1.CacheParameters.CacheState[message.cacheState] : message.cacheState; - if (message.command != null && message.hasOwnProperty("command")) - object.command = message.command; - if (message.peeringCommandExpiryTime != null && message.hasOwnProperty("peeringCommandExpiryTime")) - object.peeringCommandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.peeringCommandExpiryTime, options); - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - object.passphrase = message.passphrase; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - return object; - }; - - /** - * Converts this CacheParameters to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CacheParameters - * @instance - * @returns {Object.} JSON object - */ - CacheParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CacheParameters - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CacheParameters - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CacheParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CacheParameters"; - }; - - /** - * CacheState enum. - * @name google.cloud.netapp.v1.CacheParameters.CacheState - * @enum {number} - * @property {number} CACHE_STATE_UNSPECIFIED=0 CACHE_STATE_UNSPECIFIED value - * @property {number} PENDING_CLUSTER_PEERING=1 PENDING_CLUSTER_PEERING value - * @property {number} PENDING_SVM_PEERING=2 PENDING_SVM_PEERING value - * @property {number} PEERED=3 PEERED value - * @property {number} ERROR=4 ERROR value - */ - CacheParameters.CacheState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CACHE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING_CLUSTER_PEERING"] = 1; - values[valuesById[2] = "PENDING_SVM_PEERING"] = 2; - values[valuesById[3] = "PEERED"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return CacheParameters; - })(); - - v1.CacheConfig = (function() { - - /** - * Properties of a CacheConfig. - * @memberof google.cloud.netapp.v1 - * @interface ICacheConfig - * @property {google.cloud.netapp.v1.ICachePrePopulate|null} [cachePrePopulate] CacheConfig cachePrePopulate - * @property {boolean|null} [writebackEnabled] CacheConfig writebackEnabled - * @property {boolean|null} [cifsChangeNotifyEnabled] CacheConfig cifsChangeNotifyEnabled - * @property {google.cloud.netapp.v1.CacheConfig.CachePrePopulateState|null} [cachePrePopulateState] CacheConfig cachePrePopulateState - */ - - /** - * Constructs a new CacheConfig. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CacheConfig. - * @implements ICacheConfig - * @constructor - * @param {google.cloud.netapp.v1.ICacheConfig=} [properties] Properties to set - */ - function CacheConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CacheConfig cachePrePopulate. - * @member {google.cloud.netapp.v1.ICachePrePopulate|null|undefined} cachePrePopulate - * @memberof google.cloud.netapp.v1.CacheConfig - * @instance - */ - CacheConfig.prototype.cachePrePopulate = null; - - /** - * CacheConfig writebackEnabled. - * @member {boolean|null|undefined} writebackEnabled - * @memberof google.cloud.netapp.v1.CacheConfig - * @instance - */ - CacheConfig.prototype.writebackEnabled = null; - - /** - * CacheConfig cifsChangeNotifyEnabled. - * @member {boolean|null|undefined} cifsChangeNotifyEnabled - * @memberof google.cloud.netapp.v1.CacheConfig - * @instance - */ - CacheConfig.prototype.cifsChangeNotifyEnabled = null; - - /** - * CacheConfig cachePrePopulateState. - * @member {google.cloud.netapp.v1.CacheConfig.CachePrePopulateState} cachePrePopulateState - * @memberof google.cloud.netapp.v1.CacheConfig - * @instance - */ - CacheConfig.prototype.cachePrePopulateState = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CacheConfig.prototype, "_writebackEnabled", { - get: $util.oneOfGetter($oneOfFields = ["writebackEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CacheConfig.prototype, "_cifsChangeNotifyEnabled", { - get: $util.oneOfGetter($oneOfFields = ["cifsChangeNotifyEnabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CacheConfig instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {google.cloud.netapp.v1.ICacheConfig=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig instance - */ - CacheConfig.create = function create(properties) { - return new CacheConfig(properties); - }; - - /** - * Encodes the specified CacheConfig message. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {google.cloud.netapp.v1.ICacheConfig} message CacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CacheConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cachePrePopulate != null && Object.hasOwnProperty.call(message, "cachePrePopulate")) - $root.google.cloud.netapp.v1.CachePrePopulate.encode(message.cachePrePopulate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.writebackEnabled != null && Object.hasOwnProperty.call(message, "writebackEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.writebackEnabled); - if (message.cifsChangeNotifyEnabled != null && Object.hasOwnProperty.call(message, "cifsChangeNotifyEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.cifsChangeNotifyEnabled); - if (message.cachePrePopulateState != null && Object.hasOwnProperty.call(message, "cachePrePopulateState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.cachePrePopulateState); - return writer; - }; - - /** - * Encodes the specified CacheConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CacheConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {google.cloud.netapp.v1.ICacheConfig} message CacheConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CacheConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CacheConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CacheConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CacheConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.decode(reader, reader.uint32()); - break; - } - case 2: { - message.writebackEnabled = reader.bool(); - break; - } - case 5: { - message.cifsChangeNotifyEnabled = reader.bool(); - break; - } - case 6: { - message.cachePrePopulateState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CacheConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CacheConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CacheConfig message. - * @function verify - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CacheConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.cachePrePopulate != null && message.hasOwnProperty("cachePrePopulate")) { - var error = $root.google.cloud.netapp.v1.CachePrePopulate.verify(message.cachePrePopulate); - if (error) - return "cachePrePopulate." + error; - } - if (message.writebackEnabled != null && message.hasOwnProperty("writebackEnabled")) { - properties._writebackEnabled = 1; - if (typeof message.writebackEnabled !== "boolean") - return "writebackEnabled: boolean expected"; - } - if (message.cifsChangeNotifyEnabled != null && message.hasOwnProperty("cifsChangeNotifyEnabled")) { - properties._cifsChangeNotifyEnabled = 1; - if (typeof message.cifsChangeNotifyEnabled !== "boolean") - return "cifsChangeNotifyEnabled: boolean expected"; - } - if (message.cachePrePopulateState != null && message.hasOwnProperty("cachePrePopulateState")) - switch (message.cachePrePopulateState) { - default: - return "cachePrePopulateState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a CacheConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CacheConfig} CacheConfig - */ - CacheConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CacheConfig) - return object; - var message = new $root.google.cloud.netapp.v1.CacheConfig(); - if (object.cachePrePopulate != null) { - if (typeof object.cachePrePopulate !== "object") - throw TypeError(".google.cloud.netapp.v1.CacheConfig.cachePrePopulate: object expected"); - message.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.fromObject(object.cachePrePopulate); - } - if (object.writebackEnabled != null) - message.writebackEnabled = Boolean(object.writebackEnabled); - if (object.cifsChangeNotifyEnabled != null) - message.cifsChangeNotifyEnabled = Boolean(object.cifsChangeNotifyEnabled); - switch (object.cachePrePopulateState) { - default: - if (typeof object.cachePrePopulateState === "number") { - message.cachePrePopulateState = object.cachePrePopulateState; - break; - } - break; - case "CACHE_PRE_POPULATE_STATE_UNSPECIFIED": - case 0: - message.cachePrePopulateState = 0; - break; - case "NOT_NEEDED": - case 1: - message.cachePrePopulateState = 1; - break; - case "IN_PROGRESS": - case 2: - message.cachePrePopulateState = 2; - break; - case "COMPLETE": - case 3: - message.cachePrePopulateState = 3; - break; - case "ERROR": - case 4: - message.cachePrePopulateState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a CacheConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {google.cloud.netapp.v1.CacheConfig} message CacheConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CacheConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cachePrePopulate = null; - object.cachePrePopulateState = options.enums === String ? "CACHE_PRE_POPULATE_STATE_UNSPECIFIED" : 0; - } - if (message.cachePrePopulate != null && message.hasOwnProperty("cachePrePopulate")) - object.cachePrePopulate = $root.google.cloud.netapp.v1.CachePrePopulate.toObject(message.cachePrePopulate, options); - if (message.writebackEnabled != null && message.hasOwnProperty("writebackEnabled")) { - object.writebackEnabled = message.writebackEnabled; - if (options.oneofs) - object._writebackEnabled = "writebackEnabled"; - } - if (message.cifsChangeNotifyEnabled != null && message.hasOwnProperty("cifsChangeNotifyEnabled")) { - object.cifsChangeNotifyEnabled = message.cifsChangeNotifyEnabled; - if (options.oneofs) - object._cifsChangeNotifyEnabled = "cifsChangeNotifyEnabled"; - } - if (message.cachePrePopulateState != null && message.hasOwnProperty("cachePrePopulateState")) - object.cachePrePopulateState = options.enums === String ? $root.google.cloud.netapp.v1.CacheConfig.CachePrePopulateState[message.cachePrePopulateState] === undefined ? message.cachePrePopulateState : $root.google.cloud.netapp.v1.CacheConfig.CachePrePopulateState[message.cachePrePopulateState] : message.cachePrePopulateState; - return object; - }; - - /** - * Converts this CacheConfig to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CacheConfig - * @instance - * @returns {Object.} JSON object - */ - CacheConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CacheConfig - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CacheConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CacheConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CacheConfig"; - }; - - /** - * CachePrePopulateState enum. - * @name google.cloud.netapp.v1.CacheConfig.CachePrePopulateState - * @enum {number} - * @property {number} CACHE_PRE_POPULATE_STATE_UNSPECIFIED=0 CACHE_PRE_POPULATE_STATE_UNSPECIFIED value - * @property {number} NOT_NEEDED=1 NOT_NEEDED value - * @property {number} IN_PROGRESS=2 IN_PROGRESS value - * @property {number} COMPLETE=3 COMPLETE value - * @property {number} ERROR=4 ERROR value - */ - CacheConfig.CachePrePopulateState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CACHE_PRE_POPULATE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_NEEDED"] = 1; - values[valuesById[2] = "IN_PROGRESS"] = 2; - values[valuesById[3] = "COMPLETE"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return CacheConfig; - })(); - - v1.CachePrePopulate = (function() { - - /** - * Properties of a CachePrePopulate. - * @memberof google.cloud.netapp.v1 - * @interface ICachePrePopulate - * @property {Array.|null} [pathList] CachePrePopulate pathList - * @property {Array.|null} [excludePathList] CachePrePopulate excludePathList - * @property {boolean|null} [recursion] CachePrePopulate recursion - */ - - /** - * Constructs a new CachePrePopulate. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CachePrePopulate. - * @implements ICachePrePopulate - * @constructor - * @param {google.cloud.netapp.v1.ICachePrePopulate=} [properties] Properties to set - */ - function CachePrePopulate(properties) { - this.pathList = []; - this.excludePathList = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CachePrePopulate pathList. - * @member {Array.} pathList - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @instance - */ - CachePrePopulate.prototype.pathList = $util.emptyArray; - - /** - * CachePrePopulate excludePathList. - * @member {Array.} excludePathList - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @instance - */ - CachePrePopulate.prototype.excludePathList = $util.emptyArray; - - /** - * CachePrePopulate recursion. - * @member {boolean|null|undefined} recursion - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @instance - */ - CachePrePopulate.prototype.recursion = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(CachePrePopulate.prototype, "_recursion", { - get: $util.oneOfGetter($oneOfFields = ["recursion"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CachePrePopulate instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {google.cloud.netapp.v1.ICachePrePopulate=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate instance - */ - CachePrePopulate.create = function create(properties) { - return new CachePrePopulate(properties); - }; - - /** - * Encodes the specified CachePrePopulate message. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {google.cloud.netapp.v1.ICachePrePopulate} message CachePrePopulate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CachePrePopulate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pathList != null && message.pathList.length) - for (var i = 0; i < message.pathList.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pathList[i]); - if (message.excludePathList != null && message.excludePathList.length) - for (var i = 0; i < message.excludePathList.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludePathList[i]); - if (message.recursion != null && Object.hasOwnProperty.call(message, "recursion")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.recursion); - return writer; - }; - - /** - * Encodes the specified CachePrePopulate message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CachePrePopulate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {google.cloud.netapp.v1.ICachePrePopulate} message CachePrePopulate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CachePrePopulate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CachePrePopulate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CachePrePopulate.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CachePrePopulate(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.pathList && message.pathList.length)) - message.pathList = []; - message.pathList.push(reader.string()); - break; - } - case 2: { - if (!(message.excludePathList && message.excludePathList.length)) - message.excludePathList = []; - message.excludePathList.push(reader.string()); - break; - } - case 3: { - message.recursion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CachePrePopulate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CachePrePopulate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CachePrePopulate message. - * @function verify - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CachePrePopulate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.pathList != null && message.hasOwnProperty("pathList")) { - if (!Array.isArray(message.pathList)) - return "pathList: array expected"; - for (var i = 0; i < message.pathList.length; ++i) - if (!$util.isString(message.pathList[i])) - return "pathList: string[] expected"; - } - if (message.excludePathList != null && message.hasOwnProperty("excludePathList")) { - if (!Array.isArray(message.excludePathList)) - return "excludePathList: array expected"; - for (var i = 0; i < message.excludePathList.length; ++i) - if (!$util.isString(message.excludePathList[i])) - return "excludePathList: string[] expected"; - } - if (message.recursion != null && message.hasOwnProperty("recursion")) { - properties._recursion = 1; - if (typeof message.recursion !== "boolean") - return "recursion: boolean expected"; - } - return null; - }; - - /** - * Creates a CachePrePopulate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CachePrePopulate} CachePrePopulate - */ - CachePrePopulate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CachePrePopulate) - return object; - var message = new $root.google.cloud.netapp.v1.CachePrePopulate(); - if (object.pathList) { - if (!Array.isArray(object.pathList)) - throw TypeError(".google.cloud.netapp.v1.CachePrePopulate.pathList: array expected"); - message.pathList = []; - for (var i = 0; i < object.pathList.length; ++i) - message.pathList[i] = String(object.pathList[i]); - } - if (object.excludePathList) { - if (!Array.isArray(object.excludePathList)) - throw TypeError(".google.cloud.netapp.v1.CachePrePopulate.excludePathList: array expected"); - message.excludePathList = []; - for (var i = 0; i < object.excludePathList.length; ++i) - message.excludePathList[i] = String(object.excludePathList[i]); - } - if (object.recursion != null) - message.recursion = Boolean(object.recursion); - return message; - }; - - /** - * Creates a plain object from a CachePrePopulate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {google.cloud.netapp.v1.CachePrePopulate} message CachePrePopulate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CachePrePopulate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pathList = []; - object.excludePathList = []; - } - if (message.pathList && message.pathList.length) { - object.pathList = []; - for (var j = 0; j < message.pathList.length; ++j) - object.pathList[j] = message.pathList[j]; - } - if (message.excludePathList && message.excludePathList.length) { - object.excludePathList = []; - for (var j = 0; j < message.excludePathList.length; ++j) - object.excludePathList[j] = message.excludePathList[j]; - } - if (message.recursion != null && message.hasOwnProperty("recursion")) { - object.recursion = message.recursion; - if (options.oneofs) - object._recursion = "recursion"; - } - return object; - }; - - /** - * Converts this CachePrePopulate to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @instance - * @returns {Object.} JSON object - */ - CachePrePopulate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CachePrePopulate - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CachePrePopulate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CachePrePopulate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CachePrePopulate"; - }; - - return CachePrePopulate; - })(); - - v1.BlockDevice = (function() { - - /** - * Properties of a BlockDevice. - * @memberof google.cloud.netapp.v1 - * @interface IBlockDevice - * @property {string|null} [name] BlockDevice name - * @property {Array.|null} [hostGroups] BlockDevice hostGroups - * @property {string|null} [identifier] BlockDevice identifier - * @property {number|Long|null} [sizeGib] BlockDevice sizeGib - * @property {google.cloud.netapp.v1.OsType|null} [osType] BlockDevice osType - */ - - /** - * Constructs a new BlockDevice. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a BlockDevice. - * @implements IBlockDevice - * @constructor - * @param {google.cloud.netapp.v1.IBlockDevice=} [properties] Properties to set - */ - function BlockDevice(properties) { - this.hostGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlockDevice name. - * @member {string|null|undefined} name - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - */ - BlockDevice.prototype.name = null; - - /** - * BlockDevice hostGroups. - * @member {Array.} hostGroups - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - */ - BlockDevice.prototype.hostGroups = $util.emptyArray; - - /** - * BlockDevice identifier. - * @member {string} identifier - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - */ - BlockDevice.prototype.identifier = ""; - - /** - * BlockDevice sizeGib. - * @member {number|Long|null|undefined} sizeGib - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - */ - BlockDevice.prototype.sizeGib = null; - - /** - * BlockDevice osType. - * @member {google.cloud.netapp.v1.OsType} osType - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - */ - BlockDevice.prototype.osType = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BlockDevice.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BlockDevice.prototype, "_sizeGib", { - get: $util.oneOfGetter($oneOfFields = ["sizeGib"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BlockDevice instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {google.cloud.netapp.v1.IBlockDevice=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice instance - */ - BlockDevice.create = function create(properties) { - return new BlockDevice(properties); - }; - - /** - * Encodes the specified BlockDevice message. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {google.cloud.netapp.v1.IBlockDevice} message BlockDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockDevice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.hostGroups != null && message.hostGroups.length) - for (var i = 0; i < message.hostGroups.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostGroups[i]); - if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier); - if (message.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeGib); - if (message.osType != null && Object.hasOwnProperty.call(message, "osType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.osType); - return writer; - }; - - /** - * Encodes the specified BlockDevice message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.BlockDevice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {google.cloud.netapp.v1.IBlockDevice} message BlockDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockDevice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlockDevice message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockDevice.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.BlockDevice(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.hostGroups && message.hostGroups.length)) - message.hostGroups = []; - message.hostGroups.push(reader.string()); - break; - } - case 3: { - message.identifier = reader.string(); - break; - } - case 4: { - message.sizeGib = reader.int64(); - break; - } - case 5: { - message.osType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlockDevice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockDevice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockDevice message. - * @function verify - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockDevice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.hostGroups != null && message.hasOwnProperty("hostGroups")) { - if (!Array.isArray(message.hostGroups)) - return "hostGroups: array expected"; - for (var i = 0; i < message.hostGroups.length; ++i) - if (!$util.isString(message.hostGroups[i])) - return "hostGroups: string[] expected"; - } - if (message.identifier != null && message.hasOwnProperty("identifier")) - if (!$util.isString(message.identifier)) - return "identifier: string expected"; - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) { - properties._sizeGib = 1; - if (!$util.isInteger(message.sizeGib) && !(message.sizeGib && $util.isInteger(message.sizeGib.low) && $util.isInteger(message.sizeGib.high))) - return "sizeGib: integer|Long expected"; - } - if (message.osType != null && message.hasOwnProperty("osType")) - switch (message.osType) { - default: - return "osType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a BlockDevice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.BlockDevice} BlockDevice - */ - BlockDevice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.BlockDevice) - return object; - var message = new $root.google.cloud.netapp.v1.BlockDevice(); - if (object.name != null) - message.name = String(object.name); - if (object.hostGroups) { - if (!Array.isArray(object.hostGroups)) - throw TypeError(".google.cloud.netapp.v1.BlockDevice.hostGroups: array expected"); - message.hostGroups = []; - for (var i = 0; i < object.hostGroups.length; ++i) - message.hostGroups[i] = String(object.hostGroups[i]); - } - if (object.identifier != null) - message.identifier = String(object.identifier); - if (object.sizeGib != null) - if ($util.Long) - (message.sizeGib = $util.Long.fromValue(object.sizeGib)).unsigned = false; - else if (typeof object.sizeGib === "string") - message.sizeGib = parseInt(object.sizeGib, 10); - else if (typeof object.sizeGib === "number") - message.sizeGib = object.sizeGib; - else if (typeof object.sizeGib === "object") - message.sizeGib = new $util.LongBits(object.sizeGib.low >>> 0, object.sizeGib.high >>> 0).toNumber(); - switch (object.osType) { - default: - if (typeof object.osType === "number") { - message.osType = object.osType; - break; - } - break; - case "OS_TYPE_UNSPECIFIED": - case 0: - message.osType = 0; - break; - case "LINUX": - case 1: - message.osType = 1; - break; - case "WINDOWS": - case 2: - message.osType = 2; - break; - case "ESXI": - case 3: - message.osType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a BlockDevice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {google.cloud.netapp.v1.BlockDevice} message BlockDevice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockDevice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hostGroups = []; - if (options.defaults) { - object.identifier = ""; - object.osType = options.enums === String ? "OS_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.hostGroups && message.hostGroups.length) { - object.hostGroups = []; - for (var j = 0; j < message.hostGroups.length; ++j) - object.hostGroups[j] = message.hostGroups[j]; - } - if (message.identifier != null && message.hasOwnProperty("identifier")) - object.identifier = message.identifier; - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) { - if (typeof message.sizeGib === "number") - object.sizeGib = options.longs === String ? String(message.sizeGib) : message.sizeGib; - else - object.sizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.sizeGib) : options.longs === Number ? new $util.LongBits(message.sizeGib.low >>> 0, message.sizeGib.high >>> 0).toNumber() : message.sizeGib; - if (options.oneofs) - object._sizeGib = "sizeGib"; - } - if (message.osType != null && message.hasOwnProperty("osType")) - object.osType = options.enums === String ? $root.google.cloud.netapp.v1.OsType[message.osType] === undefined ? message.osType : $root.google.cloud.netapp.v1.OsType[message.osType] : message.osType; - return object; - }; - - /** - * Converts this BlockDevice to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.BlockDevice - * @instance - * @returns {Object.} JSON object - */ - BlockDevice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BlockDevice - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.BlockDevice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BlockDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.BlockDevice"; - }; - - return BlockDevice; - })(); - - v1.RestoreBackupFilesRequest = (function() { - - /** - * Properties of a RestoreBackupFilesRequest. - * @memberof google.cloud.netapp.v1 - * @interface IRestoreBackupFilesRequest - * @property {string|null} [name] RestoreBackupFilesRequest name - * @property {string|null} [backup] RestoreBackupFilesRequest backup - * @property {Array.|null} [fileList] RestoreBackupFilesRequest fileList - * @property {string|null} [restoreDestinationPath] RestoreBackupFilesRequest restoreDestinationPath - */ - - /** - * Constructs a new RestoreBackupFilesRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a RestoreBackupFilesRequest. - * @implements IRestoreBackupFilesRequest - * @constructor - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest=} [properties] Properties to set - */ - function RestoreBackupFilesRequest(properties) { - this.fileList = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupFilesRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @instance - */ - RestoreBackupFilesRequest.prototype.name = ""; - - /** - * RestoreBackupFilesRequest backup. - * @member {string} backup - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @instance - */ - RestoreBackupFilesRequest.prototype.backup = ""; - - /** - * RestoreBackupFilesRequest fileList. - * @member {Array.} fileList - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @instance - */ - RestoreBackupFilesRequest.prototype.fileList = $util.emptyArray; - - /** - * RestoreBackupFilesRequest restoreDestinationPath. - * @member {string} restoreDestinationPath - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @instance - */ - RestoreBackupFilesRequest.prototype.restoreDestinationPath = ""; - - /** - * Creates a new RestoreBackupFilesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest instance - */ - RestoreBackupFilesRequest.create = function create(properties) { - return new RestoreBackupFilesRequest(properties); - }; - - /** - * Encodes the specified RestoreBackupFilesRequest message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} message RestoreBackupFilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupFilesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backup); - if (message.fileList != null && message.fileList.length) - for (var i = 0; i < message.fileList.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileList[i]); - if (message.restoreDestinationPath != null && Object.hasOwnProperty.call(message, "restoreDestinationPath")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.restoreDestinationPath); - return writer; - }; - - /** - * Encodes the specified RestoreBackupFilesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesRequest} message RestoreBackupFilesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupFilesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupFilesRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreBackupFilesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.backup = reader.string(); - break; - } - case 3: { - if (!(message.fileList && message.fileList.length)) - message.fileList = []; - message.fileList.push(reader.string()); - break; - } - case 4: { - message.restoreDestinationPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupFilesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupFilesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupFilesRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupFilesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.fileList != null && message.hasOwnProperty("fileList")) { - if (!Array.isArray(message.fileList)) - return "fileList: array expected"; - for (var i = 0; i < message.fileList.length; ++i) - if (!$util.isString(message.fileList[i])) - return "fileList: string[] expected"; - } - if (message.restoreDestinationPath != null && message.hasOwnProperty("restoreDestinationPath")) - if (!$util.isString(message.restoreDestinationPath)) - return "restoreDestinationPath: string expected"; - return null; - }; - - /** - * Creates a RestoreBackupFilesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.RestoreBackupFilesRequest} RestoreBackupFilesRequest - */ - RestoreBackupFilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.RestoreBackupFilesRequest) - return object; - var message = new $root.google.cloud.netapp.v1.RestoreBackupFilesRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.backup != null) - message.backup = String(object.backup); - if (object.fileList) { - if (!Array.isArray(object.fileList)) - throw TypeError(".google.cloud.netapp.v1.RestoreBackupFilesRequest.fileList: array expected"); - message.fileList = []; - for (var i = 0; i < object.fileList.length; ++i) - message.fileList[i] = String(object.fileList[i]); - } - if (object.restoreDestinationPath != null) - message.restoreDestinationPath = String(object.restoreDestinationPath); - return message; - }; - - /** - * Creates a plain object from a RestoreBackupFilesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {google.cloud.netapp.v1.RestoreBackupFilesRequest} message RestoreBackupFilesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupFilesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fileList = []; - if (options.defaults) { - object.name = ""; - object.backup = ""; - object.restoreDestinationPath = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.fileList && message.fileList.length) { - object.fileList = []; - for (var j = 0; j < message.fileList.length; ++j) - object.fileList[j] = message.fileList[j]; - } - if (message.restoreDestinationPath != null && message.hasOwnProperty("restoreDestinationPath")) - object.restoreDestinationPath = message.restoreDestinationPath; - return object; - }; - - /** - * Converts this RestoreBackupFilesRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupFilesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupFilesRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.RestoreBackupFilesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreBackupFilesRequest"; - }; - - return RestoreBackupFilesRequest; - })(); - - v1.RestoreBackupFilesResponse = (function() { - - /** - * Properties of a RestoreBackupFilesResponse. - * @memberof google.cloud.netapp.v1 - * @interface IRestoreBackupFilesResponse - */ - - /** - * Constructs a new RestoreBackupFilesResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a RestoreBackupFilesResponse. - * @implements IRestoreBackupFilesResponse - * @constructor - * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse=} [properties] Properties to set - */ - function RestoreBackupFilesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new RestoreBackupFilesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse instance - */ - RestoreBackupFilesResponse.create = function create(properties) { - return new RestoreBackupFilesResponse(properties); - }; - - /** - * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse} message RestoreBackupFilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupFilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {google.cloud.netapp.v1.IRestoreBackupFilesResponse} message RestoreBackupFilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupFilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupFilesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RestoreBackupFilesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupFilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupFilesResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupFilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.RestoreBackupFilesResponse} RestoreBackupFilesResponse - */ - RestoreBackupFilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.RestoreBackupFilesResponse) - return object; - return new $root.google.cloud.netapp.v1.RestoreBackupFilesResponse(); - }; - - /** - * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {google.cloud.netapp.v1.RestoreBackupFilesResponse} message RestoreBackupFilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupFilesResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RestoreBackupFilesResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupFilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupFilesResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.RestoreBackupFilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.RestoreBackupFilesResponse"; - }; - - return RestoreBackupFilesResponse; - })(); - - v1.EstablishVolumePeeringRequest = (function() { - - /** - * Properties of an EstablishVolumePeeringRequest. - * @memberof google.cloud.netapp.v1 - * @interface IEstablishVolumePeeringRequest - * @property {string|null} [name] EstablishVolumePeeringRequest name - * @property {string|null} [peerClusterName] EstablishVolumePeeringRequest peerClusterName - * @property {string|null} [peerSvmName] EstablishVolumePeeringRequest peerSvmName - * @property {Array.|null} [peerIpAddresses] EstablishVolumePeeringRequest peerIpAddresses - * @property {string|null} [peerVolumeName] EstablishVolumePeeringRequest peerVolumeName - */ - - /** - * Constructs a new EstablishVolumePeeringRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an EstablishVolumePeeringRequest. - * @implements IEstablishVolumePeeringRequest - * @constructor - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set - */ - function EstablishVolumePeeringRequest(properties) { - this.peerIpAddresses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EstablishVolumePeeringRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - */ - EstablishVolumePeeringRequest.prototype.name = ""; - - /** - * EstablishVolumePeeringRequest peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - */ - EstablishVolumePeeringRequest.prototype.peerClusterName = ""; - - /** - * EstablishVolumePeeringRequest peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - */ - EstablishVolumePeeringRequest.prototype.peerSvmName = ""; - - /** - * EstablishVolumePeeringRequest peerIpAddresses. - * @member {Array.} peerIpAddresses - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - */ - EstablishVolumePeeringRequest.prototype.peerIpAddresses = $util.emptyArray; - - /** - * EstablishVolumePeeringRequest peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - */ - EstablishVolumePeeringRequest.prototype.peerVolumeName = ""; - - /** - * Creates a new EstablishVolumePeeringRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest instance - */ - EstablishVolumePeeringRequest.create = function create(properties) { - return new EstablishVolumePeeringRequest(properties); - }; - - /** - * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EstablishVolumePeeringRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); - if (message.peerIpAddresses != null && message.peerIpAddresses.length) - for (var i = 0; i < message.peerIpAddresses.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); - return writer; - }; - - /** - * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EstablishVolumePeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EstablishVolumePeeringRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.peerClusterName = reader.string(); - break; - } - case 3: { - message.peerSvmName = reader.string(); - break; - } - case 4: { - if (!(message.peerIpAddresses && message.peerIpAddresses.length)) - message.peerIpAddresses = []; - message.peerIpAddresses.push(reader.string()); - break; - } - case 5: { - message.peerVolumeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EstablishVolumePeeringRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EstablishVolumePeeringRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EstablishVolumePeeringRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { - if (!Array.isArray(message.peerIpAddresses)) - return "peerIpAddresses: array expected"; - for (var i = 0; i < message.peerIpAddresses.length; ++i) - if (!$util.isString(message.peerIpAddresses[i])) - return "peerIpAddresses: string[] expected"; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - return null; - }; - - /** - * Creates an EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest - */ - EstablishVolumePeeringRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest) - return object; - var message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - if (object.peerIpAddresses) { - if (!Array.isArray(object.peerIpAddresses)) - throw TypeError(".google.cloud.netapp.v1.EstablishVolumePeeringRequest.peerIpAddresses: array expected"); - message.peerIpAddresses = []; - for (var i = 0; i < object.peerIpAddresses.length; ++i) - message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); - } - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - return message; - }; - - /** - * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {google.cloud.netapp.v1.EstablishVolumePeeringRequest} message EstablishVolumePeeringRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EstablishVolumePeeringRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.peerIpAddresses = []; - if (options.defaults) { - object.name = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - object.peerVolumeName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - if (message.peerIpAddresses && message.peerIpAddresses.length) { - object.peerIpAddresses = []; - for (var j = 0; j < message.peerIpAddresses.length; ++j) - object.peerIpAddresses[j] = message.peerIpAddresses[j]; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - return object; - }; - - /** - * Converts this EstablishVolumePeeringRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @instance - * @returns {Object.} JSON object - */ - EstablishVolumePeeringRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EstablishVolumePeeringRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EstablishVolumePeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishVolumePeeringRequest"; - }; - - return EstablishVolumePeeringRequest; - })(); - - v1.ListSnapshotsRequest = (function() { - - /** - * Properties of a ListSnapshotsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListSnapshotsRequest - * @property {string|null} [parent] ListSnapshotsRequest parent - * @property {number|null} [pageSize] ListSnapshotsRequest pageSize - * @property {string|null} [pageToken] ListSnapshotsRequest pageToken - * @property {string|null} [orderBy] ListSnapshotsRequest orderBy - * @property {string|null} [filter] ListSnapshotsRequest filter - */ - - /** - * Constructs a new ListSnapshotsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListSnapshotsRequest. - * @implements IListSnapshotsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set - */ - function ListSnapshotsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSnapshotsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.parent = ""; - - /** - * ListSnapshotsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.pageSize = 0; - - /** - * ListSnapshotsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.pageToken = ""; - - /** - * ListSnapshotsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.orderBy = ""; - - /** - * ListSnapshotsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.filter = ""; - - /** - * Creates a new ListSnapshotsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest instance - */ - ListSnapshotsRequest.create = function create(properties) { - return new ListSnapshotsRequest(properties); - }; - - /** - * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSnapshotsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSnapshotsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListSnapshotsRequest} ListSnapshotsRequest - */ - ListSnapshotsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListSnapshotsRequest(); - 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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {google.cloud.netapp.v1.ListSnapshotsRequest} message ListSnapshotsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSnapshotsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListSnapshotsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @instance - * @returns {Object.} JSON object - */ - ListSnapshotsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSnapshotsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListSnapshotsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsRequest"; - }; - - return ListSnapshotsRequest; - })(); - - v1.ListSnapshotsResponse = (function() { - - /** - * Properties of a ListSnapshotsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListSnapshotsResponse - * @property {Array.|null} [snapshots] ListSnapshotsResponse snapshots - * @property {string|null} [nextPageToken] ListSnapshotsResponse nextPageToken - * @property {Array.|null} [unreachable] ListSnapshotsResponse unreachable - */ - - /** - * Constructs a new ListSnapshotsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListSnapshotsResponse. - * @implements IListSnapshotsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set - */ - function ListSnapshotsResponse(properties) { - this.snapshots = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSnapshotsResponse snapshots. - * @member {Array.} snapshots - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @instance - */ - ListSnapshotsResponse.prototype.snapshots = $util.emptyArray; - - /** - * ListSnapshotsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @instance - */ - ListSnapshotsResponse.prototype.nextPageToken = ""; - - /** - * ListSnapshotsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @instance - */ - ListSnapshotsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListSnapshotsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse instance - */ - ListSnapshotsResponse.create = function create(properties) { - return new ListSnapshotsResponse(properties); - }; - - /** - * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshots != null && message.snapshots.length) - for (var i = 0; i < message.snapshots.length; ++i) - $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListSnapshotsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {google.cloud.netapp.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.snapshots && message.snapshots.length)) - message.snapshots = []; - message.snapshots.push($root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSnapshotsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSnapshotsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshots != null && message.hasOwnProperty("snapshots")) { - if (!Array.isArray(message.snapshots)) - return "snapshots: array expected"; - for (var i = 0; i < message.snapshots.length; ++i) { - var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshots[i]); - if (error) - return "snapshots." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListSnapshotsResponse} ListSnapshotsResponse - */ - ListSnapshotsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListSnapshotsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListSnapshotsResponse(); - if (object.snapshots) { - if (!Array.isArray(object.snapshots)) - throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: array expected"); - message.snapshots = []; - for (var i = 0; i < object.snapshots.length; ++i) { - if (typeof object.snapshots[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.snapshots: object expected"); - message.snapshots[i] = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshots[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListSnapshotsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {google.cloud.netapp.v1.ListSnapshotsResponse} message ListSnapshotsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSnapshotsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.snapshots = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.snapshots && message.snapshots.length) { - object.snapshots = []; - for (var j = 0; j < message.snapshots.length; ++j) - object.snapshots[j] = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshots[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListSnapshotsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @instance - * @returns {Object.} JSON object - */ - ListSnapshotsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSnapshotsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListSnapshotsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListSnapshotsResponse"; - }; - - return ListSnapshotsResponse; - })(); - - v1.GetSnapshotRequest = (function() { - - /** - * Properties of a GetSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetSnapshotRequest - * @property {string|null} [name] GetSnapshotRequest name - */ - - /** - * Constructs a new GetSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetSnapshotRequest. - * @implements IGetSnapshotRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set - */ - function GetSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSnapshotRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @instance - */ - GetSnapshotRequest.prototype.name = ""; - - /** - * Creates a new GetSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IGetSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest instance - */ - GetSnapshotRequest.create = function create(properties) { - return new GetSnapshotRequest(properties); - }; - - /** - * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSnapshotRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSnapshotRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetSnapshotRequest} GetSnapshotRequest - */ - GetSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetSnapshotRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetSnapshotRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.GetSnapshotRequest} message GetSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - GetSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetSnapshotRequest"; - }; - - return GetSnapshotRequest; - })(); - - v1.CreateSnapshotRequest = (function() { - - /** - * Properties of a CreateSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateSnapshotRequest - * @property {string|null} [parent] CreateSnapshotRequest parent - * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] CreateSnapshotRequest snapshot - * @property {string|null} [snapshotId] CreateSnapshotRequest snapshotId - */ - - /** - * Constructs a new CreateSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateSnapshotRequest. - * @implements ICreateSnapshotRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set - */ - function CreateSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateSnapshotRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.parent = ""; - - /** - * CreateSnapshotRequest snapshot. - * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.snapshot = null; - - /** - * CreateSnapshotRequest snapshotId. - * @member {string} snapshotId - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.snapshotId = ""; - - /** - * Creates a new CreateSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest instance - */ - CreateSnapshotRequest.create = function create(properties) { - return new CreateSnapshotRequest(properties); - }; - - /** - * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotId); - return writer; - }; - - /** - * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSnapshotRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); - break; - } - case 3: { - message.snapshotId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateSnapshotRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.snapshot != null && message.hasOwnProperty("snapshot")) { - var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); - if (error) - return "snapshot." + error; - } - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - if (!$util.isString(message.snapshotId)) - return "snapshotId: string expected"; - return null; - }; - - /** - * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateSnapshotRequest} CreateSnapshotRequest - */ - CreateSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateSnapshotRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateSnapshotRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.snapshot != null) { - if (typeof object.snapshot !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateSnapshotRequest.snapshot: object expected"); - message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); - } - if (object.snapshotId != null) - message.snapshotId = String(object.snapshotId); - return message; - }; - - /** - * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.CreateSnapshotRequest} message CreateSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.snapshot = null; - object.snapshotId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.snapshot != null && message.hasOwnProperty("snapshot")) - object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - object.snapshotId = message.snapshotId; - return object; - }; - - /** - * Converts this CreateSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateSnapshotRequest"; - }; - - return CreateSnapshotRequest; - })(); - - v1.DeleteSnapshotRequest = (function() { - - /** - * Properties of a DeleteSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteSnapshotRequest - * @property {string|null} [name] DeleteSnapshotRequest name - */ - - /** - * Constructs a new DeleteSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteSnapshotRequest. - * @implements IDeleteSnapshotRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set - */ - function DeleteSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSnapshotRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @instance - */ - DeleteSnapshotRequest.prototype.name = ""; - - /** - * Creates a new DeleteSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest instance - */ - DeleteSnapshotRequest.create = function create(properties) { - return new DeleteSnapshotRequest(properties); - }; - - /** - * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSnapshotRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSnapshotRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - */ - DeleteSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteSnapshotRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteSnapshotRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.DeleteSnapshotRequest} message DeleteSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteSnapshotRequest"; - }; - - return DeleteSnapshotRequest; - })(); - - v1.UpdateSnapshotRequest = (function() { - - /** - * Properties of an UpdateSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateSnapshotRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSnapshotRequest updateMask - * @property {google.cloud.netapp.v1.ISnapshot|null} [snapshot] UpdateSnapshotRequest snapshot - */ - - /** - * Constructs a new UpdateSnapshotRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateSnapshotRequest. - * @implements IUpdateSnapshotRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set - */ - function UpdateSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateSnapshotRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @instance - */ - UpdateSnapshotRequest.prototype.updateMask = null; - - /** - * UpdateSnapshotRequest snapshot. - * @member {google.cloud.netapp.v1.ISnapshot|null|undefined} snapshot - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @instance - */ - UpdateSnapshotRequest.prototype.snapshot = null; - - /** - * Creates a new UpdateSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest instance - */ - UpdateSnapshotRequest.create = function create(properties) { - return new UpdateSnapshotRequest(properties); - }; - - /** - * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - $root.google.cloud.netapp.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSnapshotRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.snapshot = $root.google.cloud.netapp.v1.Snapshot.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateSnapshotRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.snapshot != null && message.hasOwnProperty("snapshot")) { - var error = $root.google.cloud.netapp.v1.Snapshot.verify(message.snapshot); - if (error) - return "snapshot." + error; - } - return null; - }; - - /** - * Creates an UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - */ - UpdateSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateSnapshotRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateSnapshotRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.snapshot != null) { - if (typeof object.snapshot !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateSnapshotRequest.snapshot: object expected"); - message.snapshot = $root.google.cloud.netapp.v1.Snapshot.fromObject(object.snapshot); - } - return message; - }; - - /** - * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {google.cloud.netapp.v1.UpdateSnapshotRequest} message UpdateSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.snapshot = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.snapshot != null && message.hasOwnProperty("snapshot")) - object.snapshot = $root.google.cloud.netapp.v1.Snapshot.toObject(message.snapshot, options); - return object; - }; - - /** - * Converts this UpdateSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateSnapshotRequest"; - }; - - return UpdateSnapshotRequest; - })(); - - v1.Snapshot = (function() { - - /** - * Properties of a Snapshot. - * @memberof google.cloud.netapp.v1 - * @interface ISnapshot - * @property {string|null} [name] Snapshot name - * @property {google.cloud.netapp.v1.Snapshot.State|null} [state] Snapshot state - * @property {string|null} [stateDetails] Snapshot stateDetails - * @property {string|null} [description] Snapshot description - * @property {number|null} [usedBytes] Snapshot usedBytes - * @property {google.protobuf.ITimestamp|null} [createTime] Snapshot createTime - * @property {Object.|null} [labels] Snapshot labels - */ - - /** - * Constructs a new Snapshot. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Snapshot. - * @implements ISnapshot - * @constructor - * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set - */ - function Snapshot(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Snapshot name. - * @member {string} name - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.name = ""; - - /** - * Snapshot state. - * @member {google.cloud.netapp.v1.Snapshot.State} state - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.state = 0; - - /** - * Snapshot stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.stateDetails = ""; - - /** - * Snapshot description. - * @member {string} description - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.description = ""; - - /** - * Snapshot usedBytes. - * @member {number} usedBytes - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.usedBytes = 0; - - /** - * Snapshot createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.createTime = null; - - /** - * Snapshot labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - */ - Snapshot.prototype.labels = $util.emptyObject; - - /** - * Creates a new Snapshot instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {google.cloud.netapp.v1.ISnapshot=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Snapshot} Snapshot instance - */ - Snapshot.create = function create(properties) { - return new Snapshot(properties); - }; - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.usedBytes != null && Object.hasOwnProperty.call(message, "usedBytes")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.usedBytes); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Snapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {google.cloud.netapp.v1.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Snapshot(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.stateDetails = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.usedBytes = reader.double(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Snapshot message. - * @function verify - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Snapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) - if (typeof message.usedBytes !== "number") - return "usedBytes: number expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Snapshot} Snapshot - */ - Snapshot.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Snapshot) - return object; - var message = new $root.google.cloud.netapp.v1.Snapshot(); - 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 "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "UPDATING": - case 4: - message.state = 4; - break; - case "DISABLED": - case 5: - message.state = 5; - break; - case "ERROR": - case 6: - message.state = 6; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.description != null) - message.description = String(object.description); - if (object.usedBytes != null) - message.usedBytes = Number(object.usedBytes); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Snapshot.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.Snapshot.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {google.cloud.netapp.v1.Snapshot} message Snapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Snapshot.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.stateDetails = ""; - object.description = ""; - object.usedBytes = 0; - object.createTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.Snapshot.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Snapshot.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.usedBytes != null && message.hasOwnProperty("usedBytes")) - object.usedBytes = options.json && !isFinite(message.usedBytes) ? String(message.usedBytes) : message.usedBytes; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - return object; - }; - - /** - * Converts this Snapshot to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.Snapshot - * @instance - * @returns {Object.} JSON object - */ - Snapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Snapshot - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Snapshot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.Snapshot"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.Snapshot.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} UPDATING=4 UPDATING value - * @property {number} DISABLED=5 DISABLED value - * @property {number} ERROR=6 ERROR value - */ - Snapshot.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "DISABLED"] = 5; - values[valuesById[6] = "ERROR"] = 6; - return values; - })(); - - return Snapshot; - })(); - - /** - * Mode enum. - * @name google.cloud.netapp.v1.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} ONTAP=2 ONTAP value - */ - v1.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "ONTAP"] = 2; - return values; - })(); - - v1.GetStoragePoolRequest = (function() { - - /** - * Properties of a GetStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @interface IGetStoragePoolRequest - * @property {string|null} [name] GetStoragePoolRequest name - */ - - /** - * Constructs a new GetStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetStoragePoolRequest. - * @implements IGetStoragePoolRequest - * @constructor - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set - */ - function GetStoragePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetStoragePoolRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @instance - */ - GetStoragePoolRequest.prototype.name = ""; - - /** - * Creates a new GetStoragePoolRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest instance - */ - GetStoragePoolRequest.create = function create(properties) { - return new GetStoragePoolRequest(properties); - }; - - /** - * Encodes the specified GetStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStoragePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetStoragePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IGetStoragePoolRequest} message GetStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetStoragePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStoragePoolRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetStoragePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetStoragePoolRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetStoragePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetStoragePoolRequest} GetStoragePoolRequest - */ - GetStoragePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetStoragePoolRequest) - return object; - var message = new $root.google.cloud.netapp.v1.GetStoragePoolRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetStoragePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.GetStoragePoolRequest} message GetStoragePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetStoragePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetStoragePoolRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @instance - * @returns {Object.} JSON object - */ - GetStoragePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetStoragePoolRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetStoragePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetStoragePoolRequest"; - }; - - return GetStoragePoolRequest; - })(); - - v1.ListStoragePoolsRequest = (function() { - - /** - * Properties of a ListStoragePoolsRequest. - * @memberof google.cloud.netapp.v1 - * @interface IListStoragePoolsRequest - * @property {string|null} [parent] ListStoragePoolsRequest parent - * @property {number|null} [pageSize] ListStoragePoolsRequest pageSize - * @property {string|null} [pageToken] ListStoragePoolsRequest pageToken - * @property {string|null} [orderBy] ListStoragePoolsRequest orderBy - * @property {string|null} [filter] ListStoragePoolsRequest filter - */ - - /** - * Constructs a new ListStoragePoolsRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListStoragePoolsRequest. - * @implements IListStoragePoolsRequest - * @constructor - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set - */ - function ListStoragePoolsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListStoragePoolsRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - */ - ListStoragePoolsRequest.prototype.parent = ""; - - /** - * ListStoragePoolsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - */ - ListStoragePoolsRequest.prototype.pageSize = 0; - - /** - * ListStoragePoolsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - */ - ListStoragePoolsRequest.prototype.pageToken = ""; - - /** - * ListStoragePoolsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - */ - ListStoragePoolsRequest.prototype.orderBy = ""; - - /** - * ListStoragePoolsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - */ - ListStoragePoolsRequest.prototype.filter = ""; - - /** - * Creates a new ListStoragePoolsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest instance - */ - ListStoragePoolsRequest.create = function create(properties) { - return new ListStoragePoolsRequest(properties); - }; - - /** - * Encodes the specified ListStoragePoolsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStoragePoolsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListStoragePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsRequest} message ListStoragePoolsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStoragePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStoragePoolsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStoragePoolsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStoragePoolsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStoragePoolsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStoragePoolsRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStoragePoolsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListStoragePoolsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListStoragePoolsRequest} ListStoragePoolsRequest - */ - ListStoragePoolsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ListStoragePoolsRequest(); - 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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListStoragePoolsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {google.cloud.netapp.v1.ListStoragePoolsRequest} message ListStoragePoolsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStoragePoolsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListStoragePoolsRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @instance - * @returns {Object.} JSON object - */ - ListStoragePoolsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStoragePoolsRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListStoragePoolsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStoragePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsRequest"; - }; - - return ListStoragePoolsRequest; - })(); - - v1.ListStoragePoolsResponse = (function() { - - /** - * Properties of a ListStoragePoolsResponse. - * @memberof google.cloud.netapp.v1 - * @interface IListStoragePoolsResponse - * @property {Array.|null} [storagePools] ListStoragePoolsResponse storagePools - * @property {string|null} [nextPageToken] ListStoragePoolsResponse nextPageToken - * @property {Array.|null} [unreachable] ListStoragePoolsResponse unreachable - */ - - /** - * Constructs a new ListStoragePoolsResponse. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListStoragePoolsResponse. - * @implements IListStoragePoolsResponse - * @constructor - * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set - */ - function ListStoragePoolsResponse(properties) { - this.storagePools = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListStoragePoolsResponse storagePools. - * @member {Array.} storagePools - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @instance - */ - ListStoragePoolsResponse.prototype.storagePools = $util.emptyArray; - - /** - * ListStoragePoolsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @instance - */ - ListStoragePoolsResponse.prototype.nextPageToken = ""; - - /** - * ListStoragePoolsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @instance - */ - ListStoragePoolsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListStoragePoolsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse instance - */ - ListStoragePoolsResponse.create = function create(properties) { - return new ListStoragePoolsResponse(properties); - }; - - /** - * Encodes the specified ListStoragePoolsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStoragePoolsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storagePools != null && message.storagePools.length) - for (var i = 0; i < message.storagePools.length; ++i) - $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified ListStoragePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListStoragePoolsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {google.cloud.netapp.v1.IListStoragePoolsResponse} message ListStoragePoolsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListStoragePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListStoragePoolsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStoragePoolsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.storagePools && message.storagePools.length)) - message.storagePools = []; - message.storagePools.push($root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListStoragePoolsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListStoragePoolsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListStoragePoolsResponse message. - * @function verify - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListStoragePoolsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.storagePools != null && message.hasOwnProperty("storagePools")) { - if (!Array.isArray(message.storagePools)) - return "storagePools: array expected"; - for (var i = 0; i < message.storagePools.length; ++i) { - var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePools[i]); - if (error) - return "storagePools." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a ListStoragePoolsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListStoragePoolsResponse} ListStoragePoolsResponse - */ - ListStoragePoolsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListStoragePoolsResponse) - return object; - var message = new $root.google.cloud.netapp.v1.ListStoragePoolsResponse(); - if (object.storagePools) { - if (!Array.isArray(object.storagePools)) - throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: array expected"); - message.storagePools = []; - for (var i = 0; i < object.storagePools.length; ++i) { - if (typeof object.storagePools[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.storagePools: object expected"); - message.storagePools[i] = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePools[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListStoragePoolsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a ListStoragePoolsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {google.cloud.netapp.v1.ListStoragePoolsResponse} message ListStoragePoolsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListStoragePoolsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.storagePools = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.storagePools && message.storagePools.length) { - object.storagePools = []; - for (var j = 0; j < message.storagePools.length; ++j) - object.storagePools[j] = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePools[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this ListStoragePoolsResponse to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @instance - * @returns {Object.} JSON object - */ - ListStoragePoolsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListStoragePoolsResponse - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListStoragePoolsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListStoragePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListStoragePoolsResponse"; - }; - - return ListStoragePoolsResponse; - })(); - - v1.CreateStoragePoolRequest = (function() { - - /** - * Properties of a CreateStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @interface ICreateStoragePoolRequest - * @property {string|null} [parent] CreateStoragePoolRequest parent - * @property {string|null} [storagePoolId] CreateStoragePoolRequest storagePoolId - * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] CreateStoragePoolRequest storagePool - */ - - /** - * Constructs a new CreateStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateStoragePoolRequest. - * @implements ICreateStoragePoolRequest - * @constructor - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set - */ - function CreateStoragePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateStoragePoolRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @instance - */ - CreateStoragePoolRequest.prototype.parent = ""; - - /** - * CreateStoragePoolRequest storagePoolId. - * @member {string} storagePoolId - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @instance - */ - CreateStoragePoolRequest.prototype.storagePoolId = ""; - - /** - * CreateStoragePoolRequest storagePool. - * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @instance - */ - CreateStoragePoolRequest.prototype.storagePool = null; - - /** - * Creates a new CreateStoragePoolRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest instance - */ - CreateStoragePoolRequest.create = function create(properties) { - return new CreateStoragePoolRequest(properties); - }; - - /** - * Encodes the specified CreateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStoragePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.storagePoolId != null && Object.hasOwnProperty.call(message, "storagePoolId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.storagePoolId); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateStoragePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.ICreateStoragePoolRequest} message CreateStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateStoragePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStoragePoolRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.storagePoolId = reader.string(); - break; - } - case 3: { - message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateStoragePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateStoragePoolRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateStoragePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.storagePoolId != null && message.hasOwnProperty("storagePoolId")) - if (!$util.isString(message.storagePoolId)) - return "storagePoolId: string expected"; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) { - var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); - if (error) - return "storagePool." + error; - } - return null; - }; - - /** - * Creates a CreateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateStoragePoolRequest} CreateStoragePoolRequest - */ - CreateStoragePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateStoragePoolRequest) - return object; - var message = new $root.google.cloud.netapp.v1.CreateStoragePoolRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.storagePoolId != null) - message.storagePoolId = String(object.storagePoolId); - if (object.storagePool != null) { - if (typeof object.storagePool !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateStoragePoolRequest.storagePool: object expected"); - message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); - } - return message; - }; - - /** - * Creates a plain object from a CreateStoragePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.CreateStoragePoolRequest} message CreateStoragePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateStoragePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.storagePoolId = ""; - object.storagePool = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.storagePoolId != null && message.hasOwnProperty("storagePoolId")) - object.storagePoolId = message.storagePoolId; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); - return object; - }; - - /** - * Converts this CreateStoragePoolRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @instance - * @returns {Object.} JSON object - */ - CreateStoragePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateStoragePoolRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateStoragePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateStoragePoolRequest"; - }; - - return CreateStoragePoolRequest; - })(); - - v1.UpdateStoragePoolRequest = (function() { - - /** - * Properties of an UpdateStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateStoragePoolRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoragePoolRequest updateMask - * @property {google.cloud.netapp.v1.IStoragePool|null} [storagePool] UpdateStoragePoolRequest storagePool - */ - - /** - * Constructs a new UpdateStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateStoragePoolRequest. - * @implements IUpdateStoragePoolRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set - */ - function UpdateStoragePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateStoragePoolRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @instance - */ - UpdateStoragePoolRequest.prototype.updateMask = null; - - /** - * UpdateStoragePoolRequest storagePool. - * @member {google.cloud.netapp.v1.IStoragePool|null|undefined} storagePool - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @instance - */ - UpdateStoragePoolRequest.prototype.storagePool = null; - - /** - * Creates a new UpdateStoragePoolRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest instance - */ - UpdateStoragePoolRequest.create = function create(properties) { - return new UpdateStoragePoolRequest(properties); - }; - - /** - * Encodes the specified UpdateStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStoragePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - $root.google.cloud.netapp.v1.StoragePool.encode(message.storagePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateStoragePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IUpdateStoragePoolRequest} message UpdateStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStoragePoolRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.storagePool = $root.google.cloud.netapp.v1.StoragePool.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateStoragePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateStoragePoolRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateStoragePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.storagePool != null && message.hasOwnProperty("storagePool")) { - var error = $root.google.cloud.netapp.v1.StoragePool.verify(message.storagePool); - if (error) - return "storagePool." + error; - } - return null; - }; - - /** - * Creates an UpdateStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateStoragePoolRequest} UpdateStoragePoolRequest - */ - UpdateStoragePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateStoragePoolRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateStoragePoolRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.storagePool != null) { - if (typeof object.storagePool !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateStoragePoolRequest.storagePool: object expected"); - message.storagePool = $root.google.cloud.netapp.v1.StoragePool.fromObject(object.storagePool); - } - return message; - }; - - /** - * Creates a plain object from an UpdateStoragePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.UpdateStoragePoolRequest} message UpdateStoragePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateStoragePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.storagePool = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = $root.google.cloud.netapp.v1.StoragePool.toObject(message.storagePool, options); - return object; - }; - - /** - * Converts this UpdateStoragePoolRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateStoragePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateStoragePoolRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateStoragePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateStoragePoolRequest"; - }; - - return UpdateStoragePoolRequest; - })(); - - v1.DeleteStoragePoolRequest = (function() { - - /** - * Properties of a DeleteStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @interface IDeleteStoragePoolRequest - * @property {string|null} [name] DeleteStoragePoolRequest name - */ - - /** - * Constructs a new DeleteStoragePoolRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteStoragePoolRequest. - * @implements IDeleteStoragePoolRequest - * @constructor - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set - */ - function DeleteStoragePoolRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteStoragePoolRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @instance - */ - DeleteStoragePoolRequest.prototype.name = ""; - - /** - * Creates a new DeleteStoragePoolRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest instance - */ - DeleteStoragePoolRequest.create = function create(properties) { - return new DeleteStoragePoolRequest(properties); - }; - - /** - * Encodes the specified DeleteStoragePoolRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStoragePoolRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteStoragePoolRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteStoragePoolRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteStoragePoolRequest} message DeleteStoragePoolRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteStoragePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStoragePoolRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteStoragePoolRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteStoragePoolRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteStoragePoolRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteStoragePoolRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteStoragePoolRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteStoragePoolRequest} DeleteStoragePoolRequest - */ - DeleteStoragePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteStoragePoolRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteStoragePoolRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteStoragePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {google.cloud.netapp.v1.DeleteStoragePoolRequest} message DeleteStoragePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteStoragePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteStoragePoolRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteStoragePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteStoragePoolRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteStoragePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteStoragePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteStoragePoolRequest"; - }; - - return DeleteStoragePoolRequest; - })(); - - v1.SwitchActiveReplicaZoneRequest = (function() { - - /** - * Properties of a SwitchActiveReplicaZoneRequest. - * @memberof google.cloud.netapp.v1 - * @interface ISwitchActiveReplicaZoneRequest - * @property {string|null} [name] SwitchActiveReplicaZoneRequest name - */ - - /** - * Constructs a new SwitchActiveReplicaZoneRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a SwitchActiveReplicaZoneRequest. - * @implements ISwitchActiveReplicaZoneRequest - * @constructor - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest=} [properties] Properties to set - */ - function SwitchActiveReplicaZoneRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SwitchActiveReplicaZoneRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @instance - */ - SwitchActiveReplicaZoneRequest.prototype.name = ""; - - /** - * Creates a new SwitchActiveReplicaZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest instance - */ - SwitchActiveReplicaZoneRequest.create = function create(properties) { - return new SwitchActiveReplicaZoneRequest(properties); - }; - - /** - * Encodes the specified SwitchActiveReplicaZoneRequest message. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SwitchActiveReplicaZoneRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified SwitchActiveReplicaZoneRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SwitchActiveReplicaZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SwitchActiveReplicaZoneRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SwitchActiveReplicaZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SwitchActiveReplicaZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SwitchActiveReplicaZoneRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SwitchActiveReplicaZoneRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SwitchActiveReplicaZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} SwitchActiveReplicaZoneRequest - */ - SwitchActiveReplicaZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest) - return object; - var message = new $root.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SwitchActiveReplicaZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest} message SwitchActiveReplicaZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SwitchActiveReplicaZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SwitchActiveReplicaZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @instance - * @returns {Object.} JSON object - */ - SwitchActiveReplicaZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SwitchActiveReplicaZoneRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SwitchActiveReplicaZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest"; - }; - - return SwitchActiveReplicaZoneRequest; - })(); - - v1.StoragePool = (function() { - - /** - * Properties of a StoragePool. - * @memberof google.cloud.netapp.v1 - * @interface IStoragePool - * @property {string|null} [name] StoragePool name - * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] StoragePool serviceLevel - * @property {number|Long|null} [capacityGib] StoragePool capacityGib - * @property {number|Long|null} [volumeCapacityGib] StoragePool volumeCapacityGib - * @property {number|null} [volumeCount] StoragePool volumeCount - * @property {google.cloud.netapp.v1.StoragePool.State|null} [state] StoragePool state - * @property {string|null} [stateDetails] StoragePool stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] StoragePool createTime - * @property {string|null} [description] StoragePool description - * @property {Object.|null} [labels] StoragePool labels - * @property {string|null} [network] StoragePool network - * @property {string|null} [activeDirectory] StoragePool activeDirectory - * @property {string|null} [kmsConfig] StoragePool kmsConfig - * @property {boolean|null} [ldapEnabled] StoragePool ldapEnabled - * @property {string|null} [psaRange] StoragePool psaRange - * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] StoragePool encryptionType - * @property {boolean|null} [globalAccessAllowed] StoragePool globalAccessAllowed - * @property {boolean|null} [allowAutoTiering] StoragePool allowAutoTiering - * @property {string|null} [replicaZone] StoragePool replicaZone - * @property {string|null} [zone] StoragePool zone - * @property {boolean|null} [satisfiesPzs] StoragePool satisfiesPzs - * @property {boolean|null} [satisfiesPzi] StoragePool satisfiesPzi - * @property {boolean|null} [customPerformanceEnabled] StoragePool customPerformanceEnabled - * @property {number|Long|null} [totalThroughputMibps] StoragePool totalThroughputMibps - * @property {number|Long|null} [totalIops] StoragePool totalIops - * @property {number|Long|null} [hotTierSizeGib] StoragePool hotTierSizeGib - * @property {boolean|null} [enableHotTierAutoResize] StoragePool enableHotTierAutoResize - * @property {google.cloud.netapp.v1.QosType|null} [qosType] StoragePool qosType - * @property {number|null} [availableThroughputMibps] StoragePool availableThroughputMibps - * @property {number|Long|null} [coldTierSizeUsedGib] StoragePool coldTierSizeUsedGib - * @property {number|Long|null} [hotTierSizeUsedGib] StoragePool hotTierSizeUsedGib - * @property {google.cloud.netapp.v1.StoragePoolType|null} [type] StoragePool type - * @property {google.cloud.netapp.v1.Mode|null} [mode] StoragePool mode - */ - - /** - * Constructs a new StoragePool. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a StoragePool. - * @implements IStoragePool - * @constructor - * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set - */ - function StoragePool(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StoragePool name. - * @member {string} name - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.name = ""; - - /** - * StoragePool serviceLevel. - * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.serviceLevel = 0; - - /** - * StoragePool capacityGib. - * @member {number|Long} capacityGib - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool volumeCapacityGib. - * @member {number|Long} volumeCapacityGib - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.volumeCapacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool volumeCount. - * @member {number} volumeCount - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.volumeCount = 0; - - /** - * StoragePool state. - * @member {google.cloud.netapp.v1.StoragePool.State} state - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.state = 0; - - /** - * StoragePool stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.stateDetails = ""; - - /** - * StoragePool createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.createTime = null; - - /** - * StoragePool description. - * @member {string} description - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.description = ""; - - /** - * StoragePool labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.labels = $util.emptyObject; - - /** - * StoragePool network. - * @member {string} network - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.network = ""; - - /** - * StoragePool activeDirectory. - * @member {string} activeDirectory - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.activeDirectory = ""; - - /** - * StoragePool kmsConfig. - * @member {string} kmsConfig - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.kmsConfig = ""; - - /** - * StoragePool ldapEnabled. - * @member {boolean} ldapEnabled - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.ldapEnabled = false; - - /** - * StoragePool psaRange. - * @member {string} psaRange - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.psaRange = ""; - - /** - * StoragePool encryptionType. - * @member {google.cloud.netapp.v1.EncryptionType} encryptionType - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.encryptionType = 0; - - /** - * StoragePool globalAccessAllowed. - * @member {boolean|null|undefined} globalAccessAllowed - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.globalAccessAllowed = null; - - /** - * StoragePool allowAutoTiering. - * @member {boolean} allowAutoTiering - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.allowAutoTiering = false; - - /** - * StoragePool replicaZone. - * @member {string} replicaZone - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.replicaZone = ""; - - /** - * StoragePool zone. - * @member {string} zone - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.zone = ""; - - /** - * StoragePool satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.satisfiesPzs = false; - - /** - * StoragePool satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.satisfiesPzi = false; - - /** - * StoragePool customPerformanceEnabled. - * @member {boolean} customPerformanceEnabled - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.customPerformanceEnabled = false; - - /** - * StoragePool totalThroughputMibps. - * @member {number|Long} totalThroughputMibps - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.totalThroughputMibps = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool totalIops. - * @member {number|Long} totalIops - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.totalIops = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool hotTierSizeGib. - * @member {number|Long} hotTierSizeGib - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.hotTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool enableHotTierAutoResize. - * @member {boolean|null|undefined} enableHotTierAutoResize - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.enableHotTierAutoResize = null; - - /** - * StoragePool qosType. - * @member {google.cloud.netapp.v1.QosType} qosType - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.qosType = 0; - - /** - * StoragePool availableThroughputMibps. - * @member {number} availableThroughputMibps - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.availableThroughputMibps = 0; - - /** - * StoragePool coldTierSizeUsedGib. - * @member {number|Long} coldTierSizeUsedGib - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.coldTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool hotTierSizeUsedGib. - * @member {number|Long} hotTierSizeUsedGib - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StoragePool type. - * @member {google.cloud.netapp.v1.StoragePoolType|null|undefined} type - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.type = null; - - /** - * StoragePool mode. - * @member {google.cloud.netapp.v1.Mode|null|undefined} mode - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - */ - StoragePool.prototype.mode = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(StoragePool.prototype, "_globalAccessAllowed", { - get: $util.oneOfGetter($oneOfFields = ["globalAccessAllowed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(StoragePool.prototype, "_enableHotTierAutoResize", { - get: $util.oneOfGetter($oneOfFields = ["enableHotTierAutoResize"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(StoragePool.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(StoragePool.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new StoragePool instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {google.cloud.netapp.v1.IStoragePool=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.StoragePool} StoragePool instance - */ - StoragePool.create = function create(properties) { - return new StoragePool(properties); - }; - - /** - * Encodes the specified StoragePool message. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StoragePool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.serviceLevel); - if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.capacityGib); - if (message.volumeCapacityGib != null && Object.hasOwnProperty.call(message, "volumeCapacityGib")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.volumeCapacityGib); - if (message.volumeCount != null && Object.hasOwnProperty.call(message, "volumeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.volumeCount); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.network); - if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.activeDirectory); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.kmsConfig); - if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.ldapEnabled); - if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.psaRange); - if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.encryptionType); - if (message.globalAccessAllowed != null && Object.hasOwnProperty.call(message, "globalAccessAllowed")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.globalAccessAllowed); - if (message.allowAutoTiering != null && Object.hasOwnProperty.call(message, "allowAutoTiering")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.allowAutoTiering); - if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.replicaZone); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.zone); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.satisfiesPzs); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.satisfiesPzi); - if (message.customPerformanceEnabled != null && Object.hasOwnProperty.call(message, "customPerformanceEnabled")) - writer.uint32(/* id 25, wireType 0 =*/200).bool(message.customPerformanceEnabled); - if (message.totalThroughputMibps != null && Object.hasOwnProperty.call(message, "totalThroughputMibps")) - writer.uint32(/* id 26, wireType 0 =*/208).int64(message.totalThroughputMibps); - if (message.totalIops != null && Object.hasOwnProperty.call(message, "totalIops")) - writer.uint32(/* id 27, wireType 0 =*/216).int64(message.totalIops); - if (message.hotTierSizeGib != null && Object.hasOwnProperty.call(message, "hotTierSizeGib")) - writer.uint32(/* id 28, wireType 0 =*/224).int64(message.hotTierSizeGib); - if (message.enableHotTierAutoResize != null && Object.hasOwnProperty.call(message, "enableHotTierAutoResize")) - writer.uint32(/* id 29, wireType 0 =*/232).bool(message.enableHotTierAutoResize); - if (message.qosType != null && Object.hasOwnProperty.call(message, "qosType")) - writer.uint32(/* id 30, wireType 0 =*/240).int32(message.qosType); - if (message.availableThroughputMibps != null && Object.hasOwnProperty.call(message, "availableThroughputMibps")) - writer.uint32(/* id 31, wireType 1 =*/249).double(message.availableThroughputMibps); - if (message.coldTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "coldTierSizeUsedGib")) - writer.uint32(/* id 33, wireType 0 =*/264).int64(message.coldTierSizeUsedGib); - if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) - writer.uint32(/* id 34, wireType 0 =*/272).int64(message.hotTierSizeUsedGib); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 35, wireType 0 =*/280).int32(message.type); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 36, wireType 0 =*/288).int32(message.mode); - return writer; - }; - - /** - * Encodes the specified StoragePool message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StoragePool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {google.cloud.netapp.v1.IStoragePool} message StoragePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StoragePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StoragePool message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.StoragePool} StoragePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StoragePool.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StoragePool(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.serviceLevel = reader.int32(); - break; - } - case 3: { - message.capacityGib = reader.int64(); - break; - } - case 4: { - message.volumeCapacityGib = reader.int64(); - break; - } - case 5: { - message.volumeCount = reader.int32(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.stateDetails = reader.string(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.description = reader.string(); - break; - } - case 10: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 11: { - message.network = reader.string(); - break; - } - case 12: { - message.activeDirectory = reader.string(); - break; - } - case 13: { - message.kmsConfig = reader.string(); - break; - } - case 14: { - message.ldapEnabled = reader.bool(); - break; - } - case 15: { - message.psaRange = reader.string(); - break; - } - case 16: { - message.encryptionType = reader.int32(); - break; - } - case 17: { - message.globalAccessAllowed = reader.bool(); - break; - } - case 18: { - message.allowAutoTiering = reader.bool(); - break; - } - case 20: { - message.replicaZone = reader.string(); - break; - } - case 21: { - message.zone = reader.string(); - break; - } - case 23: { - message.satisfiesPzs = reader.bool(); - break; - } - case 24: { - message.satisfiesPzi = reader.bool(); - break; - } - case 25: { - message.customPerformanceEnabled = reader.bool(); - break; - } - case 26: { - message.totalThroughputMibps = reader.int64(); - break; - } - case 27: { - message.totalIops = reader.int64(); - break; - } - case 28: { - message.hotTierSizeGib = reader.int64(); - break; - } - case 29: { - message.enableHotTierAutoResize = reader.bool(); - break; - } - case 30: { - message.qosType = reader.int32(); - break; - } - case 31: { - message.availableThroughputMibps = reader.double(); - break; - } - case 33: { - message.coldTierSizeUsedGib = reader.int64(); - break; - } - case 34: { - message.hotTierSizeUsedGib = reader.int64(); - break; - } - case 35: { - message.type = reader.int32(); - break; - } - case 36: { - message.mode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StoragePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.StoragePool} StoragePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StoragePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StoragePool message. - * @function verify - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StoragePool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - switch (message.serviceLevel) { - default: - return "serviceLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) - if (!$util.isInteger(message.capacityGib) && !(message.capacityGib && $util.isInteger(message.capacityGib.low) && $util.isInteger(message.capacityGib.high))) - return "capacityGib: integer|Long expected"; - if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) - if (!$util.isInteger(message.volumeCapacityGib) && !(message.volumeCapacityGib && $util.isInteger(message.volumeCapacityGib.low) && $util.isInteger(message.volumeCapacityGib.high))) - return "volumeCapacityGib: integer|Long expected"; - if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) - if (!$util.isInteger(message.volumeCount)) - return "volumeCount: integer expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - if (!$util.isString(message.activeDirectory)) - return "activeDirectory: string expected"; - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - if (!$util.isString(message.kmsConfig)) - return "kmsConfig: string expected"; - if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) - if (typeof message.ldapEnabled !== "boolean") - return "ldapEnabled: boolean expected"; - if (message.psaRange != null && message.hasOwnProperty("psaRange")) - if (!$util.isString(message.psaRange)) - return "psaRange: string expected"; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - switch (message.encryptionType) { - default: - return "encryptionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { - properties._globalAccessAllowed = 1; - if (typeof message.globalAccessAllowed !== "boolean") - return "globalAccessAllowed: boolean expected"; - } - if (message.allowAutoTiering != null && message.hasOwnProperty("allowAutoTiering")) - if (typeof message.allowAutoTiering !== "boolean") - return "allowAutoTiering: boolean expected"; - if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) - if (!$util.isString(message.replicaZone)) - return "replicaZone: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - if (message.customPerformanceEnabled != null && message.hasOwnProperty("customPerformanceEnabled")) - if (typeof message.customPerformanceEnabled !== "boolean") - return "customPerformanceEnabled: boolean expected"; - if (message.totalThroughputMibps != null && message.hasOwnProperty("totalThroughputMibps")) - if (!$util.isInteger(message.totalThroughputMibps) && !(message.totalThroughputMibps && $util.isInteger(message.totalThroughputMibps.low) && $util.isInteger(message.totalThroughputMibps.high))) - return "totalThroughputMibps: integer|Long expected"; - if (message.totalIops != null && message.hasOwnProperty("totalIops")) - if (!$util.isInteger(message.totalIops) && !(message.totalIops && $util.isInteger(message.totalIops.low) && $util.isInteger(message.totalIops.high))) - return "totalIops: integer|Long expected"; - if (message.hotTierSizeGib != null && message.hasOwnProperty("hotTierSizeGib")) - if (!$util.isInteger(message.hotTierSizeGib) && !(message.hotTierSizeGib && $util.isInteger(message.hotTierSizeGib.low) && $util.isInteger(message.hotTierSizeGib.high))) - return "hotTierSizeGib: integer|Long expected"; - if (message.enableHotTierAutoResize != null && message.hasOwnProperty("enableHotTierAutoResize")) { - properties._enableHotTierAutoResize = 1; - if (typeof message.enableHotTierAutoResize !== "boolean") - return "enableHotTierAutoResize: boolean expected"; - } - if (message.qosType != null && message.hasOwnProperty("qosType")) - switch (message.qosType) { - default: - return "qosType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.availableThroughputMibps != null && message.hasOwnProperty("availableThroughputMibps")) - if (typeof message.availableThroughputMibps !== "number") - return "availableThroughputMibps: number expected"; - if (message.coldTierSizeUsedGib != null && message.hasOwnProperty("coldTierSizeUsedGib")) - if (!$util.isInteger(message.coldTierSizeUsedGib) && !(message.coldTierSizeUsedGib && $util.isInteger(message.coldTierSizeUsedGib.low) && $util.isInteger(message.coldTierSizeUsedGib.high))) - return "coldTierSizeUsedGib: integer|Long expected"; - if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) - if (!$util.isInteger(message.hotTierSizeUsedGib) && !(message.hotTierSizeUsedGib && $util.isInteger(message.hotTierSizeUsedGib.low) && $util.isInteger(message.hotTierSizeUsedGib.high))) - return "hotTierSizeUsedGib: integer|Long expected"; - 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.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a StoragePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.StoragePool} StoragePool - */ - StoragePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.StoragePool) - return object; - var message = new $root.google.cloud.netapp.v1.StoragePool(); - if (object.name != null) - message.name = String(object.name); - switch (object.serviceLevel) { - default: - if (typeof object.serviceLevel === "number") { - message.serviceLevel = object.serviceLevel; - break; - } - break; - case "SERVICE_LEVEL_UNSPECIFIED": - case 0: - message.serviceLevel = 0; - break; - case "PREMIUM": - case 1: - message.serviceLevel = 1; - break; - case "EXTREME": - case 2: - message.serviceLevel = 2; - break; - case "STANDARD": - case 3: - message.serviceLevel = 3; - break; - case "FLEX": - case 4: - message.serviceLevel = 4; - break; - } - if (object.capacityGib != null) - if ($util.Long) - (message.capacityGib = $util.Long.fromValue(object.capacityGib)).unsigned = false; - else if (typeof object.capacityGib === "string") - message.capacityGib = parseInt(object.capacityGib, 10); - else if (typeof object.capacityGib === "number") - message.capacityGib = object.capacityGib; - else if (typeof object.capacityGib === "object") - message.capacityGib = new $util.LongBits(object.capacityGib.low >>> 0, object.capacityGib.high >>> 0).toNumber(); - if (object.volumeCapacityGib != null) - if ($util.Long) - (message.volumeCapacityGib = $util.Long.fromValue(object.volumeCapacityGib)).unsigned = false; - else if (typeof object.volumeCapacityGib === "string") - message.volumeCapacityGib = parseInt(object.volumeCapacityGib, 10); - else if (typeof object.volumeCapacityGib === "number") - message.volumeCapacityGib = object.volumeCapacityGib; - else if (typeof object.volumeCapacityGib === "object") - message.volumeCapacityGib = new $util.LongBits(object.volumeCapacityGib.low >>> 0, object.volumeCapacityGib.high >>> 0).toNumber(); - if (object.volumeCount != null) - message.volumeCount = object.volumeCount | 0; - 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 "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "UPDATING": - case 4: - message.state = 4; - break; - case "RESTORING": - case 5: - message.state = 5; - break; - case "DISABLED": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.StoragePool.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.StoragePool.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.network != null) - message.network = String(object.network); - if (object.activeDirectory != null) - message.activeDirectory = String(object.activeDirectory); - if (object.kmsConfig != null) - message.kmsConfig = String(object.kmsConfig); - if (object.ldapEnabled != null) - message.ldapEnabled = Boolean(object.ldapEnabled); - if (object.psaRange != null) - message.psaRange = String(object.psaRange); - switch (object.encryptionType) { - default: - if (typeof object.encryptionType === "number") { - message.encryptionType = object.encryptionType; - break; - } - break; - case "ENCRYPTION_TYPE_UNSPECIFIED": - case 0: - message.encryptionType = 0; - break; - case "SERVICE_MANAGED": - case 1: - message.encryptionType = 1; - break; - case "CLOUD_KMS": - case 2: - message.encryptionType = 2; - break; - } - if (object.globalAccessAllowed != null) - message.globalAccessAllowed = Boolean(object.globalAccessAllowed); - if (object.allowAutoTiering != null) - message.allowAutoTiering = Boolean(object.allowAutoTiering); - if (object.replicaZone != null) - message.replicaZone = String(object.replicaZone); - if (object.zone != null) - message.zone = String(object.zone); - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.customPerformanceEnabled != null) - message.customPerformanceEnabled = Boolean(object.customPerformanceEnabled); - if (object.totalThroughputMibps != null) - if ($util.Long) - (message.totalThroughputMibps = $util.Long.fromValue(object.totalThroughputMibps)).unsigned = false; - else if (typeof object.totalThroughputMibps === "string") - message.totalThroughputMibps = parseInt(object.totalThroughputMibps, 10); - else if (typeof object.totalThroughputMibps === "number") - message.totalThroughputMibps = object.totalThroughputMibps; - else if (typeof object.totalThroughputMibps === "object") - message.totalThroughputMibps = new $util.LongBits(object.totalThroughputMibps.low >>> 0, object.totalThroughputMibps.high >>> 0).toNumber(); - if (object.totalIops != null) - if ($util.Long) - (message.totalIops = $util.Long.fromValue(object.totalIops)).unsigned = false; - else if (typeof object.totalIops === "string") - message.totalIops = parseInt(object.totalIops, 10); - else if (typeof object.totalIops === "number") - message.totalIops = object.totalIops; - else if (typeof object.totalIops === "object") - message.totalIops = new $util.LongBits(object.totalIops.low >>> 0, object.totalIops.high >>> 0).toNumber(); - if (object.hotTierSizeGib != null) - if ($util.Long) - (message.hotTierSizeGib = $util.Long.fromValue(object.hotTierSizeGib)).unsigned = false; - else if (typeof object.hotTierSizeGib === "string") - message.hotTierSizeGib = parseInt(object.hotTierSizeGib, 10); - else if (typeof object.hotTierSizeGib === "number") - message.hotTierSizeGib = object.hotTierSizeGib; - else if (typeof object.hotTierSizeGib === "object") - message.hotTierSizeGib = new $util.LongBits(object.hotTierSizeGib.low >>> 0, object.hotTierSizeGib.high >>> 0).toNumber(); - if (object.enableHotTierAutoResize != null) - message.enableHotTierAutoResize = Boolean(object.enableHotTierAutoResize); - switch (object.qosType) { - default: - if (typeof object.qosType === "number") { - message.qosType = object.qosType; - break; - } - break; - case "QOS_TYPE_UNSPECIFIED": - case 0: - message.qosType = 0; - break; - case "AUTO": - case 1: - message.qosType = 1; - break; - case "MANUAL": - case 2: - message.qosType = 2; - break; - } - if (object.availableThroughputMibps != null) - message.availableThroughputMibps = Number(object.availableThroughputMibps); - if (object.coldTierSizeUsedGib != null) - if ($util.Long) - (message.coldTierSizeUsedGib = $util.Long.fromValue(object.coldTierSizeUsedGib)).unsigned = false; - else if (typeof object.coldTierSizeUsedGib === "string") - message.coldTierSizeUsedGib = parseInt(object.coldTierSizeUsedGib, 10); - else if (typeof object.coldTierSizeUsedGib === "number") - message.coldTierSizeUsedGib = object.coldTierSizeUsedGib; - else if (typeof object.coldTierSizeUsedGib === "object") - message.coldTierSizeUsedGib = new $util.LongBits(object.coldTierSizeUsedGib.low >>> 0, object.coldTierSizeUsedGib.high >>> 0).toNumber(); - if (object.hotTierSizeUsedGib != null) - if ($util.Long) - (message.hotTierSizeUsedGib = $util.Long.fromValue(object.hotTierSizeUsedGib)).unsigned = false; - else if (typeof object.hotTierSizeUsedGib === "string") - message.hotTierSizeUsedGib = parseInt(object.hotTierSizeUsedGib, 10); - else if (typeof object.hotTierSizeUsedGib === "number") - message.hotTierSizeUsedGib = object.hotTierSizeUsedGib; - else if (typeof object.hotTierSizeUsedGib === "object") - message.hotTierSizeUsedGib = new $util.LongBits(object.hotTierSizeUsedGib.low >>> 0, object.hotTierSizeUsedGib.high >>> 0).toNumber(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "STORAGE_POOL_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "FILE": - case 1: - message.type = 1; - break; - case "UNIFIED": - case 2: - message.type = 2; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DEFAULT": - case 1: - message.mode = 1; - break; - case "ONTAP": - case 2: - message.mode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a StoragePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {google.cloud.netapp.v1.StoragePool} message StoragePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StoragePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.capacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.capacityGib = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.volumeCapacityGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.volumeCapacityGib = options.longs === String ? "0" : 0; - object.volumeCount = 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateDetails = ""; - object.createTime = null; - object.description = ""; - object.network = ""; - object.activeDirectory = ""; - object.kmsConfig = ""; - object.ldapEnabled = false; - object.psaRange = ""; - object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; - object.allowAutoTiering = false; - object.replicaZone = ""; - object.zone = ""; - object.satisfiesPzs = false; - object.satisfiesPzi = false; - object.customPerformanceEnabled = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalThroughputMibps = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalThroughputMibps = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalIops = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalIops = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hotTierSizeGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hotTierSizeGib = options.longs === String ? "0" : 0; - object.qosType = options.enums === String ? "QOS_TYPE_UNSPECIFIED" : 0; - object.availableThroughputMibps = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.coldTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.coldTierSizeUsedGib = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hotTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hotTierSizeUsedGib = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - object.serviceLevel = options.enums === String ? $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.cloud.netapp.v1.ServiceLevel[message.serviceLevel] : message.serviceLevel; - if (message.capacityGib != null && message.hasOwnProperty("capacityGib")) - if (typeof message.capacityGib === "number") - object.capacityGib = options.longs === String ? String(message.capacityGib) : message.capacityGib; - else - object.capacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.capacityGib) : options.longs === Number ? new $util.LongBits(message.capacityGib.low >>> 0, message.capacityGib.high >>> 0).toNumber() : message.capacityGib; - if (message.volumeCapacityGib != null && message.hasOwnProperty("volumeCapacityGib")) - if (typeof message.volumeCapacityGib === "number") - object.volumeCapacityGib = options.longs === String ? String(message.volumeCapacityGib) : message.volumeCapacityGib; - else - object.volumeCapacityGib = options.longs === String ? $util.Long.prototype.toString.call(message.volumeCapacityGib) : options.longs === Number ? new $util.LongBits(message.volumeCapacityGib.low >>> 0, message.volumeCapacityGib.high >>> 0).toNumber() : message.volumeCapacityGib; - if (message.volumeCount != null && message.hasOwnProperty("volumeCount")) - object.volumeCount = message.volumeCount; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.StoragePool.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.StoragePool.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.activeDirectory != null && message.hasOwnProperty("activeDirectory")) - object.activeDirectory = message.activeDirectory; - if (message.kmsConfig != null && message.hasOwnProperty("kmsConfig")) - object.kmsConfig = message.kmsConfig; - if (message.ldapEnabled != null && message.hasOwnProperty("ldapEnabled")) - object.ldapEnabled = message.ldapEnabled; - if (message.psaRange != null && message.hasOwnProperty("psaRange")) - object.psaRange = message.psaRange; - if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) - object.encryptionType = options.enums === String ? $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.cloud.netapp.v1.EncryptionType[message.encryptionType] : message.encryptionType; - if (message.globalAccessAllowed != null && message.hasOwnProperty("globalAccessAllowed")) { - object.globalAccessAllowed = message.globalAccessAllowed; - if (options.oneofs) - object._globalAccessAllowed = "globalAccessAllowed"; - } - if (message.allowAutoTiering != null && message.hasOwnProperty("allowAutoTiering")) - object.allowAutoTiering = message.allowAutoTiering; - if (message.replicaZone != null && message.hasOwnProperty("replicaZone")) - object.replicaZone = message.replicaZone; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - if (message.customPerformanceEnabled != null && message.hasOwnProperty("customPerformanceEnabled")) - object.customPerformanceEnabled = message.customPerformanceEnabled; - if (message.totalThroughputMibps != null && message.hasOwnProperty("totalThroughputMibps")) - if (typeof message.totalThroughputMibps === "number") - object.totalThroughputMibps = options.longs === String ? String(message.totalThroughputMibps) : message.totalThroughputMibps; - else - object.totalThroughputMibps = options.longs === String ? $util.Long.prototype.toString.call(message.totalThroughputMibps) : options.longs === Number ? new $util.LongBits(message.totalThroughputMibps.low >>> 0, message.totalThroughputMibps.high >>> 0).toNumber() : message.totalThroughputMibps; - if (message.totalIops != null && message.hasOwnProperty("totalIops")) - if (typeof message.totalIops === "number") - object.totalIops = options.longs === String ? String(message.totalIops) : message.totalIops; - else - object.totalIops = options.longs === String ? $util.Long.prototype.toString.call(message.totalIops) : options.longs === Number ? new $util.LongBits(message.totalIops.low >>> 0, message.totalIops.high >>> 0).toNumber() : message.totalIops; - if (message.hotTierSizeGib != null && message.hasOwnProperty("hotTierSizeGib")) - if (typeof message.hotTierSizeGib === "number") - object.hotTierSizeGib = options.longs === String ? String(message.hotTierSizeGib) : message.hotTierSizeGib; - else - object.hotTierSizeGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeGib.low >>> 0, message.hotTierSizeGib.high >>> 0).toNumber() : message.hotTierSizeGib; - if (message.enableHotTierAutoResize != null && message.hasOwnProperty("enableHotTierAutoResize")) { - object.enableHotTierAutoResize = message.enableHotTierAutoResize; - if (options.oneofs) - object._enableHotTierAutoResize = "enableHotTierAutoResize"; - } - if (message.qosType != null && message.hasOwnProperty("qosType")) - object.qosType = options.enums === String ? $root.google.cloud.netapp.v1.QosType[message.qosType] === undefined ? message.qosType : $root.google.cloud.netapp.v1.QosType[message.qosType] : message.qosType; - if (message.availableThroughputMibps != null && message.hasOwnProperty("availableThroughputMibps")) - object.availableThroughputMibps = options.json && !isFinite(message.availableThroughputMibps) ? String(message.availableThroughputMibps) : message.availableThroughputMibps; - if (message.coldTierSizeUsedGib != null && message.hasOwnProperty("coldTierSizeUsedGib")) - if (typeof message.coldTierSizeUsedGib === "number") - object.coldTierSizeUsedGib = options.longs === String ? String(message.coldTierSizeUsedGib) : message.coldTierSizeUsedGib; - else - object.coldTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.coldTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.coldTierSizeUsedGib.low >>> 0, message.coldTierSizeUsedGib.high >>> 0).toNumber() : message.coldTierSizeUsedGib; - if (message.hotTierSizeUsedGib != null && message.hasOwnProperty("hotTierSizeUsedGib")) - if (typeof message.hotTierSizeUsedGib === "number") - object.hotTierSizeUsedGib = options.longs === String ? String(message.hotTierSizeUsedGib) : message.hotTierSizeUsedGib; - else - object.hotTierSizeUsedGib = options.longs === String ? $util.Long.prototype.toString.call(message.hotTierSizeUsedGib) : options.longs === Number ? new $util.LongBits(message.hotTierSizeUsedGib.low >>> 0, message.hotTierSizeUsedGib.high >>> 0).toNumber() : message.hotTierSizeUsedGib; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.netapp.v1.StoragePoolType[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.StoragePoolType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.cloud.netapp.v1.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.netapp.v1.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - return object; - }; - - /** - * Converts this StoragePool to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.StoragePool - * @instance - * @returns {Object.} JSON object - */ - StoragePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StoragePool - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.StoragePool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StoragePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.StoragePool"; - }; - - /** - * State enum. - * @name google.cloud.netapp.v1.StoragePool.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - * @property {number} DELETING=3 DELETING value - * @property {number} UPDATING=4 UPDATING value - * @property {number} RESTORING=5 RESTORING value - * @property {number} DISABLED=6 DISABLED value - * @property {number} ERROR=7 ERROR value - */ - StoragePool.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "RESTORING"] = 5; - values[valuesById[6] = "DISABLED"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); - - return StoragePool; - })(); - - v1.ValidateDirectoryServiceRequest = (function() { - - /** - * Properties of a ValidateDirectoryServiceRequest. - * @memberof google.cloud.netapp.v1 - * @interface IValidateDirectoryServiceRequest - * @property {string|null} [name] ValidateDirectoryServiceRequest name - * @property {google.cloud.netapp.v1.DirectoryServiceType|null} [directoryServiceType] ValidateDirectoryServiceRequest directoryServiceType - */ - - /** - * Constructs a new ValidateDirectoryServiceRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ValidateDirectoryServiceRequest. - * @implements IValidateDirectoryServiceRequest - * @constructor - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest=} [properties] Properties to set - */ - function ValidateDirectoryServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidateDirectoryServiceRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @instance - */ - ValidateDirectoryServiceRequest.prototype.name = ""; - - /** - * ValidateDirectoryServiceRequest directoryServiceType. - * @member {google.cloud.netapp.v1.DirectoryServiceType} directoryServiceType - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @instance - */ - ValidateDirectoryServiceRequest.prototype.directoryServiceType = 0; - - /** - * Creates a new ValidateDirectoryServiceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest instance - */ - ValidateDirectoryServiceRequest.create = function create(properties) { - return new ValidateDirectoryServiceRequest(properties); - }; - - /** - * Encodes the specified ValidateDirectoryServiceRequest message. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateDirectoryServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.directoryServiceType != null && Object.hasOwnProperty.call(message, "directoryServiceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.directoryServiceType); - return writer; - }; - - /** - * Encodes the specified ValidateDirectoryServiceRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ValidateDirectoryServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {google.cloud.netapp.v1.IValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateDirectoryServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateDirectoryServiceRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.directoryServiceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateDirectoryServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateDirectoryServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateDirectoryServiceRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateDirectoryServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.directoryServiceType != null && message.hasOwnProperty("directoryServiceType")) - switch (message.directoryServiceType) { - default: - return "directoryServiceType: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a ValidateDirectoryServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} ValidateDirectoryServiceRequest - */ - ValidateDirectoryServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest) - return object; - var message = new $root.google.cloud.netapp.v1.ValidateDirectoryServiceRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.directoryServiceType) { - default: - if (typeof object.directoryServiceType === "number") { - message.directoryServiceType = object.directoryServiceType; - break; - } - break; - case "DIRECTORY_SERVICE_TYPE_UNSPECIFIED": - case 0: - message.directoryServiceType = 0; - break; - case "ACTIVE_DIRECTORY": - case 1: - message.directoryServiceType = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a ValidateDirectoryServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {google.cloud.netapp.v1.ValidateDirectoryServiceRequest} message ValidateDirectoryServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateDirectoryServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.directoryServiceType = options.enums === String ? "DIRECTORY_SERVICE_TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.directoryServiceType != null && message.hasOwnProperty("directoryServiceType")) - object.directoryServiceType = options.enums === String ? $root.google.cloud.netapp.v1.DirectoryServiceType[message.directoryServiceType] === undefined ? message.directoryServiceType : $root.google.cloud.netapp.v1.DirectoryServiceType[message.directoryServiceType] : message.directoryServiceType; - return object; - }; - - /** - * Converts this ValidateDirectoryServiceRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @instance - * @returns {Object.} JSON object - */ - ValidateDirectoryServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateDirectoryServiceRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ValidateDirectoryServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateDirectoryServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.ValidateDirectoryServiceRequest"; - }; - - return ValidateDirectoryServiceRequest; - })(); - - return v1; - })(); - - return netapp; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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 < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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 < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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 < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - 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 < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - 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); - } - 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); - } - 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); - } - 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); - } - 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); - } - 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); - } - 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); - } - 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); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - 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())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - 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 < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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 < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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 < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - 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 < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.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; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.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; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.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); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - 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 < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - 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); - } - 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 < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.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; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - 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 < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - 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); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - 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); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - 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); - } - 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); - } - 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); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - 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; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - 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; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - api.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - 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; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - 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 < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["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 < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["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 < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - 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 < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - 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_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - 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; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - 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; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - 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 < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - 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; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - 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() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - 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 < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - 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; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - 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() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - 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); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - 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; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - 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() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - 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 < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - 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; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - 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() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - 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 < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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); - 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; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - 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); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - 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); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - 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); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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 < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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 < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - 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 < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - object[".google.api.fieldInfo"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - 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; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - 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_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - 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; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - 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); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - 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); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - 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); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - 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())); - 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); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - 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); - } - 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 < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - 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); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - 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); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - 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 < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 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; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 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; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - 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; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - 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; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - 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() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - 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; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - } - 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; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - 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; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - 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; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - 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; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - 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; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - 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; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - 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; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - 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 < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - 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_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - 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.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - 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() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - 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 < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - 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 < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - 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 < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - 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 < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - 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 < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - 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; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - 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; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Struct - * @function getTypeUrl - * @memberof google.protobuf.Struct - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Struct"; - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.protobuf.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Value"; - }; - - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListValue - * @function getTypeUrl - * @memberof google.protobuf.ListValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ListValue"; - }; - - return ListValue; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - 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; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - return protobuf; - })(); - - google.longrunning = (function() { - - /** - * Namespace longrunning. - * @memberof google - * @namespace - */ - var longrunning = {}; - - longrunning.Operations = (function() { - - /** - * Constructs a new Operations service. - * @memberof google.longrunning - * @classdesc Represents an Operations - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Operations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - - /** - * Creates new Operations service using the specified rpc implementation. - * @function create - * @memberof google.longrunning.Operations - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. - */ - Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.longrunning.Operations|listOperations}. - * @memberof google.longrunning.Operations - * @typedef ListOperationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse - */ - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); - }, "name", { value: "ListOperations" }); - - /** - * Calls ListOperations. - * @function listOperations - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|getOperation}. - * @memberof google.longrunning.Operations - * @typedef GetOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "GetOperation" }); - - /** - * Calls GetOperation. - * @function getOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|deleteOperation}. - * @memberof google.longrunning.Operations - * @typedef DeleteOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteOperation" }); - - /** - * Calls DeleteOperation. - * @function deleteOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|cancelOperation}. - * @memberof google.longrunning.Operations - * @typedef CancelOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelOperation" }); - - /** - * Calls CancelOperation. - * @function cancelOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.longrunning.Operations|waitOperation}. - * @memberof google.longrunning.Operations - * @typedef WaitOperationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "WaitOperation" }); - - /** - * Calls WaitOperation. - * @function waitOperation - * @memberof google.longrunning.Operations - * @instance - * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Operations; - })(); - - longrunning.Operation = (function() { - - /** - * Properties of an Operation. - * @memberof google.longrunning - * @interface IOperation - * @property {string|null} [name] Operation name - * @property {google.protobuf.IAny|null} [metadata] Operation metadata - * @property {boolean|null} [done] Operation done - * @property {google.rpc.IStatus|null} [error] Operation error - * @property {google.protobuf.IAny|null} [response] Operation response - */ - - /** - * Constructs a new Operation. - * @memberof google.longrunning - * @classdesc Represents an Operation. - * @implements IOperation - * @constructor - * @param {google.longrunning.IOperation=} [properties] Properties to set - */ - function Operation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Operation name. - * @member {string} name - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.name = ""; - - /** - * Operation metadata. - * @member {google.protobuf.IAny|null|undefined} metadata - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.metadata = null; - - /** - * Operation done. - * @member {boolean} done - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.done = false; - - /** - * Operation error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.error = null; - - /** - * Operation response. - * @member {google.protobuf.IAny|null|undefined} response - * @memberof google.longrunning.Operation - * @instance - */ - Operation.prototype.response = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Operation result. - * @member {"error"|"response"|undefined} result - * @memberof google.longrunning.Operation - * @instance - */ - Object.defineProperty(Operation.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["error", "response"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Operation instance using the specified properties. - * @function create - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation=} [properties] Properties to set - * @returns {google.longrunning.Operation} Operation instance - */ - Operation.create = function create(properties) { - return new Operation(properties); - }; - - /** - * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encode - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.IOperation} message Operation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Operation message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 3: { - message.done = reader.bool(); - break; - } - case 4: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Operation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.Operation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.Operation} Operation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Operation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Operation message. - * @function verify - * @memberof google.longrunning.Operation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Operation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Any.verify(message.metadata); - 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); - 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); - if (error) - return "response." + error; - } - } - return null; - }; - - /** - * Creates an Operation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.Operation - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.Operation} Operation - */ - Operation.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.Operation) - return object; - 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); - } - 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); - } - 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); - } - return message; - }; - - /** - * Creates a plain object from an Operation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.Operation - * @static - * @param {google.longrunning.Operation} message Operation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this Operation to JSON. - * @function toJSON - * @memberof google.longrunning.Operation - * @instance - * @returns {Object.} JSON object - */ - Operation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Operation - * @function getTypeUrl - * @memberof google.longrunning.Operation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.Operation"; - }; - - return Operation; - })(); - - longrunning.GetOperationRequest = (function() { - - /** - * Properties of a GetOperationRequest. - * @memberof google.longrunning - * @interface IGetOperationRequest - * @property {string|null} [name] GetOperationRequest name - */ - - /** - * Constructs a new GetOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a GetOperationRequest. - * @implements IGetOperationRequest - * @constructor - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - */ - function GetOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetOperationRequest name. - * @member {string} name - * @memberof google.longrunning.GetOperationRequest - * @instance - */ - GetOperationRequest.prototype.name = ""; - - /** - * Creates a new GetOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance - */ - GetOperationRequest.create = function create(properties) { - return new GetOperationRequest(properties); - }; - - /** - * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOperationRequest message. - * @function verify - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.GetOperationRequest} GetOperationRequest - */ - GetOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.GetOperationRequest) - return object; - var message = new $root.google.longrunning.GetOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {google.longrunning.GetOperationRequest} message GetOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this GetOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.GetOperationRequest - * @instance - * @returns {Object.} JSON object - */ - GetOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.GetOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; - }; - - return GetOperationRequest; - })(); - - longrunning.ListOperationsRequest = (function() { - - /** - * Properties of a ListOperationsRequest. - * @memberof google.longrunning - * @interface IListOperationsRequest - * @property {string|null} [name] ListOperationsRequest name - * @property {string|null} [filter] ListOperationsRequest filter - * @property {number|null} [pageSize] ListOperationsRequest pageSize - * @property {string|null} [pageToken] ListOperationsRequest pageToken - */ - - /** - * Constructs a new ListOperationsRequest. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsRequest. - * @implements IListOperationsRequest - * @constructor - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - */ - function ListOperationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsRequest name. - * @member {string} name - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.name = ""; - - /** - * ListOperationsRequest filter. - * @member {string} filter - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.filter = ""; - - /** - * ListOperationsRequest pageSize. - * @member {number} pageSize - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageSize = 0; - - /** - * ListOperationsRequest pageToken. - * @member {string} pageToken - * @memberof google.longrunning.ListOperationsRequest - * @instance - */ - ListOperationsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListOperationsRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance - */ - ListOperationsRequest.create = function create(properties) { - return new ListOperationsRequest(properties); - }; - - /** - * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); - return writer; - }; - - /** - * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsRequest message. - * @function verify - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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"; - return null; - }; - - /** - * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest - */ - ListOperationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsRequest) - return object; - 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); - return message; - }; - - /** - * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - object.name = ""; - } - 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; - return object; - }; - - /** - * Converts this ListOperationsRequest to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListOperationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsRequest - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; - }; - - return ListOperationsRequest; - })(); - - longrunning.ListOperationsResponse = (function() { - - /** - * Properties of a ListOperationsResponse. - * @memberof google.longrunning - * @interface IListOperationsResponse - * @property {Array.|null} [operations] ListOperationsResponse operations - * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken - */ - - /** - * Constructs a new ListOperationsResponse. - * @memberof google.longrunning - * @classdesc Represents a ListOperationsResponse. - * @implements IListOperationsResponse - * @constructor - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - */ - function ListOperationsResponse(properties) { - this.operations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOperationsResponse operations. - * @member {Array.} operations - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.operations = $util.emptyArray; - - /** - * ListOperationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.longrunning.ListOperationsResponse - * @instance - */ - ListOperationsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListOperationsResponse instance using the specified properties. - * @function create - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance - */ - ListOperationsResponse.create = function create(properties) { - return new ListOperationsResponse(properties); - }; - - /** - * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operations != null && message.operations.length) - for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListOperationsResponse message. - * @function verify - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListOperationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operations != null && message.hasOwnProperty("operations")) { - if (!Array.isArray(message.operations)) - return "operations: array expected"; - for (var i = 0; i < message.operations.length; ++i) { - var error = $root.google.longrunning.Operation.verify(message.operations[i]); - if (error) - return "operations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse - */ - ListOperationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.ListOperationsResponse) - return object; - 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 < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") - throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); - message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListOperationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.operations = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.operations && message.operations.length) { - object.operations = []; - for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListOperationsResponse to JSON. - * @function toJSON - * @memberof google.longrunning.ListOperationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListOperationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListOperationsResponse - * @function getTypeUrl - * @memberof google.longrunning.ListOperationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; - }; - - return ListOperationsResponse; - })(); - - longrunning.CancelOperationRequest = (function() { - - /** - * Properties of a CancelOperationRequest. - * @memberof google.longrunning - * @interface ICancelOperationRequest - * @property {string|null} [name] CancelOperationRequest name - */ - - /** - * Constructs a new CancelOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a CancelOperationRequest. - * @implements ICancelOperationRequest - * @constructor - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - */ - function CancelOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelOperationRequest name. - * @member {string} name - * @memberof google.longrunning.CancelOperationRequest - * @instance - */ - CancelOperationRequest.prototype.name = ""; - - /** - * Creates a new CancelOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance - */ - CancelOperationRequest.create = function create(properties) { - return new CancelOperationRequest(properties); - }; - - /** - * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelOperationRequest message. - * @function verify - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest - */ - CancelOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.CancelOperationRequest) - return object; - var message = new $root.google.longrunning.CancelOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this CancelOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.CancelOperationRequest - * @instance - * @returns {Object.} JSON object - */ - CancelOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CancelOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.CancelOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; - }; - - return CancelOperationRequest; - })(); - - longrunning.DeleteOperationRequest = (function() { - - /** - * Properties of a DeleteOperationRequest. - * @memberof google.longrunning - * @interface IDeleteOperationRequest - * @property {string|null} [name] DeleteOperationRequest name - */ - - /** - * Constructs a new DeleteOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a DeleteOperationRequest. - * @implements IDeleteOperationRequest - * @constructor - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - */ - function DeleteOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteOperationRequest name. - * @member {string} name - * @memberof google.longrunning.DeleteOperationRequest - * @instance - */ - DeleteOperationRequest.prototype.name = ""; - - /** - * Creates a new DeleteOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance - */ - DeleteOperationRequest.create = function create(properties) { - return new DeleteOperationRequest(properties); - }; - - /** - * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteOperationRequest message. - * @function verify - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest - */ - DeleteOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.DeleteOperationRequest) - return object; - var message = new $root.google.longrunning.DeleteOperationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this DeleteOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.DeleteOperationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.DeleteOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; - }; - - return DeleteOperationRequest; - })(); - - longrunning.WaitOperationRequest = (function() { - - /** - * Properties of a WaitOperationRequest. - * @memberof google.longrunning - * @interface IWaitOperationRequest - * @property {string|null} [name] WaitOperationRequest name - * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout - */ - - /** - * Constructs a new WaitOperationRequest. - * @memberof google.longrunning - * @classdesc Represents a WaitOperationRequest. - * @implements IWaitOperationRequest - * @constructor - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - */ - function WaitOperationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WaitOperationRequest name. - * @member {string} name - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.name = ""; - - /** - * WaitOperationRequest timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.longrunning.WaitOperationRequest - * @instance - */ - WaitOperationRequest.prototype.timeout = null; - - /** - * Creates a new WaitOperationRequest instance using the specified properties. - * @function create - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance - */ - WaitOperationRequest.create = function create(properties) { - return new WaitOperationRequest(properties); - }; - - /** - * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WaitOperationRequest message. - * @function verify - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WaitOperationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - return null; - }; - - /** - * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest - */ - WaitOperationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.WaitOperationRequest) - return object; - 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); - } - return message; - }; - - /** - * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this WaitOperationRequest to JSON. - * @function toJSON - * @memberof google.longrunning.WaitOperationRequest - * @instance - * @returns {Object.} JSON object - */ - WaitOperationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WaitOperationRequest - * @function getTypeUrl - * @memberof google.longrunning.WaitOperationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; - }; - - return WaitOperationRequest; - })(); - - longrunning.OperationInfo = (function() { - - /** - * Properties of an OperationInfo. - * @memberof google.longrunning - * @interface IOperationInfo - * @property {string|null} [responseType] OperationInfo responseType - * @property {string|null} [metadataType] OperationInfo metadataType - */ - - /** - * Constructs a new OperationInfo. - * @memberof google.longrunning - * @classdesc Represents an OperationInfo. - * @implements IOperationInfo - * @constructor - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - */ - function OperationInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationInfo responseType. - * @member {string} responseType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.responseType = ""; - - /** - * OperationInfo metadataType. - * @member {string} metadataType - * @memberof google.longrunning.OperationInfo - * @instance - */ - OperationInfo.prototype.metadataType = ""; - - /** - * Creates a new OperationInfo instance using the specified properties. - * @function create - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo=} [properties] Properties to set - * @returns {google.longrunning.OperationInfo} OperationInfo instance - */ - OperationInfo.create = function create(properties) { - return new OperationInfo(properties); - }; - - /** - * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encode - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); - return writer; - }; - - /** - * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer. - * @function decode - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.responseType = reader.string(); - break; - } - case 2: { - message.metadataType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OperationInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.longrunning.OperationInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.longrunning.OperationInfo} OperationInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OperationInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OperationInfo message. - * @function verify - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OperationInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {Object.} object Plain object - * @returns {google.longrunning.OperationInfo} OperationInfo - */ - OperationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.longrunning.OperationInfo) - return object; - 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; - }; - - /** - * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.longrunning.OperationInfo - * @static - * @param {google.longrunning.OperationInfo} message OperationInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this OperationInfo to JSON. - * @function toJSON - * @memberof google.longrunning.OperationInfo - * @instance - * @returns {Object.} JSON object - */ - OperationInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OperationInfo - * @function getTypeUrl - * @memberof google.longrunning.OperationInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.longrunning.OperationInfo"; - }; - - return OperationInfo; - })(); - - return longrunning; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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 < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - 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 < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-netapp/protos/protos.json b/owl-bot-staging/google-cloud-netapp/protos/protos.json deleted file mode 100644 index f5efdb48005..00000000000 --- a/owl-bot-staging/google-cloud-netapp/protos/protos.json +++ /dev/null @@ -1,8651 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "netapp": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.NetApp.V1", - "go_package": "cloud.google.com/go/netapp/apiv1/netapppb;netapppb", - "java_multiple_files": true, - "java_outer_classname": "StoragePoolProto", - "java_package": "com.google.cloud.netapp.v1", - "php_namespace": "Google\\Cloud\\NetApp\\V1", - "ruby_package": "Google::Cloud::NetApp::V1", - "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" - }, - "nested": { - "ListActiveDirectoriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListActiveDirectoriesResponse": { - "fields": { - "activeDirectories": { - "rule": "repeated", - "type": "ActiveDirectory", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetActiveDirectoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" - } - } - } - }, - "CreateActiveDirectoryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/ActiveDirectory" - } - }, - "activeDirectory": { - "type": "ActiveDirectory", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "activeDirectoryId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateActiveDirectoryRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "activeDirectory": { - "type": "ActiveDirectory", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteActiveDirectoryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" - } - } - } - }, - "ActiveDirectory": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/ActiveDirectory", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/activeDirectories/{active_directory}", - "(google.api.resource).plural": "activeDirectories", - "(google.api.resource).singular": "activeDirectory" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "domain": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "site": { - "type": "string", - "id": 5 - }, - "dns": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "netBiosPrefix": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "organizationalUnit": { - "type": "string", - "id": 8 - }, - "aesEncryption": { - "type": "bool", - "id": 9 - }, - "username": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "password": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupOperators": { - "rule": "repeated", - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "administrators": { - "rule": "repeated", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "securityOperators": { - "rule": "repeated", - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kdcHostname": { - "type": "string", - "id": 14 - }, - "kdcIp": { - "type": "string", - "id": 15 - }, - "nfsUsersWithLdap": { - "type": "bool", - "id": 16 - }, - "description": { - "type": "string", - "id": 17 - }, - "ldapSigning": { - "type": "bool", - "id": 18 - }, - "encryptDcConnections": { - "type": "bool", - "id": 19 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 20 - }, - "stateDetails": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "IN_USE": 4, - "DELETING": 5, - "ERROR": 6, - "DIAGNOSING": 7 - } - } - } - }, - "Backup": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}", - "(google.api.resource).plural": "backups", - "(google.api.resource).singular": "backup" - }, - "oneofs": { - "_sourceSnapshot": { - "oneof": [ - "sourceSnapshot" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "volumeUsageBytes": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupType": { - "type": "Type", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sourceVolume": { - "type": "string", - "id": 6, - "options": { - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "sourceSnapshot": { - "type": "string", - "id": 7, - "options": { - "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 9 - }, - "chainStorageBytes": { - "type": "int64", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzs": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "volumeRegion": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "backupRegion": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "enforcedRetentionEndTime": { - "type": "google.protobuf.Timestamp", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "UPLOADING": 2, - "READY": 3, - "DELETING": 4, - "ERROR": 5, - "UPDATING": 6 - } - }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "MANUAL": 1, - "SCHEDULED": 2 - } - } - } - }, - "ListBackupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Backup" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "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": "netapp.googleapis.com/Backup" - } - } - } - }, - "CreateBackupRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Backup" - } - }, - "backupId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backup": { - "type": "Backup", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" - } - } - } - }, - "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" - } - } - } - }, - "BackupPolicy": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/BackupPolicy", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPolicies/{backup_policy}", - "(google.api.resource).plural": "backupPolicies", - "(google.api.resource).singular": "backupPolicy" - }, - "oneofs": { - "_dailyBackupLimit": { - "oneof": [ - "dailyBackupLimit" - ] - }, - "_weeklyBackupLimit": { - "oneof": [ - "weeklyBackupLimit" - ] - }, - "_monthlyBackupLimit": { - "oneof": [ - "monthlyBackupLimit" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_enabled": { - "oneof": [ - "enabled" - ] - }, - "_assignedVolumeCount": { - "oneof": [ - "assignedVolumeCount" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "dailyBackupLimit": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "weeklyBackupLimit": { - "type": "int32", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "monthlyBackupLimit": { - "type": "int32", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "enabled": { - "type": "bool", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "assignedVolumeCount": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 9 - }, - "state": { - "type": "State", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "DELETING": 3, - "ERROR": 4, - "UPDATING": 5 - } - } - } - }, - "CreateBackupPolicyRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupPolicy" - } - }, - "backupPolicy": { - "type": "BackupPolicy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPolicyId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetBackupPolicyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" - } - } - } - }, - "ListBackupPoliciesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupPolicy" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListBackupPoliciesResponse": { - "fields": { - "backupPolicies": { - "rule": "repeated", - "type": "BackupPolicy", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "UpdateBackupPolicyRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPolicy": { - "type": "BackupPolicy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteBackupPolicyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" - } - } - } - }, - "BackupVault": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/BackupVault", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backup_vault}", - "(google.api.resource).plural": "backupVaults", - "(google.api.resource).singular": "backupVault" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 4 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5 - }, - "backupVaultType": { - "type": "BackupVaultType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sourceRegion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "backupRegion": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "sourceBackupVault": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" - } - }, - "destinationBackupVault": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" - } - }, - "backupRetentionPolicy": { - "type": "BackupRetentionPolicy", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsConfig": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - }, - "encryptionState": { - "type": "EncryptionState", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupsCryptoKeyVersion": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "BackupRetentionPolicy": { - "fields": { - "backupMinimumEnforcedRetentionDays": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dailyBackupImmutable": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "weeklyBackupImmutable": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "monthlyBackupImmutable": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "manualBackupImmutable": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "DELETING": 3, - "ERROR": 4, - "UPDATING": 5 - } - }, - "BackupVaultType": { - "values": { - "BACKUP_VAULT_TYPE_UNSPECIFIED": 0, - "IN_REGION": 1, - "CROSS_REGION": 2 - } - }, - "EncryptionState": { - "values": { - "ENCRYPTION_STATE_UNSPECIFIED": 0, - "ENCRYPTION_STATE_PENDING": 1, - "ENCRYPTION_STATE_COMPLETED": 2, - "ENCRYPTION_STATE_IN_PROGRESS": 3, - "ENCRYPTION_STATE_FAILED": 4 - } - } - } - }, - "GetBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" - } - } - } - }, - "ListBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "ListBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateBackupVaultRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.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" - } - } - } - }, - "DeleteBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" - } - } - } - }, - "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" - } - } - } - }, - "NetApp": { - "options": { - "(google.api.default_host)": "netapp.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListStoragePools": { - "requestType": "ListStoragePoolsRequest", - "responseType": "ListStoragePoolsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/storagePools", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/storagePools" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateStoragePool": { - "requestType": "CreateStoragePoolRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/storagePools", - "(google.api.http).body": "storage_pool", - "(google.api.method_signature)": "parent,storage_pool,storage_pool_id", - "(google.longrunning.operation_info).response_type": "StoragePool", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/storagePools", - "body": "storage_pool" - } - }, - { - "(google.api.method_signature)": "parent,storage_pool,storage_pool_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "StoragePool", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetStoragePool": { - "requestType": "GetStoragePoolRequest", - "responseType": "StoragePool", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/storagePools/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/storagePools/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateStoragePool": { - "requestType": "UpdateStoragePoolRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", - "(google.api.http).body": "storage_pool", - "(google.api.method_signature)": "storage_pool,update_mask", - "(google.longrunning.operation_info).response_type": "StoragePool", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}", - "body": "storage_pool" - } - }, - { - "(google.api.method_signature)": "storage_pool,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "StoragePool", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteStoragePool": { - "requestType": "DeleteStoragePoolRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/storagePools/*}", - "(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": "/v1/{name=projects/*/locations/*/storagePools/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ValidateDirectoryService": { - "requestType": "ValidateDirectoryServiceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/storagePools/*}:validateDirectoryService", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "SwitchActiveReplicaZone": { - "requestType": "SwitchActiveReplicaZoneRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/storagePools/*}:switch", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "StoragePool", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/storagePools/*}:switch", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "StoragePool", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListVolumes": { - "requestType": "ListVolumesRequest", - "responseType": "ListVolumesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/volumes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/volumes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetVolume": { - "requestType": "GetVolumeRequest", - "responseType": "Volume", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/volumes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateVolume": { - "requestType": "CreateVolumeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/volumes", - "(google.api.http).body": "volume", - "(google.api.method_signature)": "parent,volume,volume_id", - "(google.longrunning.operation_info).response_type": "Volume", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/volumes", - "body": "volume" - } - }, - { - "(google.api.method_signature)": "parent,volume,volume_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Volume", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateVolume": { - "requestType": "UpdateVolumeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", - "(google.api.http).body": "volume", - "(google.api.method_signature)": "volume,update_mask", - "(google.longrunning.operation_info).response_type": "Volume", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{volume.name=projects/*/locations/*/volumes/*}", - "body": "volume" - } - }, - { - "(google.api.method_signature)": "volume,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Volume", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteVolume": { - "requestType": "DeleteVolumeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*}", - "(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": "/v1/{name=projects/*/locations/*/volumes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RevertVolume": { - "requestType": "RevertVolumeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Volume", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*}:revert", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Volume", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "EstablishVolumePeering": { - "requestType": "EstablishVolumePeeringRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Volume", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Volume", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListSnapshots": { - "requestType": "ListSnapshotsRequest", - "responseType": "ListSnapshotsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetSnapshot": { - "requestType": "GetSnapshotRequest", - "responseType": "Snapshot", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateSnapshot": { - "requestType": "CreateSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", - "(google.api.http).body": "snapshot", - "(google.api.method_signature)": "parent,snapshot,snapshot_id", - "(google.longrunning.operation_info).response_type": "Snapshot", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", - "body": "snapshot" - } - }, - { - "(google.api.method_signature)": "parent,snapshot,snapshot_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Snapshot", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteSnapshot": { - "requestType": "DeleteSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", - "(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": "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateSnapshot": { - "requestType": "UpdateSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", - "(google.api.http).body": "snapshot", - "(google.api.method_signature)": "snapshot,update_mask", - "(google.longrunning.operation_info).response_type": "Snapshot", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", - "body": "snapshot" - } - }, - { - "(google.api.method_signature)": "snapshot,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Snapshot", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListActiveDirectories": { - "requestType": "ListActiveDirectoriesRequest", - "responseType": "ListActiveDirectoriesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/activeDirectories", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/activeDirectories" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetActiveDirectory": { - "requestType": "GetActiveDirectoryRequest", - "responseType": "ActiveDirectory", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/activeDirectories/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/activeDirectories/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateActiveDirectory": { - "requestType": "CreateActiveDirectoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/activeDirectories", - "(google.api.http).body": "active_directory", - "(google.api.method_signature)": "parent,active_directory,active_directory_id", - "(google.longrunning.operation_info).response_type": "ActiveDirectory", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/activeDirectories", - "body": "active_directory" - } - }, - { - "(google.api.method_signature)": "parent,active_directory,active_directory_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ActiveDirectory", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateActiveDirectory": { - "requestType": "UpdateActiveDirectoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", - "(google.api.http).body": "active_directory", - "(google.api.method_signature)": "active_directory,update_mask", - "(google.longrunning.operation_info).response_type": "ActiveDirectory", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}", - "body": "active_directory" - } - }, - { - "(google.api.method_signature)": "active_directory,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ActiveDirectory", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteActiveDirectory": { - "requestType": "DeleteActiveDirectoryRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/activeDirectories/*}", - "(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": "/v1/{name=projects/*/locations/*/activeDirectories/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListKmsConfigs": { - "requestType": "ListKmsConfigsRequest", - "responseType": "ListKmsConfigsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/kmsConfigs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/kmsConfigs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateKmsConfig": { - "requestType": "CreateKmsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", - "(google.api.http).body": "kms_config", - "(google.api.method_signature)": "parent,kms_config,kms_config_id", - "(google.longrunning.operation_info).response_type": "KmsConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/kmsConfigs", - "body": "kms_config" - } - }, - { - "(google.api.method_signature)": "parent,kms_config,kms_config_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "KmsConfig", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetKmsConfig": { - "requestType": "GetKmsConfigRequest", - "responseType": "KmsConfig", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateKmsConfig": { - "requestType": "UpdateKmsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", - "(google.api.http).body": "kms_config", - "(google.api.method_signature)": "kms_config,update_mask", - "(google.longrunning.operation_info).response_type": "KmsConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}", - "body": "kms_config" - } - }, - { - "(google.api.method_signature)": "kms_config,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "KmsConfig", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "EncryptVolumes": { - "requestType": "EncryptVolumesRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "KmsConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "KmsConfig", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "VerifyKmsConfig": { - "requestType": "VerifyKmsConfigRequest", - "responseType": "VerifyKmsConfigResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", - "body": "*" - } - } - ] - }, - "DeleteKmsConfig": { - "requestType": "DeleteKmsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/kmsConfigs/*}", - "(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": "/v1/{name=projects/*/locations/*/kmsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListReplications": { - "requestType": "ListReplicationsRequest", - "responseType": "ListReplicationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/volumes/*}/replications" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetReplication": { - "requestType": "GetReplicationRequest", - "responseType": "Replication", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateReplication": { - "requestType": "CreateReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", - "(google.api.http).body": "replication", - "(google.api.method_signature)": "parent,replication,replication_id", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/volumes/*}/replications", - "body": "replication" - } - }, - { - "(google.api.method_signature)": "parent,replication,replication_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteReplication": { - "requestType": "DeleteReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", - "(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": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateReplication": { - "requestType": "UpdateReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", - "(google.api.http).body": "replication", - "(google.api.method_signature)": "replication,update_mask", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", - "body": "replication" - } - }, - { - "(google.api.method_signature)": "replication,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "StopReplication": { - "requestType": "StopReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ResumeReplication": { - "requestType": "ResumeReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ReverseReplicationDirection": { - "requestType": "ReverseReplicationDirectionRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "EstablishPeering": { - "requestType": "EstablishPeeringRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "SyncReplication": { - "requestType": "SyncReplicationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Replication", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Replication", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupVault": { - "requestType": "CreateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{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": "/v1/{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" - } - } - ] - }, - "GetBackupVault": { - "requestType": "GetBackupVaultRequest", - "responseType": "BackupVault", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupVaults": { - "requestType": "ListBackupVaultsRequest", - "responseType": "ListBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateBackupVault": { - "requestType": "UpdateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{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": "/v1/{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": "/v1/{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": "/v1/{name=projects/*/locations/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackup": { - "requestType": "CreateBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", - "(google.api.http).body": "backup", - "(google.api.method_signature)": "parent,backup,backup_id", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", - "body": "backup" - } - }, - { - "(google.api.method_signature)": "parent,backup,backup_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackup": { - "requestType": "GetBackupRequest", - "responseType": "Backup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackups": { - "requestType": "ListBackupsRequest", - "responseType": "ListBackupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackup": { - "requestType": "DeleteBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", - "(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": "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateBackup": { - "requestType": "UpdateBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/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": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}", - "body": "backup" - } - }, - { - "(google.api.method_signature)": "backup,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPolicy": { - "requestType": "CreateBackupPolicyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPolicies", - "(google.api.http).body": "backup_policy", - "(google.api.method_signature)": "parent,backup_policy,backup_policy_id", - "(google.longrunning.operation_info).response_type": "BackupPolicy", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPolicies", - "body": "backup_policy" - } - }, - { - "(google.api.method_signature)": "parent,backup_policy,backup_policy_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPolicy", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPolicy": { - "requestType": "GetBackupPolicyRequest", - "responseType": "BackupPolicy", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPolicies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPolicies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPolicies": { - "requestType": "ListBackupPoliciesRequest", - "responseType": "ListBackupPoliciesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPolicies", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPolicies" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateBackupPolicy": { - "requestType": "UpdateBackupPolicyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}", - "(google.api.http).body": "backup_policy", - "(google.api.method_signature)": "backup_policy,update_mask", - "(google.longrunning.operation_info).response_type": "BackupPolicy", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}", - "body": "backup_policy" - } - }, - { - "(google.api.method_signature)": "backup_policy,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPolicy", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackupPolicy": { - "requestType": "DeleteBackupPolicyRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPolicies/*}", - "(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": "/v1/{name=projects/*/locations/*/backupPolicies/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListQuotaRules": { - "requestType": "ListQuotaRulesRequest", - "responseType": "ListQuotaRulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetQuotaRule": { - "requestType": "GetQuotaRuleRequest", - "responseType": "QuotaRule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateQuotaRule": { - "requestType": "CreateQuotaRuleRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", - "(google.api.http).body": "quota_rule", - "(google.api.method_signature)": "parent,quota_rule,quota_rule_id", - "(google.longrunning.operation_info).response_type": "QuotaRule", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/volumes/*}/quotaRules", - "body": "quota_rule" - } - }, - { - "(google.api.method_signature)": "parent,quota_rule,quota_rule_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "QuotaRule", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateQuotaRule": { - "requestType": "UpdateQuotaRuleRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}", - "(google.api.http).body": "quota_rule", - "(google.api.method_signature)": "quota_rule,update_mask", - "(google.longrunning.operation_info).response_type": "QuotaRule", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{quota_rule.name=projects/*/locations/*/volumes/*/quotaRules/*}", - "body": "quota_rule" - } - }, - { - "(google.api.method_signature)": "quota_rule,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "QuotaRule", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteQuotaRule": { - "requestType": "DeleteQuotaRuleRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}", - "(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": "/v1/{name=projects/*/locations/*/volumes/*/quotaRules/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RestoreBackupFiles": { - "requestType": "RestoreBackupFilesRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:restore", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "RestoreBackupFilesResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/volumes/*}:restore", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "RestoreBackupFilesResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListHostGroups": { - "requestType": "ListHostGroupsRequest", - "responseType": "ListHostGroupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/hostGroups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/hostGroups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetHostGroup": { - "requestType": "GetHostGroupRequest", - "responseType": "HostGroup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/hostGroups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/hostGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateHostGroup": { - "requestType": "CreateHostGroupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/hostGroups", - "(google.api.http).body": "host_group", - "(google.api.method_signature)": "parent,host_group,host_group_id", - "(google.longrunning.operation_info).response_type": "HostGroup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/hostGroups", - "body": "host_group" - } - }, - { - "(google.api.method_signature)": "parent,host_group,host_group_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "HostGroup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateHostGroup": { - "requestType": "UpdateHostGroupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}", - "(google.api.http).body": "host_group", - "(google.api.method_signature)": "host_group,update_mask", - "(google.longrunning.operation_info).response_type": "HostGroup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{host_group.name=projects/*/locations/*/hostGroups/*}", - "body": "host_group" - } - }, - { - "(google.api.method_signature)": "host_group,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "HostGroup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteHostGroup": { - "requestType": "DeleteHostGroupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/hostGroups/*}", - "(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": "/v1/{name=projects/*/locations/*/hostGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ExecuteOntapPost": { - "requestType": "ExecuteOntapPostRequest", - "responseType": "ExecuteOntapPostResponse", - "options": { - "(google.api.http).post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", - "body": "*" - } - } - ] - }, - "ExecuteOntapGet": { - "requestType": "ExecuteOntapGetRequest", - "responseType": "ExecuteOntapGetResponse", - "options": { - "(google.api.http).get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - } - } - ] - }, - "ExecuteOntapDelete": { - "requestType": "ExecuteOntapDeleteRequest", - "responseType": "ExecuteOntapDeleteResponse", - "options": { - "(google.api.http).delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" - } - } - ] - }, - "ExecuteOntapPatch": { - "requestType": "ExecuteOntapPatchRequest", - "responseType": "ExecuteOntapPatchResponse", - "options": { - "(google.api.http).patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", - "body": "*" - } - } - ] - } - } - }, - "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" - } - } - } - }, - "ListHostGroupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/HostGroup" - } - }, - "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" - } - } - } - }, - "ListHostGroupsResponse": { - "fields": { - "hostGroups": { - "rule": "repeated", - "type": "HostGroup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetHostGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" - } - } - } - }, - "CreateHostGroupRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/HostGroup" - } - }, - "hostGroup": { - "type": "HostGroup", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "hostGroupId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateHostGroupRequest": { - "fields": { - "hostGroup": { - "type": "HostGroup", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteHostGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" - } - } - } - }, - "HostGroup": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/HostGroup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/hostGroups/{host_group}", - "(google.api.resource).plural": "hostGroups", - "(google.api.resource).singular": "hostGroup" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "type": { - "type": "Type", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hosts": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "osType": { - "type": "OsType", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ISCSI_INITIATOR": 1 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "DISABLED": 5 - } - } - } - }, - "ServiceLevel": { - "values": { - "SERVICE_LEVEL_UNSPECIFIED": 0, - "PREMIUM": 1, - "EXTREME": 2, - "STANDARD": 3, - "FLEX": 4 - } - }, - "FlexPerformance": { - "values": { - "FLEX_PERFORMANCE_UNSPECIFIED": 0, - "FLEX_PERFORMANCE_DEFAULT": 1, - "FLEX_PERFORMANCE_CUSTOM": 2 - } - }, - "EncryptionType": { - "values": { - "ENCRYPTION_TYPE_UNSPECIFIED": 0, - "SERVICE_MANAGED": 1, - "CLOUD_KMS": 2 - } - }, - "DirectoryServiceType": { - "values": { - "DIRECTORY_SERVICE_TYPE_UNSPECIFIED": 0, - "ACTIVE_DIRECTORY": 1 - } - }, - "StoragePoolType": { - "values": { - "STORAGE_POOL_TYPE_UNSPECIFIED": 0, - "FILE": 1, - "UNIFIED": 2 - } - }, - "HybridReplicationSchedule": { - "values": { - "HYBRID_REPLICATION_SCHEDULE_UNSPECIFIED": 0, - "EVERY_10_MINUTES": 1, - "HOURLY": 2, - "DAILY": 3 - } - }, - "QosType": { - "values": { - "QOS_TYPE_UNSPECIFIED": 0, - "AUTO": 1, - "MANUAL": 2 - } - }, - "OsType": { - "values": { - "OS_TYPE_UNSPECIFIED": 0, - "LINUX": 1, - "WINDOWS": 2, - "ESXI": 3 - } - }, - "LocationMetadata": { - "fields": { - "supportedServiceLevels": { - "rule": "repeated", - "type": "ServiceLevel", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportedFlexPerformance": { - "rule": "repeated", - "type": "FlexPerformance", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hasVcp": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hasOntapProxy": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "UserCommands": { - "fields": { - "commands": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GetKmsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - } - } - }, - "ListKmsConfigsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "ListKmsConfigsResponse": { - "fields": { - "kmsConfigs": { - "rule": "repeated", - "type": "KmsConfig", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateKmsConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/KmsConfig" - } - }, - "kmsConfigId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "kmsConfig": { - "type": "KmsConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateKmsConfigRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "kmsConfig": { - "type": "KmsConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteKmsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - } - } - }, - "EncryptVolumesRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - } - } - }, - "VerifyKmsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - } - } - }, - "VerifyKmsConfigResponse": { - "fields": { - "healthy": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "healthError": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "instructions": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "KmsConfig": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/KmsConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/kmsConfigs/{kms_config}", - "(google.api.resource).plural": "kmsConfigs", - "(google.api.resource).singular": "kmsConfig" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "cryptoKeyName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 6 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7 - }, - "instructions": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "CREATING": 2, - "DELETING": 3, - "UPDATING": 4, - "IN_USE": 5, - "ERROR": 6, - "KEY_CHECK_PENDING": 7, - "KEY_NOT_REACHABLE": 8, - "DISABLING": 9, - "DISABLED": 10, - "MIGRATING": 11 - } - } - } - }, - "ExecuteOntapPostRequest": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "ontapPath": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExecuteOntapPostResponse": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 1 - } - } - }, - "ExecuteOntapGetRequest": { - "fields": { - "ontapPath": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExecuteOntapGetResponse": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 1 - } - } - }, - "ExecuteOntapDeleteRequest": { - "fields": { - "ontapPath": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExecuteOntapDeleteResponse": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 1 - } - } - }, - "ExecuteOntapPatchRequest": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "ontapPath": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ExecuteOntapPatchResponse": { - "fields": { - "body": { - "type": "google.protobuf.Struct", - "id": 1 - } - } - }, - "ListQuotaRulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/QuotaRule" - } - }, - "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" - } - } - } - }, - "ListQuotaRulesResponse": { - "fields": { - "quotaRules": { - "rule": "repeated", - "type": "QuotaRule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetQuotaRuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/QuotaRule" - } - } - } - }, - "CreateQuotaRuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/QuotaRule" - } - }, - "quotaRule": { - "type": "QuotaRule", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "quotaRuleId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateQuotaRuleRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "quotaRule": { - "type": "QuotaRule", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteQuotaRuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/QuotaRule" - } - } - } - }, - "QuotaRule": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/QuotaRule", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}", - "(google.api.resource).plural": "quotaRules", - "(google.api.resource).singular": "quotaRule" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "target": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "diskLimitMib": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "INDIVIDUAL_USER_QUOTA": 1, - "INDIVIDUAL_GROUP_QUOTA": 2, - "DEFAULT_USER_QUOTA": 3, - "DEFAULT_GROUP_QUOTA": 4 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "UPDATING": 2, - "DELETING": 3, - "READY": 4, - "ERROR": 5 - } - } - } - }, - "TransferStats": { - "oneofs": { - "_transferBytes": { - "oneof": [ - "transferBytes" - ] - }, - "_totalTransferDuration": { - "oneof": [ - "totalTransferDuration" - ] - }, - "_lastTransferBytes": { - "oneof": [ - "lastTransferBytes" - ] - }, - "_lastTransferDuration": { - "oneof": [ - "lastTransferDuration" - ] - }, - "_lagDuration": { - "oneof": [ - "lagDuration" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_lastTransferEndTime": { - "oneof": [ - "lastTransferEndTime" - ] - }, - "_lastTransferError": { - "oneof": [ - "lastTransferError" - ] - } - }, - "fields": { - "transferBytes": { - "type": "int64", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "totalTransferDuration": { - "type": "google.protobuf.Duration", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "lastTransferBytes": { - "type": "int64", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "lastTransferDuration": { - "type": "google.protobuf.Duration", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "lagDuration": { - "type": "google.protobuf.Duration", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "lastTransferEndTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "lastTransferError": { - "type": "string", - "id": 8, - "options": { - "proto3_optional": true - } - } - } - }, - "Replication": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/Replication", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}", - "(google.api.resource).plural": "replications", - "(google.api.resource).singular": "replication" - }, - "oneofs": { - "_healthy": { - "oneof": [ - "healthy" - ] - }, - "_description": { - "oneof": [ - "description" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "role": { - "type": "ReplicationRole", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "replicationSchedule": { - "type": "ReplicationSchedule", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "mirrorState": { - "type": "MirrorState", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "healthy": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "destinationVolume": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "transferStats": { - "type": "TransferStats", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 12 - }, - "description": { - "type": "string", - "id": 13, - "options": { - "proto3_optional": true - } - }, - "destinationVolumeParameters": { - "type": "DestinationVolumeParameters", - "id": 14, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sourceVolume": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "hybridPeeringDetails": { - "type": "HybridPeeringDetails", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "clusterLocation": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hybridReplicationType": { - "type": "HybridReplicationType", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hybridReplicationUserCommands": { - "type": "UserCommands", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 5, - "ERROR": 6, - "PENDING_CLUSTER_PEERING": 8, - "PENDING_SVM_PEERING": 9, - "PENDING_REMOTE_RESYNC": 10, - "EXTERNALLY_MANAGED_REPLICATION": 11 - } - }, - "ReplicationRole": { - "values": { - "REPLICATION_ROLE_UNSPECIFIED": 0, - "SOURCE": 1, - "DESTINATION": 2 - } - }, - "ReplicationSchedule": { - "values": { - "REPLICATION_SCHEDULE_UNSPECIFIED": 0, - "EVERY_10_MINUTES": 1, - "HOURLY": 2, - "DAILY": 3 - } - }, - "MirrorState": { - "values": { - "MIRROR_STATE_UNSPECIFIED": 0, - "PREPARING": 1, - "MIRRORED": 2, - "STOPPED": 3, - "TRANSFERRING": 4, - "BASELINE_TRANSFERRING": 5, - "ABORTED": 6, - "EXTERNALLY_MANAGED": 7, - "PENDING_PEERING": 8 - } - }, - "HybridReplicationType": { - "values": { - "HYBRID_REPLICATION_TYPE_UNSPECIFIED": 0, - "MIGRATION": 1, - "CONTINUOUS_REPLICATION": 2, - "ONPREM_REPLICATION": 3, - "REVERSE_ONPREM_REPLICATION": 4 - } - } - } - }, - "HybridPeeringDetails": { - "fields": { - "subnetIp": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "command": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "commandExpiryTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "passphrase": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peerVolumeName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peerClusterName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peerSvmName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ListReplicationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "ListReplicationsResponse": { - "fields": { - "replications": { - "rule": "repeated", - "type": "Replication", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetReplicationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - } - } - }, - "DestinationVolumeParameters": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_tieringPolicy": { - "oneof": [ - "tieringPolicy" - ] - } - }, - "fields": { - "storagePool": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - }, - "volumeId": { - "type": "string", - "id": 2 - }, - "shareName": { - "type": "string", - "id": 3 - }, - "description": { - "type": "string", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "tieringPolicy": { - "type": "TieringPolicy", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "CreateReplicationRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Replication" - } - }, - "replication": { - "type": "Replication", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "replicationId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteReplicationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - } - } - }, - "UpdateReplicationRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "replication": { - "type": "Replication", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StopReplicationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - }, - "force": { - "type": "bool", - "id": 2 - } - } - }, - "ResumeReplicationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - } - } - }, - "ReverseReplicationDirectionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - } - } - }, - "EstablishPeeringRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - }, - "peerClusterName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerSvmName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerIpAddresses": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "peerVolumeName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SyncReplicationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - } - } - }, - "Protocols": { - "values": { - "PROTOCOLS_UNSPECIFIED": 0, - "NFSV3": 1, - "NFSV4": 2, - "SMB": 3, - "ISCSI": 4 - } - }, - "AccessType": { - "values": { - "ACCESS_TYPE_UNSPECIFIED": 0, - "READ_ONLY": 1, - "READ_WRITE": 2, - "READ_NONE": 3 - } - }, - "SMBSettings": { - "values": { - "SMB_SETTINGS_UNSPECIFIED": 0, - "ENCRYPT_DATA": 1, - "BROWSABLE": 2, - "CHANGE_NOTIFY": 3, - "NON_BROWSABLE": 4, - "OPLOCKS": 5, - "SHOW_SNAPSHOT": 6, - "SHOW_PREVIOUS_VERSIONS": 7, - "ACCESS_BASED_ENUMERATION": 8, - "CONTINUOUSLY_AVAILABLE": 9 - } - }, - "SecurityStyle": { - "values": { - "SECURITY_STYLE_UNSPECIFIED": 0, - "NTFS": 1, - "UNIX": 2 - } - }, - "RestrictedAction": { - "values": { - "RESTRICTED_ACTION_UNSPECIFIED": 0, - "DELETE": 1 - } - }, - "ListVolumesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListVolumesResponse": { - "fields": { - "volumes": { - "rule": "repeated", - "type": "Volume", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetVolumeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - } - } - }, - "CreateVolumeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Volume" - } - }, - "volumeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "volume": { - "type": "Volume", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateVolumeRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "volume": { - "type": "Volume", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteVolumeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "force": { - "type": "bool", - "id": 2 - } - } - }, - "RevertVolumeRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "snapshotId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Volume": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/Volume", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}", - "(google.api.resource).plural": "volumes", - "(google.api.resource).singular": "volume" - }, - "oneofs": { - "_backupConfig": { - "oneof": [ - "backupConfig" - ] - }, - "_tieringPolicy": { - "oneof": [ - "tieringPolicy" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "shareName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "psaRange": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "storagePool": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - }, - "network": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "compute.googleapis.com/Network" - } - }, - "serviceLevel": { - "type": "ServiceLevel", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "capacityGib": { - "type": "int64", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "exportPolicy": { - "type": "ExportPolicy", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "protocols": { - "rule": "repeated", - "type": "Protocols", - "id": 12, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "smbSettings": { - "rule": "repeated", - "type": "SMBSettings", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mountOptions": { - "rule": "repeated", - "type": "MountOption", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "unixPermissions": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotPolicy": { - "type": "SnapshotPolicy", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapReserve": { - "type": "double", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotDirectory": { - "type": "bool", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "usedGib": { - "type": "int64", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "securityStyle": { - "type": "SecurityStyle", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kerberosEnabled": { - "type": "bool", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ldapEnabled": { - "type": "bool", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "activeDirectory": { - "type": "string", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" - } - }, - "restoreParameters": { - "type": "RestoreParameters", - "id": 26, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsConfig": { - "type": "string", - "id": 27, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - }, - "encryptionType": { - "type": "EncryptionType", - "id": 28, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hasReplication": { - "type": "bool", - "id": 29, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupConfig": { - "type": "BackupConfig", - "id": 30, - "options": { - "proto3_optional": true - } - }, - "restrictedActions": { - "rule": "repeated", - "type": "RestrictedAction", - "id": 31, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "largeCapacity": { - "type": "bool", - "id": 32, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "multipleEndpoints": { - "type": "bool", - "id": 33, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "tieringPolicy": { - "type": "TieringPolicy", - "id": 34, - "options": { - "proto3_optional": true - } - }, - "replicaZone": { - "type": "string", - "id": 36, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "zone": { - "type": "string", - "id": 37, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "coldTierSizeGib": { - "type": "int64", - "id": 39, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hybridReplicationParameters": { - "type": "HybridReplicationParameters", - "id": 40, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "throughputMibps": { - "type": "double", - "id": 41, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cacheParameters": { - "type": "CacheParameters", - "id": 42, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hotTierSizeUsedGib": { - "type": "int64", - "id": 44, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "blockDevices": { - "rule": "repeated", - "type": "BlockDevice", - "id": 45, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloneDetails": { - "type": "CloneDetails", - "id": 47, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "CloneDetails": { - "fields": { - "sourceSnapshot": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" - } - }, - "sourceVolume": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "sharedSpaceGib": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "CREATING": 2, - "DELETING": 3, - "UPDATING": 4, - "RESTORING": 5, - "DISABLED": 6, - "ERROR": 7, - "PREPARING": 8, - "READ_ONLY": 9 - } - } - } - }, - "ExportPolicy": { - "fields": { - "rules": { - "rule": "repeated", - "type": "SimpleExportPolicyRule", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SimpleExportPolicyRule": { - "oneofs": { - "_allowedClients": { - "oneof": [ - "allowedClients" - ] - }, - "_hasRootAccess": { - "oneof": [ - "hasRootAccess" - ] - }, - "_accessType": { - "oneof": [ - "accessType" - ] - }, - "_nfsv3": { - "oneof": [ - "nfsv3" - ] - }, - "_nfsv4": { - "oneof": [ - "nfsv4" - ] - }, - "_kerberos_5ReadOnly": { - "oneof": [ - "kerberos_5ReadOnly" - ] - }, - "_kerberos_5ReadWrite": { - "oneof": [ - "kerberos_5ReadWrite" - ] - }, - "_kerberos_5iReadOnly": { - "oneof": [ - "kerberos_5iReadOnly" - ] - }, - "_kerberos_5iReadWrite": { - "oneof": [ - "kerberos_5iReadWrite" - ] - }, - "_kerberos_5pReadOnly": { - "oneof": [ - "kerberos_5pReadOnly" - ] - }, - "_kerberos_5pReadWrite": { - "oneof": [ - "kerberos_5pReadWrite" - ] - }, - "_squashMode": { - "oneof": [ - "squashMode" - ] - }, - "_anonUid": { - "oneof": [ - "anonUid" - ] - } - }, - "fields": { - "allowedClients": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "hasRootAccess": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "accessType": { - "type": "AccessType", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "nfsv3": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "nfsv4": { - "type": "bool", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "kerberos_5ReadOnly": { - "type": "bool", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "kerberos_5ReadWrite": { - "type": "bool", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "kerberos_5iReadOnly": { - "type": "bool", - "id": 8, - "options": { - "proto3_optional": true - } - }, - "kerberos_5iReadWrite": { - "type": "bool", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "kerberos_5pReadOnly": { - "type": "bool", - "id": 10, - "options": { - "proto3_optional": true - } - }, - "kerberos_5pReadWrite": { - "type": "bool", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "squashMode": { - "type": "SquashMode", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "anonUid": { - "type": "int64", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "SquashMode": { - "values": { - "SQUASH_MODE_UNSPECIFIED": 0, - "NO_ROOT_SQUASH": 1, - "ROOT_SQUASH": 2, - "ALL_SQUASH": 3 - } - } - } - }, - "SnapshotPolicy": { - "oneofs": { - "_enabled": { - "oneof": [ - "enabled" - ] - }, - "_hourlySchedule": { - "oneof": [ - "hourlySchedule" - ] - }, - "_dailySchedule": { - "oneof": [ - "dailySchedule" - ] - }, - "_weeklySchedule": { - "oneof": [ - "weeklySchedule" - ] - }, - "_monthlySchedule": { - "oneof": [ - "monthlySchedule" - ] - } - }, - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "hourlySchedule": { - "type": "HourlySchedule", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "dailySchedule": { - "type": "DailySchedule", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "weeklySchedule": { - "type": "WeeklySchedule", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "monthlySchedule": { - "type": "MonthlySchedule", - "id": 5, - "options": { - "proto3_optional": true - } - } - } - }, - "HourlySchedule": { - "oneofs": { - "_snapshotsToKeep": { - "oneof": [ - "snapshotsToKeep" - ] - }, - "_minute": { - "oneof": [ - "minute" - ] - } - }, - "fields": { - "snapshotsToKeep": { - "type": "double", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "minute": { - "type": "double", - "id": 2, - "options": { - "proto3_optional": true - } - } - } - }, - "DailySchedule": { - "oneofs": { - "_snapshotsToKeep": { - "oneof": [ - "snapshotsToKeep" - ] - }, - "_minute": { - "oneof": [ - "minute" - ] - }, - "_hour": { - "oneof": [ - "hour" - ] - } - }, - "fields": { - "snapshotsToKeep": { - "type": "double", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "minute": { - "type": "double", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "hour": { - "type": "double", - "id": 3, - "options": { - "proto3_optional": true - } - } - } - }, - "WeeklySchedule": { - "oneofs": { - "_snapshotsToKeep": { - "oneof": [ - "snapshotsToKeep" - ] - }, - "_minute": { - "oneof": [ - "minute" - ] - }, - "_hour": { - "oneof": [ - "hour" - ] - }, - "_day": { - "oneof": [ - "day" - ] - } - }, - "fields": { - "snapshotsToKeep": { - "type": "double", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "minute": { - "type": "double", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "hour": { - "type": "double", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "day": { - "type": "string", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "MonthlySchedule": { - "oneofs": { - "_snapshotsToKeep": { - "oneof": [ - "snapshotsToKeep" - ] - }, - "_minute": { - "oneof": [ - "minute" - ] - }, - "_hour": { - "oneof": [ - "hour" - ] - }, - "_daysOfMonth": { - "oneof": [ - "daysOfMonth" - ] - } - }, - "fields": { - "snapshotsToKeep": { - "type": "double", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "minute": { - "type": "double", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "hour": { - "type": "double", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "daysOfMonth": { - "type": "string", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "MountOption": { - "fields": { - "export": { - "type": "string", - "id": 1 - }, - "exportFull": { - "type": "string", - "id": 2 - }, - "protocol": { - "type": "Protocols", - "id": 3 - }, - "instructions": { - "type": "string", - "id": 4 - }, - "ipAddress": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_info).format": "IPV4", - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "RestoreParameters": { - "oneofs": { - "source": { - "oneof": [ - "sourceSnapshot", - "sourceBackup" - ] - } - }, - "fields": { - "sourceSnapshot": { - "type": "string", - "id": 1 - }, - "sourceBackup": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" - } - } - } - }, - "BackupConfig": { - "oneofs": { - "_scheduledBackupEnabled": { - "oneof": [ - "scheduledBackupEnabled" - ] - }, - "_backupChainBytes": { - "oneof": [ - "backupChainBytes" - ] - } - }, - "fields": { - "backupPolicies": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupPolicy" - } - }, - "backupVault": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/BackupVault" - } - }, - "scheduledBackupEnabled": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "backupChainBytes": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - } - }, - "TieringPolicy": { - "oneofs": { - "_tierAction": { - "oneof": [ - "tierAction" - ] - }, - "_coolingThresholdDays": { - "oneof": [ - "coolingThresholdDays" - ] - }, - "_hotTierBypassModeEnabled": { - "oneof": [ - "hotTierBypassModeEnabled" - ] - } - }, - "fields": { - "tierAction": { - "type": "TierAction", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "coolingThresholdDays": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "hotTierBypassModeEnabled": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "TierAction": { - "values": { - "TIER_ACTION_UNSPECIFIED": 0, - "ENABLED": 1, - "PAUSED": 2 - } - } - } - }, - "HybridReplicationParameters": { - "fields": { - "replication": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Replication" - } - }, - "peerVolumeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerClusterName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerSvmName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerIpAddresses": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "clusterLocation": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "replicationSchedule": { - "type": "HybridReplicationSchedule", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hybridReplicationType": { - "type": "VolumeHybridReplicationType", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "largeVolumeConstituentCount": { - "type": "int32", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "VolumeHybridReplicationType": { - "values": { - "VOLUME_HYBRID_REPLICATION_TYPE_UNSPECIFIED": 0, - "MIGRATION": 1, - "CONTINUOUS_REPLICATION": 2, - "ONPREM_REPLICATION": 3, - "REVERSE_ONPREM_REPLICATION": 4 - } - } - } - }, - "CacheParameters": { - "oneofs": { - "_enableGlobalFileLock": { - "oneof": [ - "enableGlobalFileLock" - ] - } - }, - "fields": { - "peerVolumeName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerClusterName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerSvmName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerIpAddresses": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "enableGlobalFileLock": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "cacheConfig": { - "type": "CacheConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cacheState": { - "type": "CacheState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "command": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "peeringCommandExpiryTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "passphrase": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "CacheState": { - "values": { - "CACHE_STATE_UNSPECIFIED": 0, - "PENDING_CLUSTER_PEERING": 1, - "PENDING_SVM_PEERING": 2, - "PEERED": 3, - "ERROR": 4 - } - } - } - }, - "CacheConfig": { - "oneofs": { - "_writebackEnabled": { - "oneof": [ - "writebackEnabled" - ] - }, - "_cifsChangeNotifyEnabled": { - "oneof": [ - "cifsChangeNotifyEnabled" - ] - } - }, - "fields": { - "cachePrePopulate": { - "type": "CachePrePopulate", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "writebackEnabled": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "cifsChangeNotifyEnabled": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "cachePrePopulateState": { - "type": "CachePrePopulateState", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "CachePrePopulateState": { - "values": { - "CACHE_PRE_POPULATE_STATE_UNSPECIFIED": 0, - "NOT_NEEDED": 1, - "IN_PROGRESS": 2, - "COMPLETE": 3, - "ERROR": 4 - } - } - } - }, - "CachePrePopulate": { - "oneofs": { - "_recursion": { - "oneof": [ - "recursion" - ] - } - }, - "fields": { - "pathList": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "excludePathList": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "recursion": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "BlockDevice": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "_sizeGib": { - "oneof": [ - "sizeGib" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "hostGroups": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/HostGroup" - } - }, - "identifier": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sizeGib": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "osType": { - "type": "OsType", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } - } - }, - "RestoreBackupFilesRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "backup": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" - } - }, - "fileList": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "restoreDestinationPath": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RestoreBackupFilesResponse": { - "fields": {} - }, - "EstablishVolumePeeringRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" - } - }, - "peerClusterName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerSvmName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "peerIpAddresses": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "peerVolumeName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListSnapshotsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "ListSnapshotsResponse": { - "fields": { - "snapshots": { - "rule": "repeated", - "type": "Snapshot", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetSnapshotRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" - } - } - } - }, - "CreateSnapshotRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/Snapshot" - } - }, - "snapshot": { - "type": "Snapshot", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "snapshotId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteSnapshotRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" - } - } - } - }, - "UpdateSnapshotRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "snapshot": { - "type": "Snapshot", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Snapshot": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/Snapshot", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}", - "(google.api.resource).plural": "snapshots", - "(google.api.resource).singular": "snapshot" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 4 - }, - "usedBytes": { - "type": "double", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "CREATING": 2, - "DELETING": 3, - "UPDATING": 4, - "DISABLED": 5, - "ERROR": 6 - } - } - } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "DEFAULT": 1, - "ONTAP": 2 - } - }, - "GetStoragePoolRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - } - } - }, - "ListStoragePoolsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListStoragePoolsResponse": { - "fields": { - "storagePools": { - "rule": "repeated", - "type": "StoragePool", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateStoragePoolRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "netapp.googleapis.com/StoragePool" - } - }, - "storagePoolId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "storagePool": { - "type": "StoragePool", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateStoragePoolRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "storagePool": { - "type": "StoragePool", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteStoragePoolRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - } - } - }, - "SwitchActiveReplicaZoneRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - } - } - }, - "StoragePool": { - "options": { - "(google.api.resource).type": "netapp.googleapis.com/StoragePool", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/storagePools/{storage_pool}", - "(google.api.resource).plural": "storagePools", - "(google.api.resource).singular": "storagePool" - }, - "oneofs": { - "_globalAccessAllowed": { - "oneof": [ - "globalAccessAllowed" - ] - }, - "_enableHotTierAutoResize": { - "oneof": [ - "enableHotTierAutoResize" - ] - }, - "_type": { - "oneof": [ - "type" - ] - }, - "_mode": { - "oneof": [ - "mode" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "serviceLevel": { - "type": "ServiceLevel", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "capacityGib": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "volumeCapacityGib": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "volumeCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "stateDetails": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "network": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "compute.googleapis.com/Network" - } - }, - "activeDirectory": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/ActiveDirectory" - } - }, - "kmsConfig": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "netapp.googleapis.com/KmsConfig" - } - }, - "ldapEnabled": { - "type": "bool", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "psaRange": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encryptionType": { - "type": "EncryptionType", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "globalAccessAllowed": { - "type": "bool", - "id": 17, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "allowAutoTiering": { - "type": "bool", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "replicaZone": { - "type": "string", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "zone": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "satisfiesPzs": { - "type": "bool", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "customPerformanceEnabled": { - "type": "bool", - "id": 25, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "totalThroughputMibps": { - "type": "int64", - "id": 26, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "totalIops": { - "type": "int64", - "id": 27, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hotTierSizeGib": { - "type": "int64", - "id": 28, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enableHotTierAutoResize": { - "type": "bool", - "id": 29, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "qosType": { - "type": "QosType", - "id": 30, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "availableThroughputMibps": { - "type": "double", - "id": 31, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "coldTierSizeUsedGib": { - "type": "int64", - "id": 33, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "hotTierSizeUsedGib": { - "type": "int64", - "id": 34, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "StoragePoolType", - "id": 35, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "mode": { - "type": "Mode", - "id": 36, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "READY": 1, - "CREATING": 2, - "DELETING": 3, - "UPDATING": 4, - "RESTORING": 5, - "DISABLED": 6, - "ERROR": 7 - } - } - } - }, - "ValidateDirectoryServiceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "netapp.googleapis.com/StoragePool" - } - }, - "directoryServiceType": { - "type": "DirectoryServiceType", - "id": 2 - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldInfoProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "edition": "proto2", - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - "fields": { - "nullValue": { - "type": "NullValue", - "id": 1 - }, - "numberValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - } - } - }, - "longrunning": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.LongRunning", - "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", - "java_multiple_files": true, - "java_outer_classname": "OperationsProto", - "java_package": "com.google.longrunning", - "php_namespace": "Google\\LongRunning" - }, - "nested": { - "operationInfo": { - "type": "google.longrunning.OperationInfo", - "id": 1049, - "extend": "google.protobuf.MethodOptions" - }, - "Operations": { - "options": { - "(google.api.default_host)": "longrunning.googleapis.com" - }, - "methods": { - "ListOperations": { - "requestType": "ListOperationsRequest", - "responseType": "ListOperationsResponse", - "options": { - "(google.api.http).get": "/v1/{name=operations}", - "(google.api.method_signature)": "name,filter" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations}" - } - }, - { - "(google.api.method_signature)": "name,filter" - } - ] - }, - "GetOperation": { - "requestType": "GetOperationRequest", - "responseType": "Operation", - "options": { - "(google.api.http).get": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "DeleteOperation": { - "requestType": "DeleteOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=operations/**}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=operations/**}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CancelOperation": { - "requestType": "CancelOperationRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=operations/**}:cancel", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "WaitOperation": { - "requestType": "WaitOperationRequest", - "responseType": "Operation" - } - } - }, - "Operation": { - "oneofs": { - "result": { - "oneof": [ - "error", - "response" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "metadata": { - "type": "google.protobuf.Any", - "id": 2 - }, - "done": { - "type": "bool", - "id": 3 - }, - "error": { - "type": "google.rpc.Status", - "id": 4 - }, - "response": { - "type": "google.protobuf.Any", - "id": 5 - } - } - }, - "GetOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListOperationsRequest": { - "fields": { - "name": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListOperationsResponse": { - "fields": { - "operations": { - "rule": "repeated", - "type": "Operation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "DeleteOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "WaitOperationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "timeout": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "OperationInfo": { - "fields": { - "responseType": { - "type": "string", - "id": 1 - }, - "metadataType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js deleted file mode 100644 index 31b378e5049..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_active_directory.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, activeDirectory, activeDirectoryId) { - // [START netapp_v1_generated_NetApp_CreateActiveDirectory_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. Fields of the to be created active directory. - */ - // const activeDirectory = {} - /** - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - */ - // const activeDirectoryId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateActiveDirectory() { - // Construct request - const request = { - parent, - activeDirectory, - activeDirectoryId, - }; - - // Run request - const [operation] = await netappClient.createActiveDirectory(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateActiveDirectory(); - // [END netapp_v1_generated_NetApp_CreateActiveDirectory_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js deleted file mode 100644 index 458e0441e99..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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, backupId, backup) { - // [START netapp_v1_generated_NetApp_CreateBackup_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 NetApp backupVault to create the backups of, in the format - * `projects/* /locations/* /backupVaults/{backup_vault_id}` - */ - // const parent = 'abc123' - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const backupId = 'abc123' - /** - * Required. A backup resource - */ - // const backup = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateBackup() { - // Construct request - const request = { - parent, - backupId, - backup, - }; - - // Run request - const [operation] = await netappClient.createBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackup(); - // [END netapp_v1_generated_NetApp_CreateBackup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js deleted file mode 100644 index 39e6e62f5af..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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, backupPolicy, backupPolicyId) { - // [START netapp_v1_generated_NetApp_CreateBackupPolicy_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 location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. A backupPolicy resource - */ - // const backupPolicy = {} - /** - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const backupPolicyId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateBackupPolicy() { - // Construct request - const request = { - parent, - backupPolicy, - backupPolicyId, - }; - - // Run request - const [operation] = await netappClient.createBackupPolicy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackupPolicy(); - // [END netapp_v1_generated_NetApp_CreateBackupPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js deleted file mode 100644 index d4ecdbe122b..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_backup_vault.js +++ /dev/null @@ -1,77 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const backupVaultId = 'abc123' - /** - * Required. A backupVault resource - */ - // const backupVault = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateBackupVault() { - // Construct request - const request = { - parent, - backupVaultId, - backupVault, - }; - - // Run request - const [operation] = await netappClient.createBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackupVault(); - // [END netapp_v1_generated_NetApp_CreateBackupVault_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js deleted file mode 100644 index 6235728719e..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_host_group.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, hostGroup, hostGroupId) { - // [START netapp_v1_generated_NetApp_CreateHostGroup_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. Parent value for CreateHostGroupRequest - */ - // const parent = 'abc123' - /** - * Required. Fields of the host group to create. - */ - // const hostGroup = {} - /** - * Required. ID of the host group to create. Must be unique within the parent - * resource. Must contain only letters, numbers, and hyphen, with - * the first character a letter or underscore, the last a letter or underscore - * or a number, and a 63 character maximum. - */ - // const hostGroupId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateHostGroup() { - // Construct request - const request = { - parent, - hostGroup, - hostGroupId, - }; - - // Run request - const [operation] = await netappClient.createHostGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateHostGroup(); - // [END netapp_v1_generated_NetApp_CreateHostGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js deleted file mode 100644 index 3179e6f3acc..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_kms_config.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, kmsConfigId, kmsConfig) { - // [START netapp_v1_generated_NetApp_CreateKmsConfig_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 KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const kmsConfigId = 'abc123' - /** - * Required. The required parameters to create a new KmsConfig. - */ - // const kmsConfig = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateKmsConfig() { - // Construct request - const request = { - parent, - kmsConfigId, - kmsConfig, - }; - - // Run request - const [operation] = await netappClient.createKmsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateKmsConfig(); - // [END netapp_v1_generated_NetApp_CreateKmsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js deleted file mode 100644 index 8a2fcbc803a..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_quota_rule.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, quotaRule, quotaRuleId) { - // [START netapp_v1_generated_NetApp_CreateQuotaRule_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. Parent value for CreateQuotaRuleRequest - */ - // const parent = 'abc123' - /** - * Required. Fields of the to be created quota rule. - */ - // const quotaRule = {} - /** - * Required. ID of the quota rule to create. Must be unique within the parent - * resource. Must contain only letters, numbers, underscore and hyphen, with - * the first character a letter or underscore, the last a letter or underscore - * or a number, and a 63 character maximum. - */ - // const quotaRuleId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateQuotaRule() { - // Construct request - const request = { - parent, - quotaRule, - quotaRuleId, - }; - - // Run request - const [operation] = await netappClient.createQuotaRule(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateQuotaRule(); - // [END netapp_v1_generated_NetApp_CreateQuotaRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js deleted file mode 100644 index 4d464edbcb5..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_replication.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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, replication, replicationId) { - // [START netapp_v1_generated_NetApp_CreateReplication_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 NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - */ - // const parent = 'abc123' - /** - * Required. A replication resource - */ - // const replication = {} - /** - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const replicationId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateReplication() { - // Construct request - const request = { - parent, - replication, - replicationId, - }; - - // Run request - const [operation] = await netappClient.createReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateReplication(); - // [END netapp_v1_generated_NetApp_CreateReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js deleted file mode 100644 index d163e256b51..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_snapshot.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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, snapshot, snapshotId) { - // [START netapp_v1_generated_NetApp_CreateSnapshot_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 NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - */ - // const parent = 'abc123' - /** - * Required. A snapshot resource - */ - // const snapshot = {} - /** - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - */ - // const snapshotId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateSnapshot() { - // Construct request - const request = { - parent, - snapshot, - snapshotId, - }; - - // Run request - const [operation] = await netappClient.createSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateSnapshot(); - // [END netapp_v1_generated_NetApp_CreateSnapshot_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js deleted file mode 100644 index 1ed7da5d9c5..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_storage_pool.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, storagePoolId, storagePool) { - // [START netapp_v1_generated_NetApp_CreateStoragePool_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 storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - */ - // const storagePoolId = 'abc123' - /** - * Required. The required parameters to create a new storage pool. - */ - // const storagePool = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateStoragePool() { - // Construct request - const request = { - parent, - storagePoolId, - storagePool, - }; - - // Run request - const [operation] = await netappClient.createStoragePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateStoragePool(); - // [END netapp_v1_generated_NetApp_CreateStoragePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js deleted file mode 100644 index bf1f3730f97..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.create_volume.js +++ /dev/null @@ -1,75 +0,0 @@ -// 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, volumeId, volume) { - // [START netapp_v1_generated_NetApp_CreateVolume_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 volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - */ - // const volumeId = 'abc123' - /** - * Required. The volume being created. - */ - // const volume = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callCreateVolume() { - // Construct request - const request = { - parent, - volumeId, - volume, - }; - - // Run request - const [operation] = await netappClient.createVolume(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateVolume(); - // [END netapp_v1_generated_NetApp_CreateVolume_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js deleted file mode 100644 index 026fd08a065..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_active_directory.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteActiveDirectory_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 active directory. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteActiveDirectory() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteActiveDirectory(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteActiveDirectory(); - // [END netapp_v1_generated_NetApp_DeleteActiveDirectory_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js deleted file mode 100644 index 56b108461d1..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteBackup() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackup(); - // [END netapp_v1_generated_NetApp_DeleteBackup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js deleted file mode 100644 index f481f2ae0d4..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_policy.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteBackupPolicy_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 policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteBackupPolicy() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteBackupPolicy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackupPolicy(); - // [END netapp_v1_generated_NetApp_DeleteBackupPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js deleted file mode 100644 index 71ab3f2f35a..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_backup_vault.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteBackupVault() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackupVault(); - // [END netapp_v1_generated_NetApp_DeleteBackupVault_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js deleted file mode 100644 index 556e9af3831..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_host_group.js +++ /dev/null @@ -1,64 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteHostGroup_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 host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteHostGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteHostGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteHostGroup(); - // [END netapp_v1_generated_NetApp_DeleteHostGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js deleted file mode 100644 index d731aa65b1c..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_kms_config.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteKmsConfig_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 KmsConfig. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteKmsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteKmsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteKmsConfig(); - // [END netapp_v1_generated_NetApp_DeleteKmsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js deleted file mode 100644 index 69966182a7d..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_quota_rule.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteQuotaRule_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 quota rule. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteQuotaRule() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteQuotaRule(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteQuotaRule(); - // [END netapp_v1_generated_NetApp_DeleteQuotaRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js deleted file mode 100644 index aaac2d37bb8..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_replication.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteReplication_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 replication resource name, in the format - * `projects/* /locations/* /volumes/* /replications/{replication_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteReplication() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteReplication(); - // [END netapp_v1_generated_NetApp_DeleteReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js deleted file mode 100644 index cf8ad05fe76..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_snapshot.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteSnapshot_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 snapshot resource name, in the format - * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteSnapshot() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteSnapshot(); - // [END netapp_v1_generated_NetApp_DeleteSnapshot_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js deleted file mode 100644 index afc3830ff1c..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteStoragePool_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 storage pool - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteStoragePool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteStoragePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteStoragePool(); - // [END netapp_v1_generated_NetApp_DeleteStoragePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js deleted file mode 100644 index 8481dbc64f1..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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 netapp_v1_generated_NetApp_DeleteVolume_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 volume - */ - // const name = 'abc123' - /** - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - */ - // const force = true - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callDeleteVolume() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.deleteVolume(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteVolume(); - // [END netapp_v1_generated_NetApp_DeleteVolume_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js deleted file mode 100644 index f796cd89097..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_EncryptVolumes_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 KmsConfig. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callEncryptVolumes() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.encryptVolumes(request); - const [response] = await operation.promise(); - console.log(response); - } - - callEncryptVolumes(); - // [END netapp_v1_generated_NetApp_EncryptVolumes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js deleted file mode 100644 index 5efbe9f51bf..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js +++ /dev/null @@ -1,85 +0,0 @@ -// 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, peerClusterName, peerSvmName, peerVolumeName) { - // [START netapp_v1_generated_NetApp_EstablishPeering_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 replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - */ - // const name = 'abc123' - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - */ - // const peerClusterName = 'abc123' - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - */ - // const peerSvmName = 'abc123' - /** - * Optional. List of IPv4 ip addresses to be used for peering. - */ - // const peerIpAddresses = ['abc','def'] - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - */ - // const peerVolumeName = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callEstablishPeering() { - // Construct request - const request = { - name, - peerClusterName, - peerSvmName, - peerVolumeName, - }; - - // Run request - const [operation] = await netappClient.establishPeering(request); - const [response] = await operation.promise(); - console.log(response); - } - - callEstablishPeering(); - // [END netapp_v1_generated_NetApp_EstablishPeering_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js deleted file mode 100644 index ed07a5a18da..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetActiveDirectory_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 active directory. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetActiveDirectory() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getActiveDirectory(request); - console.log(response); - } - - callGetActiveDirectory(); - // [END netapp_v1_generated_NetApp_GetActiveDirectory_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js deleted file mode 100644 index 1df7b977650..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetBackup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getBackup(request); - console.log(response); - } - - callGetBackup(); - // [END netapp_v1_generated_NetApp_GetBackup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js deleted file mode 100644 index 6f793387d6e..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetBackupPolicy_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 backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetBackupPolicy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getBackupPolicy(request); - console.log(response); - } - - callGetBackupPolicy(); - // [END netapp_v1_generated_NetApp_GetBackupPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js deleted file mode 100644 index f1ae1d89ccb..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_backup_vault.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetBackupVault() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getBackupVault(request); - console.log(response); - } - - callGetBackupVault(); - // [END netapp_v1_generated_NetApp_GetBackupVault_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js deleted file mode 100644 index c62fdf4462c..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_host_group.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetHostGroup_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 host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetHostGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getHostGroup(request); - console.log(response); - } - - callGetHostGroup(); - // [END netapp_v1_generated_NetApp_GetHostGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js deleted file mode 100644 index 5c73e47c56e..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_kms_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetKmsConfig_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 KmsConfig - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetKmsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getKmsConfig(request); - console.log(response); - } - - callGetKmsConfig(); - // [END netapp_v1_generated_NetApp_GetKmsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js deleted file mode 100644 index da422de8eac..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_quota_rule.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetQuotaRule_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 quota rule - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetQuotaRule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getQuotaRule(request); - console.log(response); - } - - callGetQuotaRule(); - // [END netapp_v1_generated_NetApp_GetQuotaRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js deleted file mode 100644 index c361cc95339..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_replication.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetReplication_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 replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetReplication() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getReplication(request); - console.log(response); - } - - callGetReplication(); - // [END netapp_v1_generated_NetApp_GetReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js deleted file mode 100644 index e245487ab72..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_snapshot.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetSnapshot_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 snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetSnapshot() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getSnapshot(request); - console.log(response); - } - - callGetSnapshot(); - // [END netapp_v1_generated_NetApp_GetSnapshot_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js deleted file mode 100644 index 0230baccdba..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_storage_pool.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetStoragePool_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 storage pool - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetStoragePool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getStoragePool(request); - console.log(response); - } - - callGetStoragePool(); - // [END netapp_v1_generated_NetApp_GetStoragePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js deleted file mode 100644 index 1cb55342a02..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.get_volume.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_GetVolume_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 volume - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callGetVolume() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.getVolume(request); - console.log(response); - } - - callGetVolume(); - // [END netapp_v1_generated_NetApp_GetVolume_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js deleted file mode 100644 index 0484db94a8a..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_active_directories.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListActiveDirectories_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. Parent value for ListActiveDirectoriesRequest - */ - // const parent = 'abc123' - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Filtering results - */ - // const filter = 'abc123' - /** - * Hint for how to order the results - */ - // const orderBy = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListActiveDirectories() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listActiveDirectoriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListActiveDirectories(); - // [END netapp_v1_generated_NetApp_ListActiveDirectories_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js deleted file mode 100644 index 227fb6101e2..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_policies.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListBackupPolicies_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. Parent value for ListBackupPoliciesRequest - */ - // const parent = 'abc123' - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Filtering results - */ - // const filter = 'abc123' - /** - * Hint for how to order the results - */ - // const orderBy = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListBackupPolicies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listBackupPoliciesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackupPolicies(); - // [END netapp_v1_generated_NetApp_ListBackupPolicies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js deleted file mode 100644 index aaf31aa628d..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backup_vaults.js +++ /dev/null @@ -1,82 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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 location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - */ - // const orderBy = 'abc123' - /** - * List filter. - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListBackupVaults() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listBackupVaultsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackupVaults(); - // [END netapp_v1_generated_NetApp_ListBackupVaults_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js deleted file mode 100644 index c8c1cc0884b..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_backups.js +++ /dev/null @@ -1,93 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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 backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - */ - // const orderBy = 'abc123' - /** - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListBackups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listBackupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackups(); - // [END netapp_v1_generated_NetApp_ListBackups_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js deleted file mode 100644 index 21481365263..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_host_groups.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListHostGroups_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. Parent value for ListHostGroupsRequest - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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. Filter to apply to the request. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results - */ - // const orderBy = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListHostGroups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listHostGroupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListHostGroups(); - // [END netapp_v1_generated_NetApp_ListHostGroups_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js deleted file mode 100644 index d945c624a76..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_kms_configs.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListKmsConfigs_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. Parent value - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - */ - // const orderBy = 'abc123' - /** - * List filter. - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListKmsConfigs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listKmsConfigsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListKmsConfigs(); - // [END netapp_v1_generated_NetApp_ListKmsConfigs_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js deleted file mode 100644 index d8126a8ca4b..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_quota_rules.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListQuotaRules_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. Parent value for ListQuotaRulesRequest - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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 Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListQuotaRules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listQuotaRulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListQuotaRules(); - // [END netapp_v1_generated_NetApp_ListQuotaRules_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js deleted file mode 100644 index b6594f636a6..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_replications.js +++ /dev/null @@ -1,82 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListReplications_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 volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - */ - // const orderBy = 'abc123' - /** - * List filter. - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListReplications() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listReplicationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListReplications(); - // [END netapp_v1_generated_NetApp_ListReplications_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js deleted file mode 100644 index fbd5af4d086..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_snapshots.js +++ /dev/null @@ -1,82 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListSnapshots_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 volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - */ - // const orderBy = 'abc123' - /** - * List filter. - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListSnapshots() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listSnapshotsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSnapshots(); - // [END netapp_v1_generated_NetApp_ListSnapshots_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js deleted file mode 100644 index 800fafad8c1..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_storage_pools.js +++ /dev/null @@ -1,81 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListStoragePools_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. Parent value - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of items to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - */ - // const pageToken = 'abc123' - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - */ - // const orderBy = 'abc123' - /** - * Optional. List filter. - */ - // const filter = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListStoragePools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listStoragePoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListStoragePools(); - // [END netapp_v1_generated_NetApp_ListStoragePools_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js deleted file mode 100644 index 28920d390bd..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.list_volumes.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ListVolumes_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. Parent value for ListVolumesRequest - */ - // const parent = 'abc123' - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Filtering results - */ - // const filter = 'abc123' - /** - * Hint for how to order the results - */ - // const orderBy = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callListVolumes() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = netappClient.listVolumesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListVolumes(); - // [END netapp_v1_generated_NetApp_ListVolumes_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js deleted file mode 100644 index 86ccb4f42e5..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.restore_backup_files.js +++ /dev/null @@ -1,80 +0,0 @@ -// 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, backup, fileList) { - // [START netapp_v1_generated_NetApp_RestoreBackupFiles_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 volume resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - */ - // const name = 'abc123' - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - */ - // const backup = 'abc123' - /** - * Required. List of files to be restored, specified by their absolute path in - * the source volume. - */ - // const fileList = ['abc','def'] - /** - * Optional. Absolute directory path in the destination volume. This is - * required if the `file_list` is provided. - */ - // const restoreDestinationPath = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callRestoreBackupFiles() { - // Construct request - const request = { - name, - backup, - fileList, - }; - - // Run request - const [operation] = await netappClient.restoreBackupFiles(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRestoreBackupFiles(); - // [END netapp_v1_generated_NetApp_RestoreBackupFiles_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js deleted file mode 100644 index c22c829ec70..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.resume_replication.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ResumeReplication_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 replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callResumeReplication() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.resumeReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callResumeReplication(); - // [END netapp_v1_generated_NetApp_ResumeReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js deleted file mode 100644 index 3315b725171..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.reverse_replication_direction.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ReverseReplicationDirection_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 replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callReverseReplicationDirection() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.reverseReplicationDirection(request); - const [response] = await operation.promise(); - console.log(response); - } - - callReverseReplicationDirection(); - // [END netapp_v1_generated_NetApp_ReverseReplicationDirection_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js deleted file mode 100644 index 25a14933085..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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, snapshotId) { - // [START netapp_v1_generated_NetApp_RevertVolume_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 volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - */ - // const name = 'abc123' - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - */ - // const snapshotId = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callRevertVolume() { - // Construct request - const request = { - name, - snapshotId, - }; - - // Run request - const [operation] = await netappClient.revertVolume(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRevertVolume(); - // [END netapp_v1_generated_NetApp_RevertVolume_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js deleted file mode 100644 index 082c4ef16f0..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js +++ /dev/null @@ -1,72 +0,0 @@ -// 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 netapp_v1_generated_NetApp_StopReplication_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 replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - */ - // const name = 'abc123' - /** - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - */ - // const force = true - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callStopReplication() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.stopReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callStopReplication(); - // [END netapp_v1_generated_NetApp_StopReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js deleted file mode 100644 index 4e0012e739f..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js +++ /dev/null @@ -1,62 +0,0 @@ -// 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 netapp_v1_generated_NetApp_SwitchActiveReplicaZone_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 storage pool - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callSwitchActiveReplicaZone() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.switchActiveReplicaZone(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSwitchActiveReplicaZone(); - // [END netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js deleted file mode 100644 index 052fe2f3a20..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js +++ /dev/null @@ -1,63 +0,0 @@ -// 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 netapp_v1_generated_NetApp_SyncReplication_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 replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callSyncReplication() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.syncReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSyncReplication(); - // [END netapp_v1_generated_NetApp_SyncReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js deleted file mode 100644 index 406d7c67ee8..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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, activeDirectory) { - // [START netapp_v1_generated_NetApp_UpdateActiveDirectory_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 - * Active Directory 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 = {} - /** - * Required. The volume being updated - */ - // const activeDirectory = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateActiveDirectory() { - // Construct request - const request = { - updateMask, - activeDirectory, - }; - - // Run request - const [operation] = await netappClient.updateActiveDirectory(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateActiveDirectory(); - // [END netapp_v1_generated_NetApp_UpdateActiveDirectory_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js deleted file mode 100644 index df0f16f95be..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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 to be updated. - * 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 = {} - /** - * Required. The backup being updated - */ - // const backup = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateBackup() { - // Construct request - const request = { - updateMask, - backup, - }; - - // Run request - const [operation] = await netappClient.updateBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateBackup(); - // [END netapp_v1_generated_NetApp_UpdateBackup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js deleted file mode 100644 index 12f9961ff23..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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, backupPolicy) { - // [START netapp_v1_generated_NetApp_UpdateBackupPolicy_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 Policy 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 = {} - /** - * Required. The backup policy being updated - */ - // const backupPolicy = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateBackupPolicy() { - // Construct request - const request = { - updateMask, - backupPolicy, - }; - - // Run request - const [operation] = await netappClient.updateBackupPolicy(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateBackupPolicy(); - // [END netapp_v1_generated_NetApp_UpdateBackupPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js deleted file mode 100644 index 8e259da98b6..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_backup_vault.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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 netapp_v1_generated_NetApp_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 - * Backup resource to be updated. - * 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 = {} - /** - * Required. The backupVault being updated - */ - // const backupVault = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateBackupVault() { - // Construct request - const request = { - updateMask, - backupVault, - }; - - // Run request - const [operation] = await netappClient.updateBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateBackupVault(); - // [END netapp_v1_generated_NetApp_UpdateBackupVault_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js deleted file mode 100644 index 5a5999afcd6..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_host_group.js +++ /dev/null @@ -1,69 +0,0 @@ -// 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(hostGroup) { - // [START netapp_v1_generated_NetApp_UpdateHostGroup_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 host group to update. - * The host group's `name` field is used to identify the host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - */ - // const hostGroup = {} - /** - * Optional. The list of fields to update. - */ - // const updateMask = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateHostGroup() { - // Construct request - const request = { - hostGroup, - }; - - // Run request - const [operation] = await netappClient.updateHostGroup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateHostGroup(); - // [END netapp_v1_generated_NetApp_UpdateHostGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js deleted file mode 100644 index 0d66a76ec28..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_kms_config.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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, kmsConfig) { - // [START netapp_v1_generated_NetApp_UpdateKmsConfig_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 - * KmsConfig 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 = {} - /** - * Required. The KmsConfig being updated - */ - // const kmsConfig = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateKmsConfig() { - // Construct request - const request = { - updateMask, - kmsConfig, - }; - - // Run request - const [operation] = await netappClient.updateKmsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateKmsConfig(); - // [END netapp_v1_generated_NetApp_UpdateKmsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js deleted file mode 100644 index 319588346dc..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_quota_rule.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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(quotaRule) { - // [START netapp_v1_generated_NetApp_UpdateQuotaRule_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. Field mask is used to specify the fields to be overwritten in the - * Quota Rule 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 = {} - /** - * Required. The quota rule being updated - */ - // const quotaRule = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateQuotaRule() { - // Construct request - const request = { - quotaRule, - }; - - // Run request - const [operation] = await netappClient.updateQuotaRule(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateQuotaRule(); - // [END netapp_v1_generated_NetApp_UpdateQuotaRule_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js deleted file mode 100644 index 284b283aa62..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_replication.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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, replication) { - // [START netapp_v1_generated_NetApp_UpdateReplication_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. A replication resource - */ - // const replication = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateReplication() { - // Construct request - const request = { - updateMask, - replication, - }; - - // Run request - const [operation] = await netappClient.updateReplication(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateReplication(); - // [END netapp_v1_generated_NetApp_UpdateReplication_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js deleted file mode 100644 index 75e061925db..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_snapshot.js +++ /dev/null @@ -1,68 +0,0 @@ -// 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, snapshot) { - // [START netapp_v1_generated_NetApp_UpdateSnapshot_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. A snapshot resource - */ - // const snapshot = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateSnapshot() { - // Construct request - const request = { - updateMask, - snapshot, - }; - - // Run request - const [operation] = await netappClient.updateSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateSnapshot(); - // [END netapp_v1_generated_NetApp_UpdateSnapshot_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js deleted file mode 100644 index b660c800b01..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_storage_pool.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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, storagePool) { - // [START netapp_v1_generated_NetApp_UpdateStoragePool_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 - * StoragePool 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 = {} - /** - * Required. The pool being updated - */ - // const storagePool = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateStoragePool() { - // Construct request - const request = { - updateMask, - storagePool, - }; - - // Run request - const [operation] = await netappClient.updateStoragePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateStoragePool(); - // [END netapp_v1_generated_NetApp_UpdateStoragePool_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js deleted file mode 100644 index 77dcc920375..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.update_volume.js +++ /dev/null @@ -1,71 +0,0 @@ -// 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, volume) { - // [START netapp_v1_generated_NetApp_UpdateVolume_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 - * Volume 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 = {} - /** - * Required. The volume being updated - */ - // const volume = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callUpdateVolume() { - // Construct request - const request = { - updateMask, - volume, - }; - - // Run request - const [operation] = await netappClient.updateVolume(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateVolume(); - // [END netapp_v1_generated_NetApp_UpdateVolume_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js deleted file mode 100644 index 716d084a7e3..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.validate_directory_service.js +++ /dev/null @@ -1,66 +0,0 @@ -// 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 netapp_v1_generated_NetApp_ValidateDirectoryService_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 storage pool - */ - // const name = 'abc123' - /** - * Type of directory service policy attached to the storage pool. - */ - // const directoryServiceType = {} - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callValidateDirectoryService() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await netappClient.validateDirectoryService(request); - const [response] = await operation.promise(); - console.log(response); - } - - callValidateDirectoryService(); - // [END netapp_v1_generated_NetApp_ValidateDirectoryService_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js deleted file mode 100644 index 0c6efa97c71..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.verify_kms_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// 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 netapp_v1_generated_NetApp_VerifyKmsConfig_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 KMS Config to be verified. - */ - // const name = 'abc123' - - // Imports the Netapp library - const {NetAppClient} = require('@google-cloud/netapp').v1; - - // Instantiates a client - const netappClient = new NetAppClient(); - - async function callVerifyKmsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await netappClient.verifyKmsConfig(request); - console.log(response); - } - - callVerifyKmsConfig(); - // [END netapp_v1_generated_NetApp_VerifyKmsConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json deleted file mode 100644 index 64d94420465..00000000000 --- a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json +++ /dev/null @@ -1,3231 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-netapp", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.netapp.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "netapp_v1_generated_NetApp_ListStoragePools_async", - "title": "NetApp listStoragePools Sample", - "origin": "API_DEFINITION", - "description": " Returns descriptions of all storage pools owned by the caller.", - "canonical": true, - "file": "net_app.list_storage_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListStoragePools", - "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListStoragePoolsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListStoragePools", - "fullName": "google.cloud.netapp.v1.NetApp.ListStoragePools", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateStoragePool_async", - "title": "NetApp createStoragePool Sample", - "origin": "API_DEFINITION", - "description": " Creates a new storage pool.", - "canonical": true, - "file": "net_app.create_storage_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "storage_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "storage_pool", - "type": ".google.cloud.netapp.v1.StoragePool" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.CreateStoragePool", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetStoragePool_async", - "title": "NetApp getStoragePool Sample", - "origin": "API_DEFINITION", - "description": " Returns the description of the specified storage pool by poolId.", - "canonical": true, - "file": "net_app.get_storage_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.StoragePool", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.GetStoragePool", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateStoragePool_async", - "title": "NetApp updateStoragePool Sample", - "origin": "API_DEFINITION", - "description": " Updates the storage pool properties with the full spec", - "canonical": true, - "file": "net_app.update_storage_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "storage_pool", - "type": ".google.cloud.netapp.v1.StoragePool" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateStoragePool", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteStoragePool_async", - "title": "NetApp deleteStoragePool Sample", - "origin": "API_DEFINITION", - "description": " Warning! This operation will permanently delete the storage pool.", - "canonical": true, - "file": "net_app.delete_storage_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteStoragePool", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteStoragePool", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ValidateDirectoryService_async", - "title": "NetApp validateDirectoryService Sample", - "origin": "API_DEFINITION", - "description": " ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.", - "canonical": true, - "file": "net_app.validate_directory_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ValidateDirectoryService", - "fullName": "google.cloud.netapp.v1.NetApp.ValidateDirectoryService", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "directory_service_type", - "type": ".google.cloud.netapp.v1.DirectoryServiceType" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ValidateDirectoryService", - "fullName": "google.cloud.netapp.v1.NetApp.ValidateDirectoryService", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async", - "title": "NetApp switchActiveReplicaZone Sample", - "origin": "API_DEFINITION", - "description": " This operation will switch the active/replica zone for a regional storagePool.", - "canonical": true, - "file": "net_app.switch_active_replica_zone.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SwitchActiveReplicaZone", - "fullName": "google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZone", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "SwitchActiveReplicaZone", - "fullName": "google.cloud.netapp.v1.NetApp.SwitchActiveReplicaZone", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListVolumes_async", - "title": "NetApp listVolumes Sample", - "origin": "API_DEFINITION", - "description": " Lists Volumes in a given project.", - "canonical": true, - "file": "net_app.list_volumes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVolumes", - "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListVolumesResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListVolumes", - "fullName": "google.cloud.netapp.v1.NetApp.ListVolumes", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetVolume_async", - "title": "NetApp getVolume Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Volume.", - "canonical": true, - "file": "net_app.get_volume.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVolume", - "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.Volume", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetVolume", - "fullName": "google.cloud.netapp.v1.NetApp.GetVolume", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateVolume_async", - "title": "NetApp createVolume Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Volume in a given project and location.", - "canonical": true, - "file": "net_app.create_volume.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateVolume", - "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "volume_id", - "type": "TYPE_STRING" - }, - { - "name": "volume", - "type": ".google.cloud.netapp.v1.Volume" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateVolume", - "fullName": "google.cloud.netapp.v1.NetApp.CreateVolume", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateVolume_async", - "title": "NetApp updateVolume Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Volume.", - "canonical": true, - "file": "net_app.update_volume.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateVolume", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "volume", - "type": ".google.cloud.netapp.v1.Volume" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateVolume", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateVolume", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteVolume_async", - "title": "NetApp deleteVolume Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Volume.", - "canonical": true, - "file": "net_app.delete_volume.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteVolume", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteVolume", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteVolume", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_RevertVolume_async", - "title": "NetApp revertVolume Sample", - "origin": "API_DEFINITION", - "description": " Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.", - "canonical": true, - "file": "net_app.revert_volume.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RevertVolume", - "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "RevertVolume", - "fullName": "google.cloud.netapp.v1.NetApp.RevertVolume", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_EstablishVolumePeering_async", - "title": "NetApp establishVolumePeering Sample", - "origin": "API_DEFINITION", - "description": " Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.", - "canonical": true, - "file": "net_app.establish_volume_peering.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "EstablishVolumePeering", - "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "peer_cluster_name", - "type": "TYPE_STRING" - }, - { - "name": "peer_svm_name", - "type": "TYPE_STRING" - }, - { - "name": "peer_ip_addresses", - "type": "TYPE_STRING[]" - }, - { - "name": "peer_volume_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "EstablishVolumePeering", - "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListSnapshots_async", - "title": "NetApp listSnapshots Sample", - "origin": "API_DEFINITION", - "description": " Returns descriptions of all snapshots for a volume.", - "canonical": true, - "file": "net_app.list_snapshots.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSnapshots", - "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListSnapshotsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListSnapshots", - "fullName": "google.cloud.netapp.v1.NetApp.ListSnapshots", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetSnapshot_async", - "title": "NetApp getSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Describe a snapshot for a volume.", - "canonical": true, - "file": "net_app.get_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.Snapshot", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.GetSnapshot", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateSnapshot_async", - "title": "NetApp createSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Create a new snapshot for a volume.", - "canonical": true, - "file": "net_app.create_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "snapshot", - "type": ".google.cloud.netapp.v1.Snapshot" - }, - { - "name": "snapshot_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.CreateSnapshot", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteSnapshot_async", - "title": "NetApp deleteSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Deletes a snapshot.", - "canonical": true, - "file": "net_app.delete_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteSnapshot", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateSnapshot_async", - "title": "NetApp updateSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a specific snapshot.", - "canonical": true, - "file": "net_app.update_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "snapshot", - "type": ".google.cloud.netapp.v1.Snapshot" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateSnapshot", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateSnapshot", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListActiveDirectories_async", - "title": "NetApp listActiveDirectories Sample", - "origin": "API_DEFINITION", - "description": " Lists active directories.", - "canonical": true, - "file": "net_app.list_active_directories.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListActiveDirectories", - "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListActiveDirectoriesResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListActiveDirectories", - "fullName": "google.cloud.netapp.v1.NetApp.ListActiveDirectories", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetActiveDirectory_async", - "title": "NetApp getActiveDirectory Sample", - "origin": "API_DEFINITION", - "description": " Describes a specified active directory.", - "canonical": true, - "file": "net_app.get_active_directory.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ActiveDirectory", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.GetActiveDirectory", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateActiveDirectory_async", - "title": "NetApp createActiveDirectory Sample", - "origin": "API_DEFINITION", - "description": " CreateActiveDirectory Creates the active directory specified in the request.", - "canonical": true, - "file": "net_app.create_active_directory.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "active_directory", - "type": ".google.cloud.netapp.v1.ActiveDirectory" - }, - { - "name": "active_directory_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.CreateActiveDirectory", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateActiveDirectory_async", - "title": "NetApp updateActiveDirectory Sample", - "origin": "API_DEFINITION", - "description": " Update the parameters of an active directories.", - "canonical": true, - "file": "net_app.update_active_directory.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "active_directory", - "type": ".google.cloud.netapp.v1.ActiveDirectory" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateActiveDirectory", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteActiveDirectory_async", - "title": "NetApp deleteActiveDirectory Sample", - "origin": "API_DEFINITION", - "description": " Delete the active directory specified in the request.", - "canonical": true, - "file": "net_app.delete_active_directory.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteActiveDirectory", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteActiveDirectory", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListKmsConfigs_async", - "title": "NetApp listKmsConfigs Sample", - "origin": "API_DEFINITION", - "description": " Returns descriptions of all KMS configs owned by the caller.", - "canonical": true, - "file": "net_app.list_kms_configs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListKmsConfigs", - "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListKmsConfigsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListKmsConfigs", - "fullName": "google.cloud.netapp.v1.NetApp.ListKmsConfigs", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateKmsConfig_async", - "title": "NetApp createKmsConfig Sample", - "origin": "API_DEFINITION", - "description": " Creates a new KMS config.", - "canonical": true, - "file": "net_app.create_kms_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "kms_config_id", - "type": "TYPE_STRING" - }, - { - "name": "kms_config", - "type": ".google.cloud.netapp.v1.KmsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.CreateKmsConfig", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetKmsConfig_async", - "title": "NetApp getKmsConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns the description of the specified KMS config by kms_config_id.", - "canonical": true, - "file": "net_app.get_kms_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.KmsConfig", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.GetKmsConfig", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateKmsConfig_async", - "title": "NetApp updateKmsConfig Sample", - "origin": "API_DEFINITION", - "description": " Updates the Kms config properties with the full spec", - "canonical": true, - "file": "net_app.update_kms_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "kms_config", - "type": ".google.cloud.netapp.v1.KmsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateKmsConfig", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_EncryptVolumes_async", - "title": "NetApp encryptVolumes Sample", - "origin": "API_DEFINITION", - "description": " Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.", - "canonical": true, - "file": "net_app.encrypt_volumes.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "EncryptVolumes", - "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "EncryptVolumes", - "fullName": "google.cloud.netapp.v1.NetApp.EncryptVolumes", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_VerifyKmsConfig_async", - "title": "NetApp verifyKmsConfig Sample", - "origin": "API_DEFINITION", - "description": " Verifies KMS config reachability.", - "canonical": true, - "file": "net_app.verify_kms_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "VerifyKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.VerifyKmsConfigResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "VerifyKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.VerifyKmsConfig", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteKmsConfig_async", - "title": "NetApp deleteKmsConfig Sample", - "origin": "API_DEFINITION", - "description": " Warning! This operation will permanently delete the Kms config.", - "canonical": true, - "file": "net_app.delete_kms_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteKmsConfig", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteKmsConfig", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListReplications_async", - "title": "NetApp listReplications Sample", - "origin": "API_DEFINITION", - "description": " Returns descriptions of all replications for a volume.", - "canonical": true, - "file": "net_app.list_replications.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListReplications", - "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListReplicationsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListReplications", - "fullName": "google.cloud.netapp.v1.NetApp.ListReplications", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetReplication_async", - "title": "NetApp getReplication Sample", - "origin": "API_DEFINITION", - "description": " Describe a replication for a volume.", - "canonical": true, - "file": "net_app.get_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetReplication", - "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.Replication", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetReplication", - "fullName": "google.cloud.netapp.v1.NetApp.GetReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateReplication_async", - "title": "NetApp createReplication Sample", - "origin": "API_DEFINITION", - "description": " Create a new replication for a volume.", - "canonical": true, - "file": "net_app.create_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateReplication", - "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "replication", - "type": ".google.cloud.netapp.v1.Replication" - }, - { - "name": "replication_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateReplication", - "fullName": "google.cloud.netapp.v1.NetApp.CreateReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteReplication_async", - "title": "NetApp deleteReplication Sample", - "origin": "API_DEFINITION", - "description": " Deletes a replication.", - "canonical": true, - "file": "net_app.delete_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteReplication", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteReplication", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateReplication_async", - "title": "NetApp updateReplication Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a specific replication.", - "canonical": true, - "file": "net_app.update_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateReplication", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "replication", - "type": ".google.cloud.netapp.v1.Replication" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateReplication", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_StopReplication_async", - "title": "NetApp stopReplication Sample", - "origin": "API_DEFINITION", - "description": " Stop Cross Region Replication.", - "canonical": true, - "file": "net_app.stop_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopReplication", - "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "StopReplication", - "fullName": "google.cloud.netapp.v1.NetApp.StopReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ResumeReplication_async", - "title": "NetApp resumeReplication Sample", - "origin": "API_DEFINITION", - "description": " Resume Cross Region Replication.", - "canonical": true, - "file": "net_app.resume_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ResumeReplication", - "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ResumeReplication", - "fullName": "google.cloud.netapp.v1.NetApp.ResumeReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ReverseReplicationDirection_async", - "title": "NetApp reverseReplicationDirection Sample", - "origin": "API_DEFINITION", - "description": " Reverses direction of replication. Source becomes destination and destination becomes source.", - "canonical": true, - "file": "net_app.reverse_replication_direction.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReverseReplicationDirection", - "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ReverseReplicationDirection", - "fullName": "google.cloud.netapp.v1.NetApp.ReverseReplicationDirection", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_EstablishPeering_async", - "title": "NetApp establishPeering Sample", - "origin": "API_DEFINITION", - "description": " Establish replication peering.", - "canonical": true, - "file": "net_app.establish_peering.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "EstablishPeering", - "fullName": "google.cloud.netapp.v1.NetApp.EstablishPeering", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "peer_cluster_name", - "type": "TYPE_STRING" - }, - { - "name": "peer_svm_name", - "type": "TYPE_STRING" - }, - { - "name": "peer_ip_addresses", - "type": "TYPE_STRING[]" - }, - { - "name": "peer_volume_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "EstablishPeering", - "fullName": "google.cloud.netapp.v1.NetApp.EstablishPeering", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_SyncReplication_async", - "title": "NetApp syncReplication Sample", - "origin": "API_DEFINITION", - "description": " Syncs the replication. This will invoke one time volume data transfer from source to destination.", - "canonical": true, - "file": "net_app.sync_replication.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SyncReplication", - "fullName": "google.cloud.netapp.v1.NetApp.SyncReplication", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "SyncReplication", - "fullName": "google.cloud.netapp.v1.NetApp.SyncReplication", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateBackupVault_async", - "title": "NetApp createBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Creates new backup vault", - "canonical": true, - "file": "net_app.create_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupVault", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault", - "type": ".google.cloud.netapp.v1.BackupVault" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupVault", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetBackupVault_async", - "title": "NetApp getBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Returns the description of the specified backup vault", - "canonical": true, - "file": "net_app.get_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.BackupVault", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackupVault", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListBackupVaults_async", - "title": "NetApp listBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " Returns list of all available backup vaults.", - "canonical": true, - "file": "net_app.list_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackupVaults", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListBackupVaultsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackupVaults", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateBackupVault_async", - "title": "NetApp updateBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a specific backup vault.", - "canonical": true, - "file": "net_app.update_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupVault", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup_vault", - "type": ".google.cloud.netapp.v1.BackupVault" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupVault", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteBackupVault_async", - "title": "NetApp deleteBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Warning! This operation will permanently delete the backup vault.", - "canonical": true, - "file": "net_app.delete_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupVault", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateBackup_async", - "title": "NetApp createBackup Sample", - "origin": "API_DEFINITION", - "description": " Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.", - "canonical": true, - "file": "net_app.create_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackup", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": ".google.cloud.netapp.v1.Backup" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateBackup", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetBackup_async", - "title": "NetApp getBackup Sample", - "origin": "API_DEFINITION", - "description": " Returns the description of the specified backup", - "canonical": true, - "file": "net_app.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.Backup", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListBackups_async", - "title": "NetApp listBackups Sample", - "origin": "API_DEFINITION", - "description": " Returns descriptions of all backups for a backupVault.", - "canonical": true, - "file": "net_app.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListBackupsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackups", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteBackup_async", - "title": "NetApp deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Warning! This operation will permanently delete the backup.", - "canonical": true, - "file": "net_app.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateBackup_async", - "title": "NetApp updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Update backup with full spec.", - "canonical": true, - "file": "net_app.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup", - "type": ".google.cloud.netapp.v1.Backup" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateBackupPolicy_async", - "title": "NetApp createBackupPolicy Sample", - "origin": "API_DEFINITION", - "description": " Creates new backup policy", - "canonical": true, - "file": "net_app.create_backup_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupPolicy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_policy", - "type": ".google.cloud.netapp.v1.BackupPolicy" - }, - { - "name": "backup_policy_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.CreateBackupPolicy", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetBackupPolicy_async", - "title": "NetApp getBackupPolicy Sample", - "origin": "API_DEFINITION", - "description": " Returns the description of the specified backup policy by backup_policy_id.", - "canonical": true, - "file": "net_app.get_backup_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackupPolicy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.BackupPolicy", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.GetBackupPolicy", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListBackupPolicies_async", - "title": "NetApp listBackupPolicies Sample", - "origin": "API_DEFINITION", - "description": " Returns list of all available backup policies.", - "canonical": true, - "file": "net_app.list_backup_policies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPolicies", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackupPolicies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListBackupPoliciesResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListBackupPolicies", - "fullName": "google.cloud.netapp.v1.NetApp.ListBackupPolicies", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateBackupPolicy_async", - "title": "NetApp updateBackupPolicy Sample", - "origin": "API_DEFINITION", - "description": " Updates settings of a specific backup policy.", - "canonical": true, - "file": "net_app.update_backup_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupPolicy", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup_policy", - "type": ".google.cloud.netapp.v1.BackupPolicy" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateBackupPolicy", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteBackupPolicy_async", - "title": "NetApp deleteBackupPolicy Sample", - "origin": "API_DEFINITION", - "description": " Warning! This operation will permanently delete the backup policy.", - "canonical": true, - "file": "net_app.delete_backup_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupPolicy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteBackupPolicy", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteBackupPolicy", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListQuotaRules_async", - "title": "NetApp listQuotaRules Sample", - "origin": "API_DEFINITION", - "description": " Returns list of all quota rules in a location.", - "canonical": true, - "file": "net_app.list_quota_rules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListQuotaRules", - "fullName": "google.cloud.netapp.v1.NetApp.ListQuotaRules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListQuotaRulesResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListQuotaRules", - "fullName": "google.cloud.netapp.v1.NetApp.ListQuotaRules", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetQuotaRule_async", - "title": "NetApp getQuotaRule Sample", - "origin": "API_DEFINITION", - "description": " Returns details of the specified quota rule.", - "canonical": true, - "file": "net_app.get_quota_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.GetQuotaRule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.QuotaRule", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.GetQuotaRule", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateQuotaRule_async", - "title": "NetApp createQuotaRule Sample", - "origin": "API_DEFINITION", - "description": " Creates a new quota rule.", - "canonical": true, - "file": "net_app.create_quota_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.CreateQuotaRule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "quota_rule", - "type": ".google.cloud.netapp.v1.QuotaRule" - }, - { - "name": "quota_rule_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.CreateQuotaRule", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateQuotaRule_async", - "title": "NetApp updateQuotaRule Sample", - "origin": "API_DEFINITION", - "description": " Updates a quota rule.", - "canonical": true, - "file": "net_app.update_quota_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateQuotaRule", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "quota_rule", - "type": ".google.cloud.netapp.v1.QuotaRule" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateQuotaRule", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteQuotaRule_async", - "title": "NetApp deleteQuotaRule Sample", - "origin": "API_DEFINITION", - "description": " Deletes a quota rule.", - "canonical": true, - "file": "net_app.delete_quota_rule.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteQuotaRule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteQuotaRule", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteQuotaRule", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_RestoreBackupFiles_async", - "title": "NetApp restoreBackupFiles Sample", - "origin": "API_DEFINITION", - "description": " Restore files from a backup to a volume.", - "canonical": true, - "file": "net_app.restore_backup_files.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreBackupFiles", - "fullName": "google.cloud.netapp.v1.NetApp.RestoreBackupFiles", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "backup", - "type": "TYPE_STRING" - }, - { - "name": "file_list", - "type": "TYPE_STRING[]" - }, - { - "name": "restore_destination_path", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "RestoreBackupFiles", - "fullName": "google.cloud.netapp.v1.NetApp.RestoreBackupFiles", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ListHostGroups_async", - "title": "NetApp listHostGroups Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.", - "canonical": true, - "file": "net_app.list_host_groups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListHostGroups", - "fullName": "google.cloud.netapp.v1.NetApp.ListHostGroups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ListHostGroupsResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ListHostGroups", - "fullName": "google.cloud.netapp.v1.NetApp.ListHostGroups", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_GetHostGroup_async", - "title": "NetApp getHostGroup Sample", - "origin": "API_DEFINITION", - "description": " Returns details of the specified host group.", - "canonical": true, - "file": "net_app.get_host_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.GetHostGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.HostGroup", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "GetHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.GetHostGroup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_CreateHostGroup_async", - "title": "NetApp createHostGroup Sample", - "origin": "API_DEFINITION", - "description": " Creates a new host group.", - "canonical": true, - "file": "net_app.create_host_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.CreateHostGroup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "host_group", - "type": ".google.cloud.netapp.v1.HostGroup" - }, - { - "name": "host_group_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "CreateHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.CreateHostGroup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_UpdateHostGroup_async", - "title": "NetApp updateHostGroup Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing host group.", - "canonical": true, - "file": "net_app.update_host_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateHostGroup", - "async": true, - "parameters": [ - { - "name": "host_group", - "type": ".google.cloud.netapp.v1.HostGroup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "UpdateHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.UpdateHostGroup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_DeleteHostGroup_async", - "title": "NetApp deleteHostGroup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a host group.", - "canonical": true, - "file": "net_app.delete_host_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteHostGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "DeleteHostGroup", - "fullName": "google.cloud.netapp.v1.NetApp.DeleteHostGroup", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPost_async", - "title": "NetApp executeOntapPost Sample", - "origin": "API_DEFINITION", - "description": " `ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.", - "canonical": true, - "file": "net_app.execute_ontap_post.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteOntapPost", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", - "async": true, - "parameters": [ - { - "name": "body", - "type": ".google.protobuf.Struct" - }, - { - "name": "ontap_path", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ExecuteOntapPostResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ExecuteOntapPost", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapGet_async", - "title": "NetApp executeOntapGet Sample", - "origin": "API_DEFINITION", - "description": " `ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.", - "canonical": true, - "file": "net_app.execute_ontap_get.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteOntapGet", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", - "async": true, - "parameters": [ - { - "name": "ontap_path", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ExecuteOntapGetResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ExecuteOntapGet", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapDelete_async", - "title": "NetApp executeOntapDelete Sample", - "origin": "API_DEFINITION", - "description": " `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.", - "canonical": true, - "file": "net_app.execute_ontap_delete.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteOntapDelete", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", - "async": true, - "parameters": [ - { - "name": "ontap_path", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ExecuteOntapDeleteResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ExecuteOntapDelete", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - }, - { - "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPatch_async", - "title": "NetApp executeOntapPatch Sample", - "origin": "API_DEFINITION", - "description": " `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.", - "canonical": true, - "file": "net_app.execute_ontap_patch.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteOntapPatch", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", - "async": true, - "parameters": [ - { - "name": "body", - "type": ".google.protobuf.Struct" - }, - { - "name": "ontap_path", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.netapp.v1.ExecuteOntapPatchResponse", - "client": { - "shortName": "NetAppClient", - "fullName": "google.cloud.netapp.v1.NetAppClient" - }, - "method": { - "shortName": "ExecuteOntapPatch", - "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", - "service": { - "shortName": "NetApp", - "fullName": "google.cloud.netapp.v1.NetApp" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-netapp/src/index.ts b/owl-bot-staging/google-cloud-netapp/src/index.ts deleted file mode 100644 index b6da2e85a4b..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2025 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 synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; - -const NetAppClient = v1.NetAppClient; -type NetAppClient = v1.NetAppClient; - -export {v1, NetAppClient}; -export default {v1, NetAppClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json deleted file mode 100644 index b605c7194aa..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/v1/gapic_metadata.json +++ /dev/null @@ -1,777 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.netapp.v1", - "libraryPackage": "@google-cloud/netapp", - "services": { - "NetApp": { - "clients": { - "grpc": { - "libraryClient": "NetAppClient", - "rpcs": { - "GetStoragePool": { - "methods": [ - "getStoragePool" - ] - }, - "GetVolume": { - "methods": [ - "getVolume" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "GetActiveDirectory": { - "methods": [ - "getActiveDirectory" - ] - }, - "GetKmsConfig": { - "methods": [ - "getKmsConfig" - ] - }, - "VerifyKmsConfig": { - "methods": [ - "verifyKmsConfig" - ] - }, - "GetReplication": { - "methods": [ - "getReplication" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPolicy": { - "methods": [ - "getBackupPolicy" - ] - }, - "GetQuotaRule": { - "methods": [ - "getQuotaRule" - ] - }, - "GetHostGroup": { - "methods": [ - "getHostGroup" - ] - }, - "ExecuteOntapPost": { - "methods": [ - "executeOntapPost" - ] - }, - "ExecuteOntapGet": { - "methods": [ - "executeOntapGet" - ] - }, - "ExecuteOntapDelete": { - "methods": [ - "executeOntapDelete" - ] - }, - "ExecuteOntapPatch": { - "methods": [ - "executeOntapPatch" - ] - }, - "CreateStoragePool": { - "methods": [ - "createStoragePool" - ] - }, - "UpdateStoragePool": { - "methods": [ - "updateStoragePool" - ] - }, - "DeleteStoragePool": { - "methods": [ - "deleteStoragePool" - ] - }, - "ValidateDirectoryService": { - "methods": [ - "validateDirectoryService" - ] - }, - "SwitchActiveReplicaZone": { - "methods": [ - "switchActiveReplicaZone" - ] - }, - "CreateVolume": { - "methods": [ - "createVolume" - ] - }, - "UpdateVolume": { - "methods": [ - "updateVolume" - ] - }, - "DeleteVolume": { - "methods": [ - "deleteVolume" - ] - }, - "RevertVolume": { - "methods": [ - "revertVolume" - ] - }, - "EstablishVolumePeering": { - "methods": [ - "establishVolumePeering" - ] - }, - "CreateSnapshot": { - "methods": [ - "createSnapshot" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "UpdateSnapshot": { - "methods": [ - "updateSnapshot" - ] - }, - "CreateActiveDirectory": { - "methods": [ - "createActiveDirectory" - ] - }, - "UpdateActiveDirectory": { - "methods": [ - "updateActiveDirectory" - ] - }, - "DeleteActiveDirectory": { - "methods": [ - "deleteActiveDirectory" - ] - }, - "CreateKmsConfig": { - "methods": [ - "createKmsConfig" - ] - }, - "UpdateKmsConfig": { - "methods": [ - "updateKmsConfig" - ] - }, - "EncryptVolumes": { - "methods": [ - "encryptVolumes" - ] - }, - "DeleteKmsConfig": { - "methods": [ - "deleteKmsConfig" - ] - }, - "CreateReplication": { - "methods": [ - "createReplication" - ] - }, - "DeleteReplication": { - "methods": [ - "deleteReplication" - ] - }, - "UpdateReplication": { - "methods": [ - "updateReplication" - ] - }, - "StopReplication": { - "methods": [ - "stopReplication" - ] - }, - "ResumeReplication": { - "methods": [ - "resumeReplication" - ] - }, - "ReverseReplicationDirection": { - "methods": [ - "reverseReplicationDirection" - ] - }, - "EstablishPeering": { - "methods": [ - "establishPeering" - ] - }, - "SyncReplication": { - "methods": [ - "syncReplication" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "CreateBackupPolicy": { - "methods": [ - "createBackupPolicy" - ] - }, - "UpdateBackupPolicy": { - "methods": [ - "updateBackupPolicy" - ] - }, - "DeleteBackupPolicy": { - "methods": [ - "deleteBackupPolicy" - ] - }, - "CreateQuotaRule": { - "methods": [ - "createQuotaRule" - ] - }, - "UpdateQuotaRule": { - "methods": [ - "updateQuotaRule" - ] - }, - "DeleteQuotaRule": { - "methods": [ - "deleteQuotaRule" - ] - }, - "RestoreBackupFiles": { - "methods": [ - "restoreBackupFiles" - ] - }, - "CreateHostGroup": { - "methods": [ - "createHostGroup" - ] - }, - "UpdateHostGroup": { - "methods": [ - "updateHostGroup" - ] - }, - "DeleteHostGroup": { - "methods": [ - "deleteHostGroup" - ] - }, - "ListStoragePools": { - "methods": [ - "listStoragePools", - "listStoragePoolsStream", - "listStoragePoolsAsync" - ] - }, - "ListVolumes": { - "methods": [ - "listVolumes", - "listVolumesStream", - "listVolumesAsync" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots", - "listSnapshotsStream", - "listSnapshotsAsync" - ] - }, - "ListActiveDirectories": { - "methods": [ - "listActiveDirectories", - "listActiveDirectoriesStream", - "listActiveDirectoriesAsync" - ] - }, - "ListKmsConfigs": { - "methods": [ - "listKmsConfigs", - "listKmsConfigsStream", - "listKmsConfigsAsync" - ] - }, - "ListReplications": { - "methods": [ - "listReplications", - "listReplicationsStream", - "listReplicationsAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPolicies": { - "methods": [ - "listBackupPolicies", - "listBackupPoliciesStream", - "listBackupPoliciesAsync" - ] - }, - "ListQuotaRules": { - "methods": [ - "listQuotaRules", - "listQuotaRulesStream", - "listQuotaRulesAsync" - ] - }, - "ListHostGroups": { - "methods": [ - "listHostGroups", - "listHostGroupsStream", - "listHostGroupsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "NetAppClient", - "rpcs": { - "GetStoragePool": { - "methods": [ - "getStoragePool" - ] - }, - "GetVolume": { - "methods": [ - "getVolume" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "GetActiveDirectory": { - "methods": [ - "getActiveDirectory" - ] - }, - "GetKmsConfig": { - "methods": [ - "getKmsConfig" - ] - }, - "VerifyKmsConfig": { - "methods": [ - "verifyKmsConfig" - ] - }, - "GetReplication": { - "methods": [ - "getReplication" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPolicy": { - "methods": [ - "getBackupPolicy" - ] - }, - "GetQuotaRule": { - "methods": [ - "getQuotaRule" - ] - }, - "GetHostGroup": { - "methods": [ - "getHostGroup" - ] - }, - "ExecuteOntapPost": { - "methods": [ - "executeOntapPost" - ] - }, - "ExecuteOntapGet": { - "methods": [ - "executeOntapGet" - ] - }, - "ExecuteOntapDelete": { - "methods": [ - "executeOntapDelete" - ] - }, - "ExecuteOntapPatch": { - "methods": [ - "executeOntapPatch" - ] - }, - "CreateStoragePool": { - "methods": [ - "createStoragePool" - ] - }, - "UpdateStoragePool": { - "methods": [ - "updateStoragePool" - ] - }, - "DeleteStoragePool": { - "methods": [ - "deleteStoragePool" - ] - }, - "ValidateDirectoryService": { - "methods": [ - "validateDirectoryService" - ] - }, - "SwitchActiveReplicaZone": { - "methods": [ - "switchActiveReplicaZone" - ] - }, - "CreateVolume": { - "methods": [ - "createVolume" - ] - }, - "UpdateVolume": { - "methods": [ - "updateVolume" - ] - }, - "DeleteVolume": { - "methods": [ - "deleteVolume" - ] - }, - "RevertVolume": { - "methods": [ - "revertVolume" - ] - }, - "EstablishVolumePeering": { - "methods": [ - "establishVolumePeering" - ] - }, - "CreateSnapshot": { - "methods": [ - "createSnapshot" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "UpdateSnapshot": { - "methods": [ - "updateSnapshot" - ] - }, - "CreateActiveDirectory": { - "methods": [ - "createActiveDirectory" - ] - }, - "UpdateActiveDirectory": { - "methods": [ - "updateActiveDirectory" - ] - }, - "DeleteActiveDirectory": { - "methods": [ - "deleteActiveDirectory" - ] - }, - "CreateKmsConfig": { - "methods": [ - "createKmsConfig" - ] - }, - "UpdateKmsConfig": { - "methods": [ - "updateKmsConfig" - ] - }, - "EncryptVolumes": { - "methods": [ - "encryptVolumes" - ] - }, - "DeleteKmsConfig": { - "methods": [ - "deleteKmsConfig" - ] - }, - "CreateReplication": { - "methods": [ - "createReplication" - ] - }, - "DeleteReplication": { - "methods": [ - "deleteReplication" - ] - }, - "UpdateReplication": { - "methods": [ - "updateReplication" - ] - }, - "StopReplication": { - "methods": [ - "stopReplication" - ] - }, - "ResumeReplication": { - "methods": [ - "resumeReplication" - ] - }, - "ReverseReplicationDirection": { - "methods": [ - "reverseReplicationDirection" - ] - }, - "EstablishPeering": { - "methods": [ - "establishPeering" - ] - }, - "SyncReplication": { - "methods": [ - "syncReplication" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "CreateBackupPolicy": { - "methods": [ - "createBackupPolicy" - ] - }, - "UpdateBackupPolicy": { - "methods": [ - "updateBackupPolicy" - ] - }, - "DeleteBackupPolicy": { - "methods": [ - "deleteBackupPolicy" - ] - }, - "CreateQuotaRule": { - "methods": [ - "createQuotaRule" - ] - }, - "UpdateQuotaRule": { - "methods": [ - "updateQuotaRule" - ] - }, - "DeleteQuotaRule": { - "methods": [ - "deleteQuotaRule" - ] - }, - "RestoreBackupFiles": { - "methods": [ - "restoreBackupFiles" - ] - }, - "CreateHostGroup": { - "methods": [ - "createHostGroup" - ] - }, - "UpdateHostGroup": { - "methods": [ - "updateHostGroup" - ] - }, - "DeleteHostGroup": { - "methods": [ - "deleteHostGroup" - ] - }, - "ListStoragePools": { - "methods": [ - "listStoragePools", - "listStoragePoolsStream", - "listStoragePoolsAsync" - ] - }, - "ListVolumes": { - "methods": [ - "listVolumes", - "listVolumesStream", - "listVolumesAsync" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots", - "listSnapshotsStream", - "listSnapshotsAsync" - ] - }, - "ListActiveDirectories": { - "methods": [ - "listActiveDirectories", - "listActiveDirectoriesStream", - "listActiveDirectoriesAsync" - ] - }, - "ListKmsConfigs": { - "methods": [ - "listKmsConfigs", - "listKmsConfigsStream", - "listKmsConfigsAsync" - ] - }, - "ListReplications": { - "methods": [ - "listReplications", - "listReplicationsStream", - "listReplicationsAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPolicies": { - "methods": [ - "listBackupPolicies", - "listBackupPoliciesStream", - "listBackupPoliciesAsync" - ] - }, - "ListQuotaRules": { - "methods": [ - "listQuotaRules", - "listQuotaRulesStream", - "listQuotaRulesAsync" - ] - }, - "ListHostGroups": { - "methods": [ - "listHostGroups", - "listHostGroupsStream", - "listHostGroupsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/index.ts b/owl-bot-staging/google-cloud-netapp/src/v1/index.ts deleted file mode 100644 index 562b20e9c50..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// 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 {NetAppClient} from './net_app_client'; diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts deleted file mode 100644 index 75a26dd4819..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client.ts +++ /dev/null @@ -1,10491 +0,0 @@ -// 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, 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/v1/net_app_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './net_app_client_config.json'; -const version = require('../../../package.json').version; - -/** - * NetApp Files Google Cloud Service - * @class - * @memberof v1 - */ -export class NetAppClient { - 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('netapp'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - netAppStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of NetAppClient. - * - * @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 NetAppClient({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 NetAppClient; - 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 = 'netapp.' + 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.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 = { - activeDirectoryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/activeDirectories/{active_directory}' - ), - backupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}' - ), - backupPolicyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPolicies/{backup_policy}' - ), - backupVaultPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backup_vault}' - ), - hostGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/hostGroups/{host_group}' - ), - kmsConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}' - ), - quotaRulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}' - ), - replicationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}' - ), - snapshotPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}' - ), - storagePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/storagePools/{storage_pool}' - ), - volumePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/volumes/{volume}' - ), - }; - - // 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 = { - listStoragePools: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'storagePools'), - listVolumes: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'volumes'), - listSnapshots: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'snapshots'), - listActiveDirectories: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'activeDirectories'), - listKmsConfigs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'kmsConfigs'), - listReplications: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'replications'), - listBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - listBackups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), - listBackupPolicies: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPolicies'), - listQuotaRules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'quotaRules'), - listHostGroups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'hostGroups') - }; - - 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: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createStoragePoolResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; - const createStoragePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateStoragePoolResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; - const updateStoragePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteStoragePoolResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteStoragePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const validateDirectoryServiceResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const validateDirectoryServiceMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const switchActiveReplicaZoneResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.StoragePool') as gax.protobuf.Type; - const switchActiveReplicaZoneMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createVolumeResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; - const createVolumeMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateVolumeResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; - const updateVolumeMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteVolumeResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteVolumeMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const revertVolumeResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; - const revertVolumeMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const establishVolumePeeringResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; - const establishVolumePeeringMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Snapshot') as gax.protobuf.Type; - const createSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteSnapshotResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Snapshot') as gax.protobuf.Type; - const updateSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createActiveDirectoryResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.ActiveDirectory') as gax.protobuf.Type; - const createActiveDirectoryMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateActiveDirectoryResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.ActiveDirectory') as gax.protobuf.Type; - const updateActiveDirectoryMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteActiveDirectoryResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteActiveDirectoryMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createKmsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; - const createKmsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateKmsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; - const updateKmsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const encryptVolumesResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.KmsConfig') as gax.protobuf.Type; - const encryptVolumesMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteKmsConfigResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteKmsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createReplicationResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const createReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteReplicationResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateReplicationResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const updateReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const stopReplicationResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const stopReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const resumeReplicationResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const resumeReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const reverseReplicationDirectionResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const reverseReplicationDirectionMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const establishPeeringResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const establishPeeringMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const syncReplicationResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Replication') as gax.protobuf.Type; - const syncReplicationMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.BackupVault') as gax.protobuf.Type; - const createBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.BackupVault') as gax.protobuf.Type; - const updateBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupVaultResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Backup') as gax.protobuf.Type; - const createBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.Backup') as gax.protobuf.Type; - const updateBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPolicyResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.BackupPolicy') as gax.protobuf.Type; - const createBackupPolicyMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupPolicyResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.BackupPolicy') as gax.protobuf.Type; - const updateBackupPolicyMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPolicyResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPolicyMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createQuotaRuleResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.QuotaRule') as gax.protobuf.Type; - const createQuotaRuleMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateQuotaRuleResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.QuotaRule') as gax.protobuf.Type; - const updateQuotaRuleMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteQuotaRuleResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteQuotaRuleMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const restoreBackupFilesResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.RestoreBackupFilesResponse') as gax.protobuf.Type; - const restoreBackupFilesMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const createHostGroupResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.HostGroup') as gax.protobuf.Type; - const createHostGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const updateHostGroupResponse = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.HostGroup') as gax.protobuf.Type; - const updateHostGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - const deleteHostGroupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteHostGroupMetadata = protoFilesRoot.lookup( - '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createStoragePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createStoragePoolResponse.decode.bind(createStoragePoolResponse), - createStoragePoolMetadata.decode.bind(createStoragePoolMetadata)), - updateStoragePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateStoragePoolResponse.decode.bind(updateStoragePoolResponse), - updateStoragePoolMetadata.decode.bind(updateStoragePoolMetadata)), - deleteStoragePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteStoragePoolResponse.decode.bind(deleteStoragePoolResponse), - deleteStoragePoolMetadata.decode.bind(deleteStoragePoolMetadata)), - validateDirectoryService: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - validateDirectoryServiceResponse.decode.bind(validateDirectoryServiceResponse), - validateDirectoryServiceMetadata.decode.bind(validateDirectoryServiceMetadata)), - switchActiveReplicaZone: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - switchActiveReplicaZoneResponse.decode.bind(switchActiveReplicaZoneResponse), - switchActiveReplicaZoneMetadata.decode.bind(switchActiveReplicaZoneMetadata)), - createVolume: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createVolumeResponse.decode.bind(createVolumeResponse), - createVolumeMetadata.decode.bind(createVolumeMetadata)), - updateVolume: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateVolumeResponse.decode.bind(updateVolumeResponse), - updateVolumeMetadata.decode.bind(updateVolumeMetadata)), - deleteVolume: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteVolumeResponse.decode.bind(deleteVolumeResponse), - deleteVolumeMetadata.decode.bind(deleteVolumeMetadata)), - revertVolume: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - revertVolumeResponse.decode.bind(revertVolumeResponse), - revertVolumeMetadata.decode.bind(revertVolumeMetadata)), - establishVolumePeering: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - establishVolumePeeringResponse.decode.bind(establishVolumePeeringResponse), - establishVolumePeeringMetadata.decode.bind(establishVolumePeeringMetadata)), - createSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createSnapshotResponse.decode.bind(createSnapshotResponse), - createSnapshotMetadata.decode.bind(createSnapshotMetadata)), - deleteSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteSnapshotResponse.decode.bind(deleteSnapshotResponse), - deleteSnapshotMetadata.decode.bind(deleteSnapshotMetadata)), - updateSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateSnapshotResponse.decode.bind(updateSnapshotResponse), - updateSnapshotMetadata.decode.bind(updateSnapshotMetadata)), - createActiveDirectory: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createActiveDirectoryResponse.decode.bind(createActiveDirectoryResponse), - createActiveDirectoryMetadata.decode.bind(createActiveDirectoryMetadata)), - updateActiveDirectory: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateActiveDirectoryResponse.decode.bind(updateActiveDirectoryResponse), - updateActiveDirectoryMetadata.decode.bind(updateActiveDirectoryMetadata)), - deleteActiveDirectory: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteActiveDirectoryResponse.decode.bind(deleteActiveDirectoryResponse), - deleteActiveDirectoryMetadata.decode.bind(deleteActiveDirectoryMetadata)), - createKmsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createKmsConfigResponse.decode.bind(createKmsConfigResponse), - createKmsConfigMetadata.decode.bind(createKmsConfigMetadata)), - updateKmsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateKmsConfigResponse.decode.bind(updateKmsConfigResponse), - updateKmsConfigMetadata.decode.bind(updateKmsConfigMetadata)), - encryptVolumes: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - encryptVolumesResponse.decode.bind(encryptVolumesResponse), - encryptVolumesMetadata.decode.bind(encryptVolumesMetadata)), - deleteKmsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteKmsConfigResponse.decode.bind(deleteKmsConfigResponse), - deleteKmsConfigMetadata.decode.bind(deleteKmsConfigMetadata)), - createReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createReplicationResponse.decode.bind(createReplicationResponse), - createReplicationMetadata.decode.bind(createReplicationMetadata)), - deleteReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteReplicationResponse.decode.bind(deleteReplicationResponse), - deleteReplicationMetadata.decode.bind(deleteReplicationMetadata)), - updateReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateReplicationResponse.decode.bind(updateReplicationResponse), - updateReplicationMetadata.decode.bind(updateReplicationMetadata)), - stopReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - stopReplicationResponse.decode.bind(stopReplicationResponse), - stopReplicationMetadata.decode.bind(stopReplicationMetadata)), - resumeReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - resumeReplicationResponse.decode.bind(resumeReplicationResponse), - resumeReplicationMetadata.decode.bind(resumeReplicationMetadata)), - reverseReplicationDirection: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - reverseReplicationDirectionResponse.decode.bind(reverseReplicationDirectionResponse), - reverseReplicationDirectionMetadata.decode.bind(reverseReplicationDirectionMetadata)), - establishPeering: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - establishPeeringResponse.decode.bind(establishPeeringResponse), - establishPeeringMetadata.decode.bind(establishPeeringMetadata)), - syncReplication: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - syncReplicationResponse.decode.bind(syncReplicationResponse), - syncReplicationMetadata.decode.bind(syncReplicationMetadata)), - 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)), - createBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupResponse.decode.bind(createBackupResponse), - createBackupMetadata.decode.bind(createBackupMetadata)), - deleteBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupResponse.decode.bind(deleteBackupResponse), - deleteBackupMetadata.decode.bind(deleteBackupMetadata)), - updateBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupResponse.decode.bind(updateBackupResponse), - updateBackupMetadata.decode.bind(updateBackupMetadata)), - createBackupPolicy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPolicyResponse.decode.bind(createBackupPolicyResponse), - createBackupPolicyMetadata.decode.bind(createBackupPolicyMetadata)), - updateBackupPolicy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupPolicyResponse.decode.bind(updateBackupPolicyResponse), - updateBackupPolicyMetadata.decode.bind(updateBackupPolicyMetadata)), - deleteBackupPolicy: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPolicyResponse.decode.bind(deleteBackupPolicyResponse), - deleteBackupPolicyMetadata.decode.bind(deleteBackupPolicyMetadata)), - createQuotaRule: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createQuotaRuleResponse.decode.bind(createQuotaRuleResponse), - createQuotaRuleMetadata.decode.bind(createQuotaRuleMetadata)), - updateQuotaRule: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateQuotaRuleResponse.decode.bind(updateQuotaRuleResponse), - updateQuotaRuleMetadata.decode.bind(updateQuotaRuleMetadata)), - deleteQuotaRule: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteQuotaRuleResponse.decode.bind(deleteQuotaRuleResponse), - deleteQuotaRuleMetadata.decode.bind(deleteQuotaRuleMetadata)), - restoreBackupFiles: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - restoreBackupFilesResponse.decode.bind(restoreBackupFilesResponse), - restoreBackupFilesMetadata.decode.bind(restoreBackupFilesMetadata)), - createHostGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createHostGroupResponse.decode.bind(createHostGroupResponse), - createHostGroupMetadata.decode.bind(createHostGroupMetadata)), - updateHostGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateHostGroupResponse.decode.bind(updateHostGroupResponse), - updateHostGroupMetadata.decode.bind(updateHostGroupMetadata)), - deleteHostGroup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteHostGroupResponse.decode.bind(deleteHostGroupResponse), - deleteHostGroupMetadata.decode.bind(deleteHostGroupMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.netapp.v1.NetApp', 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.netAppStub) { - return this.netAppStub; - } - - // Put together the "service stub" for - // google.cloud.netapp.v1.NetApp. - this.netAppStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.netapp.v1.NetApp') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.netapp.v1.NetApp, - 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 netAppStubMethods = - ['listStoragePools', 'createStoragePool', 'getStoragePool', 'updateStoragePool', 'deleteStoragePool', 'validateDirectoryService', 'switchActiveReplicaZone', 'listVolumes', 'getVolume', 'createVolume', 'updateVolume', 'deleteVolume', 'revertVolume', 'establishVolumePeering', 'listSnapshots', 'getSnapshot', 'createSnapshot', 'deleteSnapshot', 'updateSnapshot', 'listActiveDirectories', 'getActiveDirectory', 'createActiveDirectory', 'updateActiveDirectory', 'deleteActiveDirectory', 'listKmsConfigs', 'createKmsConfig', 'getKmsConfig', 'updateKmsConfig', 'encryptVolumes', 'verifyKmsConfig', 'deleteKmsConfig', 'listReplications', 'getReplication', 'createReplication', 'deleteReplication', 'updateReplication', 'stopReplication', 'resumeReplication', 'reverseReplicationDirection', 'establishPeering', 'syncReplication', 'createBackupVault', 'getBackupVault', 'listBackupVaults', 'updateBackupVault', 'deleteBackupVault', 'createBackup', 'getBackup', 'listBackups', 'deleteBackup', 'updateBackup', 'createBackupPolicy', 'getBackupPolicy', 'listBackupPolicies', 'updateBackupPolicy', 'deleteBackupPolicy', 'listQuotaRules', 'getQuotaRule', 'createQuotaRule', 'updateQuotaRule', 'deleteQuotaRule', 'restoreBackupFiles', 'listHostGroups', 'getHostGroup', 'createHostGroup', 'updateHostGroup', 'deleteHostGroup', 'executeOntapPost', 'executeOntapGet', 'executeOntapDelete', 'executeOntapPatch']; - for (const methodName of netAppStubMethods) { - const callPromise = this.netAppStub.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.netAppStub; - } - - /** - * 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 'netapp.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 'netapp.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-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 -- - // ------------------- -/** - * Returns the description of the specified storage pool by poolId. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the storage pool - * @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.netapp.v1.StoragePool|StoragePool}. - * 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/v1/net_app.get_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_GetStoragePool_async - */ - getStoragePool( - request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|undefined, {}|undefined - ]>; - getStoragePool( - request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, - {}|null|undefined>): void; - getStoragePool( - request: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, - {}|null|undefined>): void; - getStoragePool( - request?: protos.google.cloud.netapp.v1.IGetStoragePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|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('getStoragePool request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getStoragePool response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getStoragePool(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IStoragePool, - protos.google.cloud.netapp.v1.IGetStoragePoolRequest|undefined, - {}|undefined - ]) => { - this._log.info('getStoragePool 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 Volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the volume - * @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.netapp.v1.Volume|Volume}. - * 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/v1/net_app.get_volume.js - * region_tag:netapp_v1_generated_NetApp_GetVolume_async - */ - getVolume( - request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|undefined, {}|undefined - ]>; - getVolume( - request: protos.google.cloud.netapp.v1.IGetVolumeRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, - {}|null|undefined>): void; - getVolume( - request: protos.google.cloud.netapp.v1.IGetVolumeRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, - {}|null|undefined>): void; - getVolume( - request?: protos.google.cloud.netapp.v1.IGetVolumeRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|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('getVolume request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getVolume response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getVolume(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IVolume, - protos.google.cloud.netapp.v1.IGetVolumeRequest|undefined, - {}|undefined - ]) => { - this._log.info('getVolume 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; - }); - } -/** - * Describe a snapshot for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * @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.netapp.v1.Snapshot|Snapshot}. - * 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/v1/net_app.get_snapshot.js - * region_tag:netapp_v1_generated_NetApp_GetSnapshot_async - */ - getSnapshot( - request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|undefined, {}|undefined - ]>; - getSnapshot( - request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, - {}|null|undefined>): void; - getSnapshot( - request: protos.google.cloud.netapp.v1.IGetSnapshotRequest, - callback: Callback< - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, - {}|null|undefined>): void; - getSnapshot( - request?: protos.google.cloud.netapp.v1.IGetSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|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('getSnapshot request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getSnapshot response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getSnapshot(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.ISnapshot, - protos.google.cloud.netapp.v1.IGetSnapshotRequest|undefined, - {}|undefined - ]) => { - this._log.info('getSnapshot 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; - }); - } -/** - * Describes a specified active directory. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the active directory. - * @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.netapp.v1.ActiveDirectory|ActiveDirectory}. - * 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/v1/net_app.get_active_directory.js - * region_tag:netapp_v1_generated_NetApp_GetActiveDirectory_async - */ - getActiveDirectory( - request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|undefined, {}|undefined - ]>; - getActiveDirectory( - request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, - {}|null|undefined>): void; - getActiveDirectory( - request: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, - {}|null|undefined>): void; - getActiveDirectory( - request?: protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|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('getActiveDirectory request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getActiveDirectory response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getActiveDirectory(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IActiveDirectory, - protos.google.cloud.netapp.v1.IGetActiveDirectoryRequest|undefined, - {}|undefined - ]) => { - this._log.info('getActiveDirectory 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 description of the specified KMS config by kms_config_id. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the KmsConfig - * @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.netapp.v1.KmsConfig|KmsConfig}. - * 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/v1/net_app.get_kms_config.js - * region_tag:netapp_v1_generated_NetApp_GetKmsConfig_async - */ - getKmsConfig( - request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|undefined, {}|undefined - ]>; - getKmsConfig( - request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, - {}|null|undefined>): void; - getKmsConfig( - request: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, - {}|null|undefined>): void; - getKmsConfig( - request?: protos.google.cloud.netapp.v1.IGetKmsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|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('getKmsConfig request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getKmsConfig response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getKmsConfig(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IKmsConfig, - protos.google.cloud.netapp.v1.IGetKmsConfigRequest|undefined, - {}|undefined - ]) => { - this._log.info('getKmsConfig 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; - }); - } -/** - * Verifies KMS config reachability. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the KMS Config to be verified. - * @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.netapp.v1.VerifyKmsConfigResponse|VerifyKmsConfigResponse}. - * 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/v1/net_app.verify_kms_config.js - * region_tag:netapp_v1_generated_NetApp_VerifyKmsConfig_async - */ - verifyKmsConfig( - request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|undefined, {}|undefined - ]>; - verifyKmsConfig( - request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, - {}|null|undefined>): void; - verifyKmsConfig( - request: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, - {}|null|undefined>): void; - verifyKmsConfig( - request?: protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|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('verifyKmsConfig request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('verifyKmsConfig response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.verifyKmsConfig(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse, - protos.google.cloud.netapp.v1.IVerifyKmsConfigRequest|undefined, - {}|undefined - ]) => { - this._log.info('verifyKmsConfig 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; - }); - } -/** - * Describe a replication for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * @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.netapp.v1.Replication|Replication}. - * 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/v1/net_app.get_replication.js - * region_tag:netapp_v1_generated_NetApp_GetReplication_async - */ - getReplication( - request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|undefined, {}|undefined - ]>; - getReplication( - request: protos.google.cloud.netapp.v1.IGetReplicationRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, - {}|null|undefined>): void; - getReplication( - request: protos.google.cloud.netapp.v1.IGetReplicationRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, - {}|null|undefined>): void; - getReplication( - request?: protos.google.cloud.netapp.v1.IGetReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|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('getReplication request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getReplication response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getReplication(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IReplication, - protos.google.cloud.netapp.v1.IGetReplicationRequest|undefined, - {}|undefined - ]) => { - this._log.info('getReplication 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 description of the specified backup vault - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * @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.netapp.v1.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/v1/net_app.get_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_GetBackupVault_async - */ - getBackupVault( - request?: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.IGetBackupVaultRequest|undefined, {}|undefined - ]>; - getBackupVault( - request: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request?: protos.google.cloud.netapp.v1.IGetBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault, - protos.google.cloud.netapp.v1.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; - }); - } -/** - * Returns the description of the specified backup - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * @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.netapp.v1.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/v1/net_app.get_backup.js - * region_tag:netapp_v1_generated_NetApp_GetBackup_async - */ - getBackup( - request?: protos.google.cloud.netapp.v1.IGetBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.IGetBackupRequest|undefined, {}|undefined - ]>; - getBackup( - request: protos.google.cloud.netapp.v1.IGetBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request: protos.google.cloud.netapp.v1.IGetBackupRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request?: protos.google.cloud.netapp.v1.IGetBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackup, - protos.google.cloud.netapp.v1.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; - }); - } -/** - * Returns the description of the specified backup policy by backup_policy_id. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * @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.netapp.v1.BackupPolicy|BackupPolicy}. - * 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/v1/net_app.get_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_GetBackupPolicy_async - */ - getBackupPolicy( - request?: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|undefined, {}|undefined - ]>; - getBackupPolicy( - request: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, - {}|null|undefined>): void; - getBackupPolicy( - request: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, - {}|null|undefined>): void; - getBackupPolicy( - request?: protos.google.cloud.netapp.v1.IGetBackupPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|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('getBackupPolicy request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getBackupPolicy response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getBackupPolicy(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IBackupPolicy, - protos.google.cloud.netapp.v1.IGetBackupPolicyRequest|undefined, - {}|undefined - ]) => { - this._log.info('getBackupPolicy 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 details of the specified quota rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the quota rule - * @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.netapp.v1.QuotaRule|QuotaRule}. - * 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/v1/net_app.get_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_GetQuotaRule_async - */ - getQuotaRule( - request?: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|undefined, {}|undefined - ]>; - getQuotaRule( - request: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, - {}|null|undefined>): void; - getQuotaRule( - request: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, - {}|null|undefined>): void; - getQuotaRule( - request?: protos.google.cloud.netapp.v1.IGetQuotaRuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|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('getQuotaRule request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getQuotaRule response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getQuotaRule(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IQuotaRule, - protos.google.cloud.netapp.v1.IGetQuotaRuleRequest|undefined, - {}|undefined - ]) => { - this._log.info('getQuotaRule 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 details of the specified host group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - * @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.netapp.v1.HostGroup|HostGroup}. - * 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/v1/net_app.get_host_group.js - * region_tag:netapp_v1_generated_NetApp_GetHostGroup_async - */ - getHostGroup( - request?: protos.google.cloud.netapp.v1.IGetHostGroupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|undefined, {}|undefined - ]>; - getHostGroup( - request: protos.google.cloud.netapp.v1.IGetHostGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, - {}|null|undefined>): void; - getHostGroup( - request: protos.google.cloud.netapp.v1.IGetHostGroupRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, - {}|null|undefined>): void; - getHostGroup( - request?: protos.google.cloud.netapp.v1.IGetHostGroupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|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('getHostGroup request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getHostGroup response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.getHostGroup(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IHostGroup, - protos.google.cloud.netapp.v1.IGetHostGroupRequest|undefined, - {}|undefined - ]) => { - this._log.info('getHostGroup 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; - }); - } -/** - * `ExecuteOntapPost` dispatches the ONTAP `POST` request to the - * `StoragePool` cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.Struct} request.body - * Required. The raw `JSON` body of the request. - * The body should be in the format of the ONTAP resource. - * For example: - * ``` - * { - * "body": { - * "field1": "value1", - * "field2": "value2", - * } - * } - * ``` - * @param {string} request.ontapPath - * Required. The resource path of the ONTAP resource. - * Format: - * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. - * For example: - * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. - * @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.netapp.v1.ExecuteOntapPostResponse|ExecuteOntapPostResponse}. - * 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/v1/net_app.execute_ontap_post.js - * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPost_async - */ - executeOntapPost( - request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, {}|undefined - ]>; - executeOntapPost( - request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, - {}|null|undefined>): void; - executeOntapPost( - request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, - {}|null|undefined>): void; - executeOntapPost( - request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|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({ - 'ontap_path': request.ontapPath ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('executeOntapPost request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('executeOntapPost response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.executeOntapPost(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, - {}|undefined - ]) => { - this._log.info('executeOntapPost 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; - }); - } -/** - * `ExecuteOntapGet` dispatches the ONTAP `GET` request to the - * `StoragePool` cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.ontapPath - * Required. The resource path of the ONTAP resource. - * Format: - * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. - * For example: - * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. - * @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.netapp.v1.ExecuteOntapGetResponse|ExecuteOntapGetResponse}. - * 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/v1/net_app.execute_ontap_get.js - * region_tag:netapp_v1_generated_NetApp_ExecuteOntapGet_async - */ - executeOntapGet( - request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, {}|undefined - ]>; - executeOntapGet( - request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, - {}|null|undefined>): void; - executeOntapGet( - request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, - {}|null|undefined>): void; - executeOntapGet( - request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|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({ - 'ontap_path': request.ontapPath ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('executeOntapGet request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('executeOntapGet response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.executeOntapGet(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, - protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, - {}|undefined - ]) => { - this._log.info('executeOntapGet 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; - }); - } -/** - * `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the - * `StoragePool` cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.ontapPath - * Required. The resource path of the ONTAP resource. - * Format: - * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. - * For example: - * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. - * @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.netapp.v1.ExecuteOntapDeleteResponse|ExecuteOntapDeleteResponse}. - * 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/v1/net_app.execute_ontap_delete.js - * region_tag:netapp_v1_generated_NetApp_ExecuteOntapDelete_async - */ - executeOntapDelete( - request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, {}|undefined - ]>; - executeOntapDelete( - request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, - {}|null|undefined>): void; - executeOntapDelete( - request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, - {}|null|undefined>): void; - executeOntapDelete( - request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|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({ - 'ontap_path': request.ontapPath ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('executeOntapDelete request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('executeOntapDelete response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.executeOntapDelete(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, - protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, - {}|undefined - ]) => { - this._log.info('executeOntapDelete 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; - }); - } -/** - * `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the - * `StoragePool` cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.Struct} request.body - * Required. The raw `JSON` body of the request. - * The body should be in the format of the ONTAP resource. - * For example: - * ``` - * { - * "body": { - * "field1": "value1", - * "field2": "value2", - * } - * } - * ``` - * @param {string} request.ontapPath - * Required. The resource path of the ONTAP resource. - * Format: - * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. - * For example: - * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. - * @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.netapp.v1.ExecuteOntapPatchResponse|ExecuteOntapPatchResponse}. - * 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/v1/net_app.execute_ontap_patch.js - * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPatch_async - */ - executeOntapPatch( - request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, {}|undefined - ]>; - executeOntapPatch( - request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, - {}|null|undefined>): void; - executeOntapPatch( - request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, - callback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, - {}|null|undefined>): void; - executeOntapPatch( - request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|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({ - 'ontap_path': request.ontapPath ?? '', - }); - this.initialize().catch(err => {throw err}); - this._log.info('executeOntapPatch request %j', request); - const wrappedCallback: Callback< - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('executeOntapPatch response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls.executeOntapPatch(request, options, wrappedCallback) - ?.then(([response, options, rawResponse]: [ - protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, - protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, - {}|undefined - ]) => { - this._log.info('executeOntapPatch 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 storage pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {string} request.storagePoolId - * Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * @param {google.cloud.netapp.v1.StoragePool} request.storagePool - * Required. The required parameters to create a new storage pool. - * @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/v1/net_app.create_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async - */ - createStoragePool( - request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createStoragePool( - request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStoragePool( - request: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createStoragePool( - request?: protos.google.cloud.netapp.v1.ICreateStoragePoolRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createStoragePool response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createStoragePool request %j', request); - return this.innerApiCalls.createStoragePool(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createStoragePool response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createStoragePool()`. - * @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/v1/net_app.create_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_CreateStoragePool_async - */ - async checkCreateStoragePoolProgress(name: string): Promise>{ - this._log.info('createStoragePool 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.createStoragePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the storage pool properties with the full spec - * - * @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 - * StoragePool 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 {google.cloud.netapp.v1.StoragePool} request.storagePool - * Required. The pool being updated - * @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/v1/net_app.update_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async - */ - updateStoragePool( - request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateStoragePool( - request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStoragePool( - request: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateStoragePool( - request?: protos.google.cloud.netapp.v1.IUpdateStoragePoolRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'storage_pool.name': request.storagePool!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateStoragePool response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateStoragePool request %j', request); - return this.innerApiCalls.updateStoragePool(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateStoragePool response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateStoragePool()`. - * @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/v1/net_app.update_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_UpdateStoragePool_async - */ - async checkUpdateStoragePoolProgress(name: string): Promise>{ - this._log.info('updateStoragePool 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.updateStoragePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Warning! This operation will permanently delete the storage pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the storage pool - * @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/v1/net_app.delete_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async - */ - deleteStoragePool( - request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteStoragePool( - request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStoragePool( - request: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteStoragePool( - request?: protos.google.cloud.netapp.v1.IDeleteStoragePoolRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteStoragePool response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteStoragePool request %j', request); - return this.innerApiCalls.deleteStoragePool(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteStoragePool response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteStoragePool()`. - * @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/v1/net_app.delete_storage_pool.js - * region_tag:netapp_v1_generated_NetApp_DeleteStoragePool_async - */ - async checkDeleteStoragePoolProgress(name: string): Promise>{ - this._log.info('deleteStoragePool 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.deleteStoragePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * ValidateDirectoryService does a connectivity check for a directory service - * policy attached to the storage pool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the storage pool - * @param {google.cloud.netapp.v1.DirectoryServiceType} request.directoryServiceType - * Type of directory service policy attached to the storage pool. - * @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/v1/net_app.validate_directory_service.js - * region_tag:netapp_v1_generated_NetApp_ValidateDirectoryService_async - */ - validateDirectoryService( - request?: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - validateDirectoryService( - request: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - validateDirectoryService( - request: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - validateDirectoryService( - request?: protos.google.cloud.netapp.v1.IValidateDirectoryServiceRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('validateDirectoryService response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('validateDirectoryService request %j', request); - return this.innerApiCalls.validateDirectoryService(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('validateDirectoryService response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `validateDirectoryService()`. - * @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/v1/net_app.validate_directory_service.js - * region_tag:netapp_v1_generated_NetApp_ValidateDirectoryService_async - */ - async checkValidateDirectoryServiceProgress(name: string): Promise>{ - this._log.info('validateDirectoryService 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.validateDirectoryService, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * This operation will switch the active/replica zone for a regional - * storagePool. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the storage pool - * @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/v1/net_app.switch_active_replica_zone.js - * region_tag:netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async - */ - switchActiveReplicaZone( - request?: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - switchActiveReplicaZone( - request: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - switchActiveReplicaZone( - request: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - switchActiveReplicaZone( - request?: protos.google.cloud.netapp.v1.ISwitchActiveReplicaZoneRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('switchActiveReplicaZone response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('switchActiveReplicaZone request %j', request); - return this.innerApiCalls.switchActiveReplicaZone(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('switchActiveReplicaZone response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `switchActiveReplicaZone()`. - * @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/v1/net_app.switch_active_replica_zone.js - * region_tag:netapp_v1_generated_NetApp_SwitchActiveReplicaZone_async - */ - async checkSwitchActiveReplicaZoneProgress(name: string): Promise>{ - this._log.info('switchActiveReplicaZone 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.switchActiveReplicaZone, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new Volume 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.volumeId - * Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * @param {google.cloud.netapp.v1.Volume} request.volume - * Required. The volume being created. - * @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/v1/net_app.create_volume.js - * region_tag:netapp_v1_generated_NetApp_CreateVolume_async - */ - createVolume( - request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createVolume( - request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVolume( - request: protos.google.cloud.netapp.v1.ICreateVolumeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVolume( - request?: protos.google.cloud.netapp.v1.ICreateVolumeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createVolume response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createVolume request %j', request); - return this.innerApiCalls.createVolume(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createVolume response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createVolume()`. - * @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/v1/net_app.create_volume.js - * region_tag:netapp_v1_generated_NetApp_CreateVolume_async - */ - async checkCreateVolumeProgress(name: string): Promise>{ - this._log.info('createVolume 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.createVolume, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the parameters of a single Volume. - * - * @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 - * Volume 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 {google.cloud.netapp.v1.Volume} request.volume - * Required. The volume being updated - * @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/v1/net_app.update_volume.js - * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async - */ - updateVolume( - request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateVolume( - request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVolume( - request: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVolume( - request?: protos.google.cloud.netapp.v1.IUpdateVolumeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'volume.name': request.volume!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateVolume response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateVolume request %j', request); - return this.innerApiCalls.updateVolume(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateVolume response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateVolume()`. - * @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/v1/net_app.update_volume.js - * region_tag:netapp_v1_generated_NetApp_UpdateVolume_async - */ - async checkUpdateVolumeProgress(name: string): Promise>{ - this._log.info('updateVolume 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.updateVolume, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single Volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the volume - * @param {boolean} request.force - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - * @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/v1/net_app.delete_volume.js - * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async - */ - deleteVolume( - request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteVolume( - request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVolume( - request: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVolume( - request?: protos.google.cloud.netapp.v1.IDeleteVolumeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteVolume response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteVolume request %j', request); - return this.innerApiCalls.deleteVolume(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteVolume response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteVolume()`. - * @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/v1/net_app.delete_volume.js - * region_tag:netapp_v1_generated_NetApp_DeleteVolume_async - */ - async checkDeleteVolumeProgress(name: string): Promise>{ - this._log.info('deleteVolume 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.deleteVolume, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Revert an existing volume to a specified snapshot. - * Warning! This operation will permanently revert all changes made after the - * snapshot was created. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - * @param {string} request.snapshotId - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - * @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/v1/net_app.revert_volume.js - * region_tag:netapp_v1_generated_NetApp_RevertVolume_async - */ - revertVolume( - request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - revertVolume( - request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - revertVolume( - request: protos.google.cloud.netapp.v1.IRevertVolumeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - revertVolume( - request?: protos.google.cloud.netapp.v1.IRevertVolumeRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('revertVolume response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('revertVolume request %j', request); - return this.innerApiCalls.revertVolume(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('revertVolume response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `revertVolume()`. - * @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/v1/net_app.revert_volume.js - * region_tag:netapp_v1_generated_NetApp_RevertVolume_async - */ - async checkRevertVolumeProgress(name: string): Promise>{ - this._log.info('revertVolume 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.revertVolume, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Establish volume peering. This is used to establish cluster and svm - * peerings between the GCNV and OnPrem clusters. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The volume resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @param {string} request.peerClusterName - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * @param {string} request.peerSvmName - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * @param {string[]} [request.peerIpAddresses] - * Optional. List of IPv4 ip addresses to be used for peering. - * @param {string} request.peerVolumeName - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * @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/v1/net_app.establish_volume_peering.js - * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async - */ - establishVolumePeering( - request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - establishVolumePeering( - request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - establishVolumePeering( - request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - establishVolumePeering( - request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('establishVolumePeering response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('establishVolumePeering request %j', request); - return this.innerApiCalls.establishVolumePeering(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('establishVolumePeering response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `establishVolumePeering()`. - * @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/v1/net_app.establish_volume_peering.js - * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async - */ - async checkEstablishVolumePeeringProgress(name: string): Promise>{ - this._log.info('establishVolumePeering 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.establishVolumePeering, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a new snapshot for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @param {google.cloud.netapp.v1.Snapshot} request.snapshot - * Required. A snapshot resource - * @param {string} request.snapshotId - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @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/v1/net_app.create_snapshot.js - * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async - */ - createSnapshot( - request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createSnapshot( - request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createSnapshot( - request: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createSnapshot( - request?: protos.google.cloud.netapp.v1.ICreateSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createSnapshot response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createSnapshot request %j', request); - return this.innerApiCalls.createSnapshot(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createSnapshot response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createSnapshot()`. - * @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/v1/net_app.create_snapshot.js - * region_tag:netapp_v1_generated_NetApp_CreateSnapshot_async - */ - async checkCreateSnapshotProgress(name: string): Promise>{ - this._log.info('createSnapshot 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.createSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a snapshot. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The snapshot resource name, in the format - * `projects/* /locations/* /volumes/* /snapshots/{snapshot_id}` - * @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/v1/net_app.delete_snapshot.js - * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async - */ - deleteSnapshot( - request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteSnapshot( - request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteSnapshot( - request: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteSnapshot( - request?: protos.google.cloud.netapp.v1.IDeleteSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteSnapshot response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteSnapshot request %j', request); - return this.innerApiCalls.deleteSnapshot(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteSnapshot response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteSnapshot()`. - * @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/v1/net_app.delete_snapshot.js - * region_tag:netapp_v1_generated_NetApp_DeleteSnapshot_async - */ - async checkDeleteSnapshotProgress(name: string): Promise>{ - this._log.info('deleteSnapshot 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.deleteSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a specific snapshot. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.netapp.v1.Snapshot} request.snapshot - * Required. A snapshot 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 - * 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/v1/net_app.update_snapshot.js - * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async - */ - updateSnapshot( - request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateSnapshot( - request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateSnapshot( - request: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateSnapshot( - request?: protos.google.cloud.netapp.v1.IUpdateSnapshotRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'snapshot.name': request.snapshot!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateSnapshot response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateSnapshot request %j', request); - return this.innerApiCalls.updateSnapshot(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateSnapshot response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateSnapshot()`. - * @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/v1/net_app.update_snapshot.js - * region_tag:netapp_v1_generated_NetApp_UpdateSnapshot_async - */ - async checkUpdateSnapshotProgress(name: string): Promise>{ - this._log.info('updateSnapshot 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.updateSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * CreateActiveDirectory - * Creates the active directory specified in the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory - * Required. Fields of the to be created active directory. - * @param {string} request.activeDirectoryId - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * @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/v1/net_app.create_active_directory.js - * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async - */ - createActiveDirectory( - request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createActiveDirectory( - request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createActiveDirectory( - request: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createActiveDirectory( - request?: protos.google.cloud.netapp.v1.ICreateActiveDirectoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createActiveDirectory response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createActiveDirectory request %j', request); - return this.innerApiCalls.createActiveDirectory(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createActiveDirectory response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createActiveDirectory()`. - * @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/v1/net_app.create_active_directory.js - * region_tag:netapp_v1_generated_NetApp_CreateActiveDirectory_async - */ - async checkCreateActiveDirectoryProgress(name: string): Promise>{ - this._log.info('createActiveDirectory 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.createActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Update the parameters of an active directories. - * - * @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 - * Active Directory 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 {google.cloud.netapp.v1.ActiveDirectory} request.activeDirectory - * Required. The volume being updated - * @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/v1/net_app.update_active_directory.js - * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async - */ - updateActiveDirectory( - request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateActiveDirectory( - request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateActiveDirectory( - request: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateActiveDirectory( - request?: protos.google.cloud.netapp.v1.IUpdateActiveDirectoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'active_directory.name': request.activeDirectory!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateActiveDirectory response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateActiveDirectory request %j', request); - return this.innerApiCalls.updateActiveDirectory(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateActiveDirectory response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateActiveDirectory()`. - * @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/v1/net_app.update_active_directory.js - * region_tag:netapp_v1_generated_NetApp_UpdateActiveDirectory_async - */ - async checkUpdateActiveDirectoryProgress(name: string): Promise>{ - this._log.info('updateActiveDirectory 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.updateActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Delete the active directory specified in the request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the active directory. - * @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/v1/net_app.delete_active_directory.js - * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async - */ - deleteActiveDirectory( - request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteActiveDirectory( - request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteActiveDirectory( - request: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteActiveDirectory( - request?: protos.google.cloud.netapp.v1.IDeleteActiveDirectoryRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteActiveDirectory response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteActiveDirectory request %j', request); - return this.innerApiCalls.deleteActiveDirectory(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteActiveDirectory response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteActiveDirectory()`. - * @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/v1/net_app.delete_active_directory.js - * region_tag:netapp_v1_generated_NetApp_DeleteActiveDirectory_async - */ - async checkDeleteActiveDirectoryProgress(name: string): Promise>{ - this._log.info('deleteActiveDirectory 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.deleteActiveDirectory, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new KMS config. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {string} request.kmsConfigId - * Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @param {google.cloud.netapp.v1.KmsConfig} request.kmsConfig - * Required. The required parameters to create a new KmsConfig. - * @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/v1/net_app.create_kms_config.js - * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async - */ - createKmsConfig( - request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createKmsConfig( - request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createKmsConfig( - request: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createKmsConfig( - request?: protos.google.cloud.netapp.v1.ICreateKmsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createKmsConfig response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createKmsConfig request %j', request); - return this.innerApiCalls.createKmsConfig(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createKmsConfig response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createKmsConfig()`. - * @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/v1/net_app.create_kms_config.js - * region_tag:netapp_v1_generated_NetApp_CreateKmsConfig_async - */ - async checkCreateKmsConfigProgress(name: string): Promise>{ - this._log.info('createKmsConfig 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.createKmsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the Kms config properties with the full spec - * - * @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 - * KmsConfig 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 {google.cloud.netapp.v1.KmsConfig} request.kmsConfig - * Required. The KmsConfig being updated - * @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/v1/net_app.update_kms_config.js - * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async - */ - updateKmsConfig( - request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateKmsConfig( - request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateKmsConfig( - request: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateKmsConfig( - request?: protos.google.cloud.netapp.v1.IUpdateKmsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'kms_config.name': request.kmsConfig!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateKmsConfig response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateKmsConfig request %j', request); - return this.innerApiCalls.updateKmsConfig(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateKmsConfig response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateKmsConfig()`. - * @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/v1/net_app.update_kms_config.js - * region_tag:netapp_v1_generated_NetApp_UpdateKmsConfig_async - */ - async checkUpdateKmsConfigProgress(name: string): Promise>{ - this._log.info('updateKmsConfig 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.updateKmsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Encrypt the existing volumes without CMEK encryption with the desired the - * KMS config for the whole region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the KmsConfig. - * @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/v1/net_app.encrypt_volumes.js - * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async - */ - encryptVolumes( - request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - encryptVolumes( - request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - encryptVolumes( - request: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - encryptVolumes( - request?: protos.google.cloud.netapp.v1.IEncryptVolumesRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('encryptVolumes response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('encryptVolumes request %j', request); - return this.innerApiCalls.encryptVolumes(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('encryptVolumes response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `encryptVolumes()`. - * @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/v1/net_app.encrypt_volumes.js - * region_tag:netapp_v1_generated_NetApp_EncryptVolumes_async - */ - async checkEncryptVolumesProgress(name: string): Promise>{ - this._log.info('encryptVolumes 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.encryptVolumes, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Warning! This operation will permanently delete the Kms config. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the KmsConfig. - * @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/v1/net_app.delete_kms_config.js - * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async - */ - deleteKmsConfig( - request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteKmsConfig( - request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteKmsConfig( - request: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteKmsConfig( - request?: protos.google.cloud.netapp.v1.IDeleteKmsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteKmsConfig response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteKmsConfig request %j', request); - return this.innerApiCalls.deleteKmsConfig(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteKmsConfig response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteKmsConfig()`. - * @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/v1/net_app.delete_kms_config.js - * region_tag:netapp_v1_generated_NetApp_DeleteKmsConfig_async - */ - async checkDeleteKmsConfigProgress(name: string): Promise>{ - this._log.info('deleteKmsConfig 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.deleteKmsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a new replication for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @param {google.cloud.netapp.v1.Replication} request.replication - * Required. A replication resource - * @param {string} request.replicationId - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @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/v1/net_app.create_replication.js - * region_tag:netapp_v1_generated_NetApp_CreateReplication_async - */ - createReplication( - request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createReplication( - request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createReplication( - request: protos.google.cloud.netapp.v1.ICreateReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createReplication( - request?: protos.google.cloud.netapp.v1.ICreateReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createReplication request %j', request); - return this.innerApiCalls.createReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createReplication()`. - * @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/v1/net_app.create_replication.js - * region_tag:netapp_v1_generated_NetApp_CreateReplication_async - */ - async checkCreateReplicationProgress(name: string): Promise>{ - this._log.info('createReplication 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.createReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a replication. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The replication resource name, in the format - * `projects/* /locations/* /volumes/* /replications/{replication_id}` - * @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/v1/net_app.delete_replication.js - * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async - */ - deleteReplication( - request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteReplication( - request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteReplication( - request: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteReplication( - request?: protos.google.cloud.netapp.v1.IDeleteReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteReplication request %j', request); - return this.innerApiCalls.deleteReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteReplication()`. - * @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/v1/net_app.delete_replication.js - * region_tag:netapp_v1_generated_NetApp_DeleteReplication_async - */ - async checkDeleteReplicationProgress(name: string): Promise>{ - this._log.info('deleteReplication 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.deleteReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a specific replication. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.netapp.v1.Replication} request.replication - * Required. A replication 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 - * 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/v1/net_app.update_replication.js - * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async - */ - updateReplication( - request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateReplication( - request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateReplication( - request: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateReplication( - request?: protos.google.cloud.netapp.v1.IUpdateReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'replication.name': request.replication!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateReplication request %j', request); - return this.innerApiCalls.updateReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateReplication()`. - * @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/v1/net_app.update_replication.js - * region_tag:netapp_v1_generated_NetApp_UpdateReplication_async - */ - async checkUpdateReplicationProgress(name: string): Promise>{ - this._log.info('updateReplication 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.updateReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Stop Cross Region Replication. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @param {boolean} request.force - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - * @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/v1/net_app.stop_replication.js - * region_tag:netapp_v1_generated_NetApp_StopReplication_async - */ - stopReplication( - request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - stopReplication( - request: protos.google.cloud.netapp.v1.IStopReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - stopReplication( - request: protos.google.cloud.netapp.v1.IStopReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - stopReplication( - request?: protos.google.cloud.netapp.v1.IStopReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('stopReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('stopReplication request %j', request); - return this.innerApiCalls.stopReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('stopReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `stopReplication()`. - * @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/v1/net_app.stop_replication.js - * region_tag:netapp_v1_generated_NetApp_StopReplication_async - */ - async checkStopReplicationProgress(name: string): Promise>{ - this._log.info('stopReplication 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.stopReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Resume Cross Region Replication. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @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/v1/net_app.resume_replication.js - * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async - */ - resumeReplication( - request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - resumeReplication( - request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - resumeReplication( - request: protos.google.cloud.netapp.v1.IResumeReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - resumeReplication( - request?: protos.google.cloud.netapp.v1.IResumeReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('resumeReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('resumeReplication request %j', request); - return this.innerApiCalls.resumeReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('resumeReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `resumeReplication()`. - * @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/v1/net_app.resume_replication.js - * region_tag:netapp_v1_generated_NetApp_ResumeReplication_async - */ - async checkResumeReplicationProgress(name: string): Promise>{ - this._log.info('resumeReplication 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.resumeReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Reverses direction of replication. Source becomes destination and - * destination becomes source. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @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/v1/net_app.reverse_replication_direction.js - * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async - */ - reverseReplicationDirection( - request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - reverseReplicationDirection( - request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - reverseReplicationDirection( - request: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - reverseReplicationDirection( - request?: protos.google.cloud.netapp.v1.IReverseReplicationDirectionRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('reverseReplicationDirection response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('reverseReplicationDirection request %j', request); - return this.innerApiCalls.reverseReplicationDirection(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('reverseReplicationDirection response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `reverseReplicationDirection()`. - * @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/v1/net_app.reverse_replication_direction.js - * region_tag:netapp_v1_generated_NetApp_ReverseReplicationDirection_async - */ - async checkReverseReplicationDirectionProgress(name: string): Promise>{ - this._log.info('reverseReplicationDirection 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.reverseReplicationDirection, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Establish replication peering. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @param {string} request.peerClusterName - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * @param {string} request.peerSvmName - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * @param {string[]} [request.peerIpAddresses] - * Optional. List of IPv4 ip addresses to be used for peering. - * @param {string} request.peerVolumeName - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * @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/v1/net_app.establish_peering.js - * region_tag:netapp_v1_generated_NetApp_EstablishPeering_async - */ - establishPeering( - request?: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - establishPeering( - request: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - establishPeering( - request: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - establishPeering( - request?: protos.google.cloud.netapp.v1.IEstablishPeeringRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('establishPeering response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('establishPeering request %j', request); - return this.innerApiCalls.establishPeering(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('establishPeering response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `establishPeering()`. - * @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/v1/net_app.establish_peering.js - * region_tag:netapp_v1_generated_NetApp_EstablishPeering_async - */ - async checkEstablishPeeringProgress(name: string): Promise>{ - this._log.info('establishPeering 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.establishPeering, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Syncs the replication. This will invoke one time volume data transfer from - * source to destination. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @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/v1/net_app.sync_replication.js - * region_tag:netapp_v1_generated_NetApp_SyncReplication_async - */ - syncReplication( - request?: protos.google.cloud.netapp.v1.ISyncReplicationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - syncReplication( - request: protos.google.cloud.netapp.v1.ISyncReplicationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - syncReplication( - request: protos.google.cloud.netapp.v1.ISyncReplicationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - syncReplication( - request?: protos.google.cloud.netapp.v1.ISyncReplicationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('syncReplication response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('syncReplication request %j', request); - return this.innerApiCalls.syncReplication(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('syncReplication response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `syncReplication()`. - * @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/v1/net_app.sync_replication.js - * region_tag:netapp_v1_generated_NetApp_SyncReplication_async - */ - async checkSyncReplicationProgress(name: string): Promise>{ - this._log.info('syncReplication 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.syncReplication, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates new backup vault - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * @param {string} request.backupVaultId - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @param {google.cloud.netapp.v1.BackupVault} request.backupVault - * Required. A backupVault 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 - * 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/v1/net_app.create_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_CreateBackupVault_async - */ - createBackupVault( - request?: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupVault( - request: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request?: protos.google.cloud.netapp.v1.ICreateBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.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.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/v1/net_app.create_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_CreateBackupVault_async - */ - async checkCreateBackupVaultProgress(name: string): Promise>{ - 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; - } -/** - * Updates the settings of a specific backup vault. - * - * @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 to be updated. - * 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 {google.cloud.netapp.v1.BackupVault} request.backupVault - * Required. The backupVault being updated - * @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/v1/net_app.update_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackupVault_async - */ - updateBackupVault( - request?: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackupVault( - request: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request?: protos.google.cloud.netapp.v1.IUpdateBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.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.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/v1/net_app.update_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackupVault_async - */ - async checkUpdateBackupVaultProgress(name: string): Promise>{ - 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; - } -/** - * Warning! This operation will permanently delete the backup vault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * @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/v1/net_app.delete_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackupVault_async - */ - deleteBackupVault( - request?: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupVault( - request: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request?: protos.google.cloud.netapp.v1.IDeleteBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.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.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/v1/net_app.delete_backup_vault.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackupVault_async - */ - async checkDeleteBackupVaultProgress(name: string): Promise>{ - 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; - } -/** - * Creates a backup from the volume specified in the request - * The backup can be created from the given snapshot if specified in the - * request. If no snapshot specified, there'll be a new snapshot taken to - * initiate the backup creation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The NetApp backupVault to create the backups of, in the format - * `projects/* /locations/* /backupVaults/{backup_vault_id}` - * @param {string} request.backupId - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @param {google.cloud.netapp.v1.Backup} request.backup - * Required. A 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 - * 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/v1/net_app.create_backup.js - * region_tag:netapp_v1_generated_NetApp_CreateBackup_async - */ - createBackup( - request?: protos.google.cloud.netapp.v1.ICreateBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackup( - request: protos.google.cloud.netapp.v1.ICreateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackup( - request: protos.google.cloud.netapp.v1.ICreateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackup( - request?: protos.google.cloud.netapp.v1.ICreateBackupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createBackup response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createBackup request %j', request); - return this.innerApiCalls.createBackup(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createBackup response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createBackup()`. - * @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/v1/net_app.create_backup.js - * region_tag:netapp_v1_generated_NetApp_CreateBackup_async - */ - async checkCreateBackupProgress(name: string): Promise>{ - this._log.info('createBackup 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.createBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Warning! This operation will permanently delete the backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * @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/v1/net_app.delete_backup.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackup_async - */ - deleteBackup( - request?: protos.google.cloud.netapp.v1.IDeleteBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackup( - request: protos.google.cloud.netapp.v1.IDeleteBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request: protos.google.cloud.netapp.v1.IDeleteBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request?: protos.google.cloud.netapp.v1.IDeleteBackupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.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.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/v1/net_app.delete_backup.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackup_async - */ - async checkDeleteBackupProgress(name: string): Promise>{ - 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; - } -/** - * Update backup with full spec. - * - * @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 to be updated. - * 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 {google.cloud.netapp.v1.Backup} request.backup - * Required. The backup being updated - * @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/v1/net_app.update_backup.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackup_async - */ - updateBackup( - request?: protos.google.cloud.netapp.v1.IUpdateBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackup( - request: protos.google.cloud.netapp.v1.IUpdateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request: protos.google.cloud.netapp.v1.IUpdateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request?: protos.google.cloud.netapp.v1.IUpdateBackupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.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.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/v1/net_app.update_backup.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackup_async - */ - async checkUpdateBackupProgress(name: string): Promise>{ - 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; - } -/** - * Creates new backup policy - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * @param {google.cloud.netapp.v1.BackupPolicy} request.backupPolicy - * Required. A backupPolicy resource - * @param {string} request.backupPolicyId - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @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/v1/net_app.create_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_CreateBackupPolicy_async - */ - createBackupPolicy( - request?: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPolicy( - request: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPolicy( - request: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPolicy( - request?: protos.google.cloud.netapp.v1.ICreateBackupPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createBackupPolicy response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createBackupPolicy request %j', request); - return this.innerApiCalls.createBackupPolicy(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createBackupPolicy response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createBackupPolicy()`. - * @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/v1/net_app.create_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_CreateBackupPolicy_async - */ - async checkCreateBackupPolicyProgress(name: string): Promise>{ - this._log.info('createBackupPolicy 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.createBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates settings of a specific backup policy. - * - * @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 Policy 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 {google.cloud.netapp.v1.BackupPolicy} request.backupPolicy - * Required. The backup policy being updated - * @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/v1/net_app.update_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackupPolicy_async - */ - updateBackupPolicy( - request?: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackupPolicy( - request: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupPolicy( - request: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupPolicy( - request?: protos.google.cloud.netapp.v1.IUpdateBackupPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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_policy.name': request.backupPolicy!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateBackupPolicy response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateBackupPolicy request %j', request); - return this.innerApiCalls.updateBackupPolicy(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateBackupPolicy response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateBackupPolicy()`. - * @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/v1/net_app.update_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_UpdateBackupPolicy_async - */ - async checkUpdateBackupPolicyProgress(name: string): Promise>{ - this._log.info('updateBackupPolicy 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.updateBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Warning! This operation will permanently delete the backup policy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * @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/v1/net_app.delete_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackupPolicy_async - */ - deleteBackupPolicy( - request?: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPolicy( - request: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPolicy( - request: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPolicy( - request?: protos.google.cloud.netapp.v1.IDeleteBackupPolicyRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteBackupPolicy response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteBackupPolicy request %j', request); - return this.innerApiCalls.deleteBackupPolicy(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteBackupPolicy response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteBackupPolicy()`. - * @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/v1/net_app.delete_backup_policy.js - * region_tag:netapp_v1_generated_NetApp_DeleteBackupPolicy_async - */ - async checkDeleteBackupPolicyProgress(name: string): Promise>{ - this._log.info('deleteBackupPolicy 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.deleteBackupPolicy, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new quota rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for CreateQuotaRuleRequest - * @param {google.cloud.netapp.v1.QuotaRule} request.quotaRule - * Required. Fields of the to be created quota rule. - * @param {string} request.quotaRuleId - * Required. ID of the quota rule to create. Must be unique within the parent - * resource. Must contain only letters, numbers, underscore and hyphen, with - * the first character a letter or underscore, the last a letter or underscore - * or a number, and a 63 character maximum. - * @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/v1/net_app.create_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_CreateQuotaRule_async - */ - createQuotaRule( - request?: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createQuotaRule( - request: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createQuotaRule( - request: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createQuotaRule( - request?: protos.google.cloud.netapp.v1.ICreateQuotaRuleRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createQuotaRule response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createQuotaRule request %j', request); - return this.innerApiCalls.createQuotaRule(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createQuotaRule response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createQuotaRule()`. - * @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/v1/net_app.create_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_CreateQuotaRule_async - */ - async checkCreateQuotaRuleProgress(name: string): Promise>{ - this._log.info('createQuotaRule 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.createQuotaRule, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates a quota rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Field mask is used to specify the fields to be overwritten in the - * Quota Rule 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 {google.cloud.netapp.v1.QuotaRule} request.quotaRule - * Required. The quota rule being updated - * @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/v1/net_app.update_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_UpdateQuotaRule_async - */ - updateQuotaRule( - request?: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateQuotaRule( - request: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateQuotaRule( - request: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateQuotaRule( - request?: protos.google.cloud.netapp.v1.IUpdateQuotaRuleRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'quota_rule.name': request.quotaRule!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateQuotaRule response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateQuotaRule request %j', request); - return this.innerApiCalls.updateQuotaRule(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateQuotaRule response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateQuotaRule()`. - * @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/v1/net_app.update_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_UpdateQuotaRule_async - */ - async checkUpdateQuotaRuleProgress(name: string): Promise>{ - this._log.info('updateQuotaRule 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.updateQuotaRule, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a quota rule. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the quota rule. - * @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/v1/net_app.delete_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_DeleteQuotaRule_async - */ - deleteQuotaRule( - request?: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteQuotaRule( - request: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteQuotaRule( - request: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteQuotaRule( - request?: protos.google.cloud.netapp.v1.IDeleteQuotaRuleRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteQuotaRule response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteQuotaRule request %j', request); - return this.innerApiCalls.deleteQuotaRule(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteQuotaRule response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteQuotaRule()`. - * @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/v1/net_app.delete_quota_rule.js - * region_tag:netapp_v1_generated_NetApp_DeleteQuotaRule_async - */ - async checkDeleteQuotaRuleProgress(name: string): Promise>{ - this._log.info('deleteQuotaRule 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.deleteQuotaRule, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Restore files from a backup to a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The volume resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @param {string} request.backup - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * @param {string[]} request.fileList - * Required. List of files to be restored, specified by their absolute path in - * the source volume. - * @param {string} [request.restoreDestinationPath] - * Optional. Absolute directory path in the destination volume. This is - * required if the `file_list` is provided. - * @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/v1/net_app.restore_backup_files.js - * region_tag:netapp_v1_generated_NetApp_RestoreBackupFiles_async - */ - restoreBackupFiles( - request?: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - restoreBackupFiles( - request: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackupFiles( - request: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackupFiles( - request?: protos.google.cloud.netapp.v1.IRestoreBackupFilesRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('restoreBackupFiles response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('restoreBackupFiles request %j', request); - return this.innerApiCalls.restoreBackupFiles(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('restoreBackupFiles response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `restoreBackupFiles()`. - * @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/v1/net_app.restore_backup_files.js - * region_tag:netapp_v1_generated_NetApp_RestoreBackupFiles_async - */ - async checkRestoreBackupFilesProgress(name: string): Promise>{ - this._log.info('restoreBackupFiles 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.restoreBackupFiles, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new host group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for CreateHostGroupRequest - * @param {google.cloud.netapp.v1.HostGroup} request.hostGroup - * Required. Fields of the host group to create. - * @param {string} request.hostGroupId - * Required. ID of the host group to create. Must be unique within the parent - * resource. Must contain only letters, numbers, and hyphen, with - * the first character a letter or underscore, the last a letter or underscore - * or a number, and a 63 character maximum. - * @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/v1/net_app.create_host_group.js - * region_tag:netapp_v1_generated_NetApp_CreateHostGroup_async - */ - createHostGroup( - request?: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createHostGroup( - request: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createHostGroup( - request: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createHostGroup( - request?: protos.google.cloud.netapp.v1.ICreateHostGroupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createHostGroup response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('createHostGroup request %j', request); - return this.innerApiCalls.createHostGroup(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createHostGroup response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createHostGroup()`. - * @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/v1/net_app.create_host_group.js - * region_tag:netapp_v1_generated_NetApp_CreateHostGroup_async - */ - async checkCreateHostGroupProgress(name: string): Promise>{ - this._log.info('createHostGroup 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.createHostGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an existing host group. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.netapp.v1.HostGroup} request.hostGroup - * Required. The host group to update. - * The host group's `name` field is used to identify the host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. The list of fields to update. - * @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/v1/net_app.update_host_group.js - * region_tag:netapp_v1_generated_NetApp_UpdateHostGroup_async - */ - updateHostGroup( - request?: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateHostGroup( - request: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateHostGroup( - request: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateHostGroup( - request?: protos.google.cloud.netapp.v1.IUpdateHostGroupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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({ - 'host_group.name': request.hostGroup!.name ?? '', - }); - this.initialize().catch(err => {throw err}); - const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateHostGroup response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('updateHostGroup request %j', request); - return this.innerApiCalls.updateHostGroup(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateHostGroup response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `updateHostGroup()`. - * @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/v1/net_app.update_host_group.js - * region_tag:netapp_v1_generated_NetApp_UpdateHostGroup_async - */ - async checkUpdateHostGroupProgress(name: string): Promise>{ - this._log.info('updateHostGroup 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.updateHostGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a host group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the host group. - * Format: - * `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`. - * @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/v1/net_app.delete_host_group.js - * region_tag:netapp_v1_generated_NetApp_DeleteHostGroup_async - */ - deleteHostGroup( - request?: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteHostGroup( - request: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteHostGroup( - request: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteHostGroup( - request?: protos.google.cloud.netapp.v1.IDeleteHostGroupRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - 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.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteHostGroup response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. - } - : undefined; - this._log.info('deleteHostGroup request %j', request); - return this.innerApiCalls.deleteHostGroup(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteHostGroup response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteHostGroup()`. - * @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/v1/net_app.delete_host_group.js - * region_tag:netapp_v1_generated_NetApp_DeleteHostGroup_async - */ - async checkDeleteHostGroupProgress(name: string): Promise>{ - this._log.info('deleteHostGroup 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.deleteHostGroup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Returns descriptions of all storage pools owned by the caller. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} [request.orderBy] - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * @param {string} [request.filter] - * Optional. List filter. - * @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.netapp.v1.StoragePool|StoragePool}. - * 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 `listStoragePoolsAsync()` - * 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. - */ - listStoragePools( - request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IStoragePool[], - protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse - ]>; - listStoragePools( - request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, - protos.google.cloud.netapp.v1.IStoragePool>): void; - listStoragePools( - request: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, - protos.google.cloud.netapp.v1.IStoragePool>): void; - listStoragePools( - request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, - protos.google.cloud.netapp.v1.IStoragePool>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, - protos.google.cloud.netapp.v1.IStoragePool>): - Promise<[ - protos.google.cloud.netapp.v1.IStoragePool[], - protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse - ]>|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.netapp.v1.IListStoragePoolsRequest, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse|null|undefined, - protos.google.cloud.netapp.v1.IStoragePool>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listStoragePools values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listStoragePools request %j', request); - return this.innerApiCalls - .listStoragePools(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IStoragePool[], - protos.google.cloud.netapp.v1.IListStoragePoolsRequest|null, - protos.google.cloud.netapp.v1.IListStoragePoolsResponse - ]) => { - this._log.info('listStoragePools values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listStoragePools`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} [request.orderBy] - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * @param {string} [request.filter] - * Optional. List filter. - * @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.netapp.v1.StoragePool|StoragePool} 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 `listStoragePoolsAsync()` - * 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. - */ - listStoragePoolsStream( - request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - 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['listStoragePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listStoragePools stream %j', request); - return this.descriptors.page.listStoragePools.createStream( - this.innerApiCalls.listStoragePools as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listStoragePools`, 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. Parent value - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} [request.orderBy] - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * @param {string} [request.filter] - * Optional. List filter. - * @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.netapp.v1.StoragePool|StoragePool}. 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/v1/net_app.list_storage_pools.js - * region_tag:netapp_v1_generated_NetApp_ListStoragePools_async - */ - listStoragePoolsAsync( - request?: protos.google.cloud.netapp.v1.IListStoragePoolsRequest, - 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['listStoragePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listStoragePools iterate %j', request); - return this.descriptors.page.listStoragePools.asyncIterate( - this.innerApiCalls['listStoragePools'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Volumes in a given project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListVolumesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.Volume|Volume}. - * 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 `listVolumesAsync()` - * 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. - */ - listVolumes( - request?: protos.google.cloud.netapp.v1.IListVolumesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IVolume[], - protos.google.cloud.netapp.v1.IListVolumesRequest|null, - protos.google.cloud.netapp.v1.IListVolumesResponse - ]>; - listVolumes( - request: protos.google.cloud.netapp.v1.IListVolumesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListVolumesRequest, - protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, - protos.google.cloud.netapp.v1.IVolume>): void; - listVolumes( - request: protos.google.cloud.netapp.v1.IListVolumesRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListVolumesRequest, - protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, - protos.google.cloud.netapp.v1.IVolume>): void; - listVolumes( - request?: protos.google.cloud.netapp.v1.IListVolumesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListVolumesRequest, - protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, - protos.google.cloud.netapp.v1.IVolume>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListVolumesRequest, - protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, - protos.google.cloud.netapp.v1.IVolume>): - Promise<[ - protos.google.cloud.netapp.v1.IVolume[], - protos.google.cloud.netapp.v1.IListVolumesRequest|null, - protos.google.cloud.netapp.v1.IListVolumesResponse - ]>|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.netapp.v1.IListVolumesRequest, - protos.google.cloud.netapp.v1.IListVolumesResponse|null|undefined, - protos.google.cloud.netapp.v1.IVolume>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listVolumes values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listVolumes request %j', request); - return this.innerApiCalls - .listVolumes(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IVolume[], - protos.google.cloud.netapp.v1.IListVolumesRequest|null, - protos.google.cloud.netapp.v1.IListVolumesResponse - ]) => { - this._log.info('listVolumes values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listVolumes`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListVolumesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.Volume|Volume} 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 `listVolumesAsync()` - * 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. - */ - listVolumesStream( - request?: protos.google.cloud.netapp.v1.IListVolumesRequest, - 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['listVolumes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVolumes stream %j', request); - return this.descriptors.page.listVolumes.createStream( - this.innerApiCalls.listVolumes as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listVolumes`, 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. Parent value for ListVolumesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.Volume|Volume}. 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/v1/net_app.list_volumes.js - * region_tag:netapp_v1_generated_NetApp_ListVolumes_async - */ - listVolumesAsync( - request?: protos.google.cloud.netapp.v1.IListVolumesRequest, - 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['listVolumes']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listVolumes iterate %j', request); - return this.descriptors.page.listVolumes.asyncIterate( - this.innerApiCalls['listVolumes'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns descriptions of all snapshots for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Snapshot|Snapshot}. - * 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 `listSnapshotsAsync()` - * 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. - */ - listSnapshots( - request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.ISnapshot[], - protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, - protos.google.cloud.netapp.v1.IListSnapshotsResponse - ]>; - listSnapshots( - request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListSnapshotsRequest, - protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, - protos.google.cloud.netapp.v1.ISnapshot>): void; - listSnapshots( - request: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListSnapshotsRequest, - protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, - protos.google.cloud.netapp.v1.ISnapshot>): void; - listSnapshots( - request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListSnapshotsRequest, - protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, - protos.google.cloud.netapp.v1.ISnapshot>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListSnapshotsRequest, - protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, - protos.google.cloud.netapp.v1.ISnapshot>): - Promise<[ - protos.google.cloud.netapp.v1.ISnapshot[], - protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, - protos.google.cloud.netapp.v1.IListSnapshotsResponse - ]>|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.netapp.v1.IListSnapshotsRequest, - protos.google.cloud.netapp.v1.IListSnapshotsResponse|null|undefined, - protos.google.cloud.netapp.v1.ISnapshot>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listSnapshots values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listSnapshots request %j', request); - return this.innerApiCalls - .listSnapshots(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.ISnapshot[], - protos.google.cloud.netapp.v1.IListSnapshotsRequest|null, - protos.google.cloud.netapp.v1.IListSnapshotsResponse - ]) => { - this._log.info('listSnapshots values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listSnapshots`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Snapshot|Snapshot} 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 `listSnapshotsAsync()` - * 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. - */ - listSnapshotsStream( - request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - 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['listSnapshots']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listSnapshots stream %j', request); - return this.descriptors.page.listSnapshots.createStream( - this.innerApiCalls.listSnapshots as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listSnapshots`, 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 volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Snapshot|Snapshot}. 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/v1/net_app.list_snapshots.js - * region_tag:netapp_v1_generated_NetApp_ListSnapshots_async - */ - listSnapshotsAsync( - request?: protos.google.cloud.netapp.v1.IListSnapshotsRequest, - 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['listSnapshots']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listSnapshots iterate %j', request); - return this.descriptors.page.listSnapshots.asyncIterate( - this.innerApiCalls['listSnapshots'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists active directories. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListActiveDirectoriesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.ActiveDirectory|ActiveDirectory}. - * 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 `listActiveDirectoriesAsync()` - * 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. - */ - listActiveDirectories( - request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IActiveDirectory[], - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse - ]>; - listActiveDirectories( - request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, - protos.google.cloud.netapp.v1.IActiveDirectory>): void; - listActiveDirectories( - request: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, - protos.google.cloud.netapp.v1.IActiveDirectory>): void; - listActiveDirectories( - request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, - protos.google.cloud.netapp.v1.IActiveDirectory>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, - protos.google.cloud.netapp.v1.IActiveDirectory>): - Promise<[ - protos.google.cloud.netapp.v1.IActiveDirectory[], - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse - ]>|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.netapp.v1.IListActiveDirectoriesRequest, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse|null|undefined, - protos.google.cloud.netapp.v1.IActiveDirectory>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listActiveDirectories values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listActiveDirectories request %j', request); - return this.innerApiCalls - .listActiveDirectories(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IActiveDirectory[], - protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest|null, - protos.google.cloud.netapp.v1.IListActiveDirectoriesResponse - ]) => { - this._log.info('listActiveDirectories values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listActiveDirectories`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListActiveDirectoriesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.ActiveDirectory|ActiveDirectory} 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 `listActiveDirectoriesAsync()` - * 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. - */ - listActiveDirectoriesStream( - request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - 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['listActiveDirectories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listActiveDirectories stream %j', request); - return this.descriptors.page.listActiveDirectories.createStream( - this.innerApiCalls.listActiveDirectories as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listActiveDirectories`, 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. Parent value for ListActiveDirectoriesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.ActiveDirectory|ActiveDirectory}. 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/v1/net_app.list_active_directories.js - * region_tag:netapp_v1_generated_NetApp_ListActiveDirectories_async - */ - listActiveDirectoriesAsync( - request?: protos.google.cloud.netapp.v1.IListActiveDirectoriesRequest, - 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['listActiveDirectories']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listActiveDirectories iterate %j', request); - return this.descriptors.page.listActiveDirectories.asyncIterate( - this.innerApiCalls['listActiveDirectories'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns descriptions of all KMS configs owned by the caller. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.KmsConfig|KmsConfig}. - * 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 `listKmsConfigsAsync()` - * 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. - */ - listKmsConfigs( - request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IKmsConfig[], - protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse - ]>; - listKmsConfigs( - request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, - protos.google.cloud.netapp.v1.IKmsConfig>): void; - listKmsConfigs( - request: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, - protos.google.cloud.netapp.v1.IKmsConfig>): void; - listKmsConfigs( - request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, - protos.google.cloud.netapp.v1.IKmsConfig>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, - protos.google.cloud.netapp.v1.IKmsConfig>): - Promise<[ - protos.google.cloud.netapp.v1.IKmsConfig[], - protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse - ]>|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.netapp.v1.IListKmsConfigsRequest, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse|null|undefined, - protos.google.cloud.netapp.v1.IKmsConfig>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listKmsConfigs values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listKmsConfigs request %j', request); - return this.innerApiCalls - .listKmsConfigs(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IKmsConfig[], - protos.google.cloud.netapp.v1.IListKmsConfigsRequest|null, - protos.google.cloud.netapp.v1.IListKmsConfigsResponse - ]) => { - this._log.info('listKmsConfigs values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listKmsConfigs`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.KmsConfig|KmsConfig} 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 `listKmsConfigsAsync()` - * 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. - */ - listKmsConfigsStream( - request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - 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['listKmsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listKmsConfigs stream %j', request); - return this.descriptors.page.listKmsConfigs.createStream( - this.innerApiCalls.listKmsConfigs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listKmsConfigs`, 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. Parent value - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.KmsConfig|KmsConfig}. 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/v1/net_app.list_kms_configs.js - * region_tag:netapp_v1_generated_NetApp_ListKmsConfigs_async - */ - listKmsConfigsAsync( - request?: protos.google.cloud.netapp.v1.IListKmsConfigsRequest, - 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['listKmsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listKmsConfigs iterate %j', request); - return this.descriptors.page.listKmsConfigs.asyncIterate( - this.innerApiCalls['listKmsConfigs'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns descriptions of all replications for a volume. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Replication|Replication}. - * 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 `listReplicationsAsync()` - * 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. - */ - listReplications( - request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IReplication[], - protos.google.cloud.netapp.v1.IListReplicationsRequest|null, - protos.google.cloud.netapp.v1.IListReplicationsResponse - ]>; - listReplications( - request: protos.google.cloud.netapp.v1.IListReplicationsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListReplicationsRequest, - protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, - protos.google.cloud.netapp.v1.IReplication>): void; - listReplications( - request: protos.google.cloud.netapp.v1.IListReplicationsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListReplicationsRequest, - protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, - protos.google.cloud.netapp.v1.IReplication>): void; - listReplications( - request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListReplicationsRequest, - protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, - protos.google.cloud.netapp.v1.IReplication>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListReplicationsRequest, - protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, - protos.google.cloud.netapp.v1.IReplication>): - Promise<[ - protos.google.cloud.netapp.v1.IReplication[], - protos.google.cloud.netapp.v1.IListReplicationsRequest|null, - protos.google.cloud.netapp.v1.IListReplicationsResponse - ]>|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.netapp.v1.IListReplicationsRequest, - protos.google.cloud.netapp.v1.IListReplicationsResponse|null|undefined, - protos.google.cloud.netapp.v1.IReplication>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listReplications values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listReplications request %j', request); - return this.innerApiCalls - .listReplications(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IReplication[], - protos.google.cloud.netapp.v1.IListReplicationsRequest|null, - protos.google.cloud.netapp.v1.IListReplicationsResponse - ]) => { - this._log.info('listReplications values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listReplications`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Replication|Replication} 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 `listReplicationsAsync()` - * 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. - */ - listReplicationsStream( - request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, - 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['listReplications']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listReplications stream %j', request); - return this.descriptors.page.listReplications.createStream( - this.innerApiCalls.listReplications as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listReplications`, 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 volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.Replication|Replication}. 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/v1/net_app.list_replications.js - * region_tag:netapp_v1_generated_NetApp_ListReplications_async - */ - listReplicationsAsync( - request?: protos.google.cloud.netapp.v1.IListReplicationsRequest, - 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['listReplications']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listReplications iterate %j', request); - return this.descriptors.page.listReplications.asyncIterate( - this.innerApiCalls['listReplications'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns list of all available backup vaults. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackupVault[], - protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse - ]>; - listBackupVaults( - request: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupVault>): void; - listBackupVaults( - request: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupVault>): void; - listBackupVaults( - request?: protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupVaultsRequest, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupVault>): - Promise<[ - protos.google.cloud.netapp.v1.IBackupVault[], - protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, - protos.google.cloud.netapp.v1.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.netapp.v1.IListBackupVaultsRequest, - protos.google.cloud.netapp.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackupVault[], - protos.google.cloud.netapp.v1.IListBackupVaultsRequest|null, - protos.google.cloud.netapp.v1.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 location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.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.netapp.v1.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 location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * List filter. - * @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.netapp.v1.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/v1/net_app.list_backup_vaults.js - * region_tag:netapp_v1_generated_NetApp_ListBackupVaults_async - */ - listBackupVaultsAsync( - request?: protos.google.cloud.netapp.v1.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; - } - /** - * Returns descriptions of all backups for a backupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * @param {number} request.pageSize - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * @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.netapp.v1.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.netapp.v1.IListBackupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackup[], - protos.google.cloud.netapp.v1.IListBackupsRequest|null, - protos.google.cloud.netapp.v1.IListBackupsResponse - ]>; - listBackups( - request: protos.google.cloud.netapp.v1.IListBackupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupsRequest, - protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackup>): void; - listBackups( - request: protos.google.cloud.netapp.v1.IListBackupsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupsRequest, - protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackup>): void; - listBackups( - request?: protos.google.cloud.netapp.v1.IListBackupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupsRequest, - protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackup>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupsRequest, - protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackup>): - Promise<[ - protos.google.cloud.netapp.v1.IBackup[], - protos.google.cloud.netapp.v1.IListBackupsRequest|null, - protos.google.cloud.netapp.v1.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.netapp.v1.IListBackupsRequest, - protos.google.cloud.netapp.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.netapp.v1.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.netapp.v1.IBackup[], - protos.google.cloud.netapp.v1.IListBackupsRequest|null, - protos.google.cloud.netapp.v1.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 backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * @param {number} request.pageSize - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * @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.netapp.v1.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.netapp.v1.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 backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * @param {number} request.pageSize - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * @param {string} request.pageToken - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @param {string} request.orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @param {string} request.filter - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * @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.netapp.v1.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/v1/net_app.list_backups.js - * region_tag:netapp_v1_generated_NetApp_ListBackups_async - */ - listBackupsAsync( - request?: protos.google.cloud.netapp.v1.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; - } - /** - * Returns list of all available backup policies. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListBackupPoliciesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.BackupPolicy|BackupPolicy}. - * 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 `listBackupPoliciesAsync()` - * 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. - */ - listBackupPolicies( - request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IBackupPolicy[], - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse - ]>; - listBackupPolicies( - request: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupPolicy>): void; - listBackupPolicies( - request: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupPolicy>): void; - listBackupPolicies( - request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupPolicy>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupPolicy>): - Promise<[ - protos.google.cloud.netapp.v1.IBackupPolicy[], - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse - ]>|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.netapp.v1.IListBackupPoliciesRequest, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse|null|undefined, - protos.google.cloud.netapp.v1.IBackupPolicy>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listBackupPolicies values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listBackupPolicies request %j', request); - return this.innerApiCalls - .listBackupPolicies(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IBackupPolicy[], - protos.google.cloud.netapp.v1.IListBackupPoliciesRequest|null, - protos.google.cloud.netapp.v1.IListBackupPoliciesResponse - ]) => { - this._log.info('listBackupPolicies values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listBackupPolicies`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListBackupPoliciesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.BackupPolicy|BackupPolicy} 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 `listBackupPoliciesAsync()` - * 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. - */ - listBackupPoliciesStream( - request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - 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['listBackupPolicies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listBackupPolicies stream %j', request); - return this.descriptors.page.listBackupPolicies.createStream( - this.innerApiCalls.listBackupPolicies as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPolicies`, 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. Parent value for ListBackupPoliciesRequest - * @param {number} request.pageSize - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @param {string} request.pageToken - * A token identifying a page of results the server should return. - * @param {string} request.filter - * Filtering results - * @param {string} request.orderBy - * 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.netapp.v1.BackupPolicy|BackupPolicy}. 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/v1/net_app.list_backup_policies.js - * region_tag:netapp_v1_generated_NetApp_ListBackupPolicies_async - */ - listBackupPoliciesAsync( - request?: protos.google.cloud.netapp.v1.IListBackupPoliciesRequest, - 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['listBackupPolicies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listBackupPolicies iterate %j', request); - return this.descriptors.page.listBackupPolicies.asyncIterate( - this.innerApiCalls['listBackupPolicies'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns list of all quota rules in a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListQuotaRulesRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule}. - * 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 `listQuotaRulesAsync()` - * 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. - */ - listQuotaRules( - request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IQuotaRule[], - protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse - ]>; - listQuotaRules( - request: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, - protos.google.cloud.netapp.v1.IQuotaRule>): void; - listQuotaRules( - request: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, - protos.google.cloud.netapp.v1.IQuotaRule>): void; - listQuotaRules( - request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, - protos.google.cloud.netapp.v1.IQuotaRule>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, - protos.google.cloud.netapp.v1.IQuotaRule>): - Promise<[ - protos.google.cloud.netapp.v1.IQuotaRule[], - protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse - ]>|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.netapp.v1.IListQuotaRulesRequest, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse|null|undefined, - protos.google.cloud.netapp.v1.IQuotaRule>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listQuotaRules values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listQuotaRules request %j', request); - return this.innerApiCalls - .listQuotaRules(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IQuotaRule[], - protos.google.cloud.netapp.v1.IListQuotaRulesRequest|null, - protos.google.cloud.netapp.v1.IListQuotaRulesResponse - ]) => { - this._log.info('listQuotaRules values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listQuotaRules`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListQuotaRulesRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule} 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 `listQuotaRulesAsync()` - * 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. - */ - listQuotaRulesStream( - request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - 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['listQuotaRules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listQuotaRules stream %j', request); - return this.descriptors.page.listQuotaRules.createStream( - this.innerApiCalls.listQuotaRules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listQuotaRules`, 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. Parent value for ListQuotaRulesRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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.netapp.v1.QuotaRule|QuotaRule}. 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/v1/net_app.list_quota_rules.js - * region_tag:netapp_v1_generated_NetApp_ListQuotaRules_async - */ - listQuotaRulesAsync( - request?: protos.google.cloud.netapp.v1.IListQuotaRulesRequest, - 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['listQuotaRules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listQuotaRules iterate %j', request); - return this.descriptors.page.listQuotaRules.asyncIterate( - this.innerApiCalls['listQuotaRules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns a list of host groups in a `location`. Use `-` as location to list - * host groups across all locations. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListHostGroupsRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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. Filter to apply to the request. - * @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.netapp.v1.HostGroup|HostGroup}. - * 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 `listHostGroupsAsync()` - * 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. - */ - listHostGroups( - request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.netapp.v1.IHostGroup[], - protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, - protos.google.cloud.netapp.v1.IListHostGroupsResponse - ]>; - listHostGroups( - request: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListHostGroupsRequest, - protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IHostGroup>): void; - listHostGroups( - request: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - callback: PaginationCallback< - protos.google.cloud.netapp.v1.IListHostGroupsRequest, - protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IHostGroup>): void; - listHostGroups( - request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.netapp.v1.IListHostGroupsRequest, - protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IHostGroup>, - callback?: PaginationCallback< - protos.google.cloud.netapp.v1.IListHostGroupsRequest, - protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IHostGroup>): - Promise<[ - protos.google.cloud.netapp.v1.IHostGroup[], - protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, - protos.google.cloud.netapp.v1.IListHostGroupsResponse - ]>|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.netapp.v1.IListHostGroupsRequest, - protos.google.cloud.netapp.v1.IListHostGroupsResponse|null|undefined, - protos.google.cloud.netapp.v1.IHostGroup>|undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listHostGroups values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listHostGroups request %j', request); - return this.innerApiCalls - .listHostGroups(request, options, wrappedCallback) - ?.then(([response, input, output]: [ - protos.google.cloud.netapp.v1.IHostGroup[], - protos.google.cloud.netapp.v1.IListHostGroupsRequest|null, - protos.google.cloud.netapp.v1.IListHostGroupsResponse - ]) => { - this._log.info('listHostGroups values %j', response); - return [response, input, output]; - }); - } - -/** - * Equivalent to `listHostGroups`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Parent value for ListHostGroupsRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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. Filter to apply to the request. - * @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.netapp.v1.HostGroup|HostGroup} 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 `listHostGroupsAsync()` - * 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. - */ - listHostGroupsStream( - request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - 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['listHostGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listHostGroups stream %j', request); - return this.descriptors.page.listHostGroups.createStream( - this.innerApiCalls.listHostGroups as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listHostGroups`, 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. Parent value for ListHostGroupsRequest - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the 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. Filter to apply to the request. - * @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.netapp.v1.HostGroup|HostGroup}. 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/v1/net_app.list_host_groups.js - * region_tag:netapp_v1_generated_NetApp_ListHostGroups_async - */ - listHostGroupsAsync( - request?: protos.google.cloud.netapp.v1.IListHostGroupsRequest, - 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['listHostGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listHostGroups iterate %j', request); - return this.descriptors.page.listHostGroups.asyncIterate( - this.innerApiCalls['listHostGroups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 activeDirectory resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} active_directory - * @returns {string} Resource name string. - */ - activeDirectoryPath(project:string,location:string,activeDirectory:string) { - return this.pathTemplates.activeDirectoryPathTemplate.render({ - project: project, - location: location, - active_directory: activeDirectory, - }); - } - - /** - * Parse the project from ActiveDirectory resource. - * - * @param {string} activeDirectoryName - * A fully-qualified path representing ActiveDirectory resource. - * @returns {string} A string representing the project. - */ - matchProjectFromActiveDirectoryName(activeDirectoryName: string) { - return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).project; - } - - /** - * Parse the location from ActiveDirectory resource. - * - * @param {string} activeDirectoryName - * A fully-qualified path representing ActiveDirectory resource. - * @returns {string} A string representing the location. - */ - matchLocationFromActiveDirectoryName(activeDirectoryName: string) { - return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).location; - } - - /** - * Parse the active_directory from ActiveDirectory resource. - * - * @param {string} activeDirectoryName - * A fully-qualified path representing ActiveDirectory resource. - * @returns {string} A string representing the active_directory. - */ - matchActiveDirectoryFromActiveDirectoryName(activeDirectoryName: string) { - return this.pathTemplates.activeDirectoryPathTemplate.match(activeDirectoryName).active_directory; - } - - /** - * Return a fully-qualified backup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_vault - * @param {string} backup - * @returns {string} Resource name string. - */ - backupPath(project:string,location:string,backupVault:string,backup:string) { - return this.pathTemplates.backupPathTemplate.render({ - project: project, - location: location, - backup_vault: backupVault, - 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 backup_vault from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backup_vault. - */ - matchBackupVaultFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backup_vault; - } - - /** - * 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 backupPolicy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_policy - * @returns {string} Resource name string. - */ - backupPolicyPath(project:string,location:string,backupPolicy:string) { - return this.pathTemplates.backupPolicyPathTemplate.render({ - project: project, - location: location, - backup_policy: backupPolicy, - }); - } - - /** - * Parse the project from BackupPolicy resource. - * - * @param {string} backupPolicyName - * A fully-qualified path representing BackupPolicy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPolicyName(backupPolicyName: string) { - return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).project; - } - - /** - * Parse the location from BackupPolicy resource. - * - * @param {string} backupPolicyName - * A fully-qualified path representing BackupPolicy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPolicyName(backupPolicyName: string) { - return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).location; - } - - /** - * Parse the backup_policy from BackupPolicy resource. - * - * @param {string} backupPolicyName - * A fully-qualified path representing BackupPolicy resource. - * @returns {string} A string representing the backup_policy. - */ - matchBackupPolicyFromBackupPolicyName(backupPolicyName: string) { - return this.pathTemplates.backupPolicyPathTemplate.match(backupPolicyName).backup_policy; - } - - /** - * Return a fully-qualified backupVault resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_vault - * @returns {string} Resource name string. - */ - backupVaultPath(project:string,location:string,backupVault:string) { - return this.pathTemplates.backupVaultPathTemplate.render({ - project: project, - location: location, - backup_vault: 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 backup_vault from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the backup_vault. - */ - matchBackupVaultFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backup_vault; - } - - /** - * Return a fully-qualified hostGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} host_group - * @returns {string} Resource name string. - */ - hostGroupPath(project:string,location:string,hostGroup:string) { - return this.pathTemplates.hostGroupPathTemplate.render({ - project: project, - location: location, - host_group: hostGroup, - }); - } - - /** - * Parse the project from HostGroup resource. - * - * @param {string} hostGroupName - * A fully-qualified path representing HostGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromHostGroupName(hostGroupName: string) { - return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).project; - } - - /** - * Parse the location from HostGroup resource. - * - * @param {string} hostGroupName - * A fully-qualified path representing HostGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromHostGroupName(hostGroupName: string) { - return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).location; - } - - /** - * Parse the host_group from HostGroup resource. - * - * @param {string} hostGroupName - * A fully-qualified path representing HostGroup resource. - * @returns {string} A string representing the host_group. - */ - matchHostGroupFromHostGroupName(hostGroupName: string) { - return this.pathTemplates.hostGroupPathTemplate.match(hostGroupName).host_group; - } - - /** - * Return a fully-qualified kmsConfig resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} kms_config - * @returns {string} Resource name string. - */ - kmsConfigPath(project:string,location:string,kmsConfig:string) { - return this.pathTemplates.kmsConfigPathTemplate.render({ - project: project, - location: location, - kms_config: kmsConfig, - }); - } - - /** - * Parse the project from KmsConfig resource. - * - * @param {string} kmsConfigName - * A fully-qualified path representing KmsConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromKmsConfigName(kmsConfigName: string) { - return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).project; - } - - /** - * Parse the location from KmsConfig resource. - * - * @param {string} kmsConfigName - * A fully-qualified path representing KmsConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromKmsConfigName(kmsConfigName: string) { - return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).location; - } - - /** - * Parse the kms_config from KmsConfig resource. - * - * @param {string} kmsConfigName - * A fully-qualified path representing KmsConfig resource. - * @returns {string} A string representing the kms_config. - */ - matchKmsConfigFromKmsConfigName(kmsConfigName: string) { - return this.pathTemplates.kmsConfigPathTemplate.match(kmsConfigName).kms_config; - } - - /** - * Return a fully-qualified quotaRule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} volume - * @param {string} quota_rule - * @returns {string} Resource name string. - */ - quotaRulePath(project:string,location:string,volume:string,quotaRule:string) { - return this.pathTemplates.quotaRulePathTemplate.render({ - project: project, - location: location, - volume: volume, - quota_rule: quotaRule, - }); - } - - /** - * Parse the project from QuotaRule resource. - * - * @param {string} quotaRuleName - * A fully-qualified path representing QuotaRule resource. - * @returns {string} A string representing the project. - */ - matchProjectFromQuotaRuleName(quotaRuleName: string) { - return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).project; - } - - /** - * Parse the location from QuotaRule resource. - * - * @param {string} quotaRuleName - * A fully-qualified path representing QuotaRule resource. - * @returns {string} A string representing the location. - */ - matchLocationFromQuotaRuleName(quotaRuleName: string) { - return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).location; - } - - /** - * Parse the volume from QuotaRule resource. - * - * @param {string} quotaRuleName - * A fully-qualified path representing QuotaRule resource. - * @returns {string} A string representing the volume. - */ - matchVolumeFromQuotaRuleName(quotaRuleName: string) { - return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).volume; - } - - /** - * Parse the quota_rule from QuotaRule resource. - * - * @param {string} quotaRuleName - * A fully-qualified path representing QuotaRule resource. - * @returns {string} A string representing the quota_rule. - */ - matchQuotaRuleFromQuotaRuleName(quotaRuleName: string) { - return this.pathTemplates.quotaRulePathTemplate.match(quotaRuleName).quota_rule; - } - - /** - * Return a fully-qualified replication resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} volume - * @param {string} replication - * @returns {string} Resource name string. - */ - replicationPath(project:string,location:string,volume:string,replication:string) { - return this.pathTemplates.replicationPathTemplate.render({ - project: project, - location: location, - volume: volume, - replication: replication, - }); - } - - /** - * Parse the project from Replication resource. - * - * @param {string} replicationName - * A fully-qualified path representing Replication resource. - * @returns {string} A string representing the project. - */ - matchProjectFromReplicationName(replicationName: string) { - return this.pathTemplates.replicationPathTemplate.match(replicationName).project; - } - - /** - * Parse the location from Replication resource. - * - * @param {string} replicationName - * A fully-qualified path representing Replication resource. - * @returns {string} A string representing the location. - */ - matchLocationFromReplicationName(replicationName: string) { - return this.pathTemplates.replicationPathTemplate.match(replicationName).location; - } - - /** - * Parse the volume from Replication resource. - * - * @param {string} replicationName - * A fully-qualified path representing Replication resource. - * @returns {string} A string representing the volume. - */ - matchVolumeFromReplicationName(replicationName: string) { - return this.pathTemplates.replicationPathTemplate.match(replicationName).volume; - } - - /** - * Parse the replication from Replication resource. - * - * @param {string} replicationName - * A fully-qualified path representing Replication resource. - * @returns {string} A string representing the replication. - */ - matchReplicationFromReplicationName(replicationName: string) { - return this.pathTemplates.replicationPathTemplate.match(replicationName).replication; - } - - /** - * Return a fully-qualified snapshot resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} volume - * @param {string} snapshot - * @returns {string} Resource name string. - */ - snapshotPath(project:string,location:string,volume:string,snapshot:string) { - return this.pathTemplates.snapshotPathTemplate.render({ - project: project, - location: location, - volume: volume, - snapshot: snapshot, - }); - } - - /** - * Parse the project from Snapshot resource. - * - * @param {string} snapshotName - * A fully-qualified path representing Snapshot resource. - * @returns {string} A string representing the project. - */ - matchProjectFromSnapshotName(snapshotName: string) { - return this.pathTemplates.snapshotPathTemplate.match(snapshotName).project; - } - - /** - * Parse the location from Snapshot resource. - * - * @param {string} snapshotName - * A fully-qualified path representing Snapshot resource. - * @returns {string} A string representing the location. - */ - matchLocationFromSnapshotName(snapshotName: string) { - return this.pathTemplates.snapshotPathTemplate.match(snapshotName).location; - } - - /** - * Parse the volume from Snapshot resource. - * - * @param {string} snapshotName - * A fully-qualified path representing Snapshot resource. - * @returns {string} A string representing the volume. - */ - matchVolumeFromSnapshotName(snapshotName: string) { - return this.pathTemplates.snapshotPathTemplate.match(snapshotName).volume; - } - - /** - * Parse the snapshot from Snapshot resource. - * - * @param {string} snapshotName - * A fully-qualified path representing Snapshot resource. - * @returns {string} A string representing the snapshot. - */ - matchSnapshotFromSnapshotName(snapshotName: string) { - return this.pathTemplates.snapshotPathTemplate.match(snapshotName).snapshot; - } - - /** - * Return a fully-qualified storagePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} storage_pool - * @returns {string} Resource name string. - */ - storagePoolPath(project:string,location:string,storagePool:string) { - return this.pathTemplates.storagePoolPathTemplate.render({ - project: project, - location: location, - storage_pool: storagePool, - }); - } - - /** - * Parse the project from StoragePool resource. - * - * @param {string} storagePoolName - * A fully-qualified path representing StoragePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromStoragePoolName(storagePoolName: string) { - return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).project; - } - - /** - * Parse the location from StoragePool resource. - * - * @param {string} storagePoolName - * A fully-qualified path representing StoragePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromStoragePoolName(storagePoolName: string) { - return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).location; - } - - /** - * Parse the storage_pool from StoragePool resource. - * - * @param {string} storagePoolName - * A fully-qualified path representing StoragePool resource. - * @returns {string} A string representing the storage_pool. - */ - matchStoragePoolFromStoragePoolName(storagePoolName: string) { - return this.pathTemplates.storagePoolPathTemplate.match(storagePoolName).storage_pool; - } - - /** - * Return a fully-qualified volume resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} volume - * @returns {string} Resource name string. - */ - volumePath(project:string,location:string,volume:string) { - return this.pathTemplates.volumePathTemplate.render({ - project: project, - location: location, - volume: volume, - }); - } - - /** - * Parse the project from Volume resource. - * - * @param {string} volumeName - * A fully-qualified path representing Volume resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVolumeName(volumeName: string) { - return this.pathTemplates.volumePathTemplate.match(volumeName).project; - } - - /** - * Parse the location from Volume resource. - * - * @param {string} volumeName - * A fully-qualified path representing Volume resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVolumeName(volumeName: string) { - return this.pathTemplates.volumePathTemplate.match(volumeName).location; - } - - /** - * Parse the volume from Volume resource. - * - * @param {string} volumeName - * A fully-qualified path representing Volume resource. - * @returns {string} A string representing the volume. - */ - matchVolumeFromVolumeName(volumeName: string) { - return this.pathTemplates.volumePathTemplate.match(volumeName).volume; - } - - /** - * 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.netAppStub && !this._terminated) { - return this.netAppStub.then(stub => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - this.locationsClient.close().catch(err => {throw err}); - void this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json deleted file mode 100644 index 5656e408ea9..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_client_config.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "interfaces": { - "google.cloud.netapp.v1.NetApp": { - "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": { - "ListStoragePools": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ValidateDirectoryService": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SwitchActiveReplicaZone": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListVolumes": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetVolume": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateVolume": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateVolume": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteVolume": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RevertVolume": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "EstablishVolumePeering": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListActiveDirectories": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListKmsConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "EncryptVolumes": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "VerifyKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListReplications": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetReplication": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateReplication": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteReplication": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateReplication": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StopReplication": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ResumeReplication": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ReverseReplicationDirection": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "EstablishPeering": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SyncReplication": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackupVaults": { - "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": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackupPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListQuotaRules": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetQuotaRule": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateQuotaRule": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateQuotaRule": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteQuotaRule": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreBackupFiles": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListHostGroups": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetHostGroup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateHostGroup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateHostGroup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteHostGroup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteOntapPost": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteOntapGet": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteOntapDelete": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteOntapPatch": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json b/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json deleted file mode 100644 index 5960367b5d2..00000000000 --- a/owl-bot-staging/google-cloud-netapp/src/v1/net_app_proto_list.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - "../../protos/google/cloud/netapp/v1/active_directory.proto", - "../../protos/google/cloud/netapp/v1/backup.proto", - "../../protos/google/cloud/netapp/v1/backup_policy.proto", - "../../protos/google/cloud/netapp/v1/backup_vault.proto", - "../../protos/google/cloud/netapp/v1/cloud_netapp_service.proto", - "../../protos/google/cloud/netapp/v1/common.proto", - "../../protos/google/cloud/netapp/v1/host_group.proto", - "../../protos/google/cloud/netapp/v1/kms.proto", - "../../protos/google/cloud/netapp/v1/ontap.proto", - "../../protos/google/cloud/netapp/v1/quota_rule.proto", - "../../protos/google/cloud/netapp/v1/replication.proto", - "../../protos/google/cloud/netapp/v1/snapshot.proto", - "../../protos/google/cloud/netapp/v1/storage_pool.proto", - "../../protos/google/cloud/netapp/v1/volume.proto" -] diff --git a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 736d0a86453..00000000000 --- a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// 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. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const netapp = require('@google-cloud/netapp'); - -function main() { - const netAppClient = new netapp.NetAppClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 04c911e2a64..00000000000 --- a/owl-bot-staging/google-cloud-netapp/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// 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 {NetAppClient} from '@google-cloud/netapp'; - -// check that the client class type name can be used -function doStuffWithNetAppClient(client: NetAppClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const netAppClient = new NetAppClient(); - doStuffWithNetAppClient(netAppClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-netapp/system-test/install.ts b/owl-bot-staging/google-cloud-netapp/system-test/install.ts deleted file mode 100644 index 394f3362d20..00000000000 --- a/owl-bot-staging/google-cloud-netapp/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// 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 {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts b/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts deleted file mode 100644 index 9c37ee83a63..00000000000 --- a/owl-bot-staging/google-cloud-netapp/test/gapic_net_app_v1.ts +++ /dev/null @@ -1,12482 +0,0 @@ -// 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 netappModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, 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('v1.NetAppClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new netappModule.v1.NetAppClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'netapp.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new netappModule.v1.NetAppClient(); - 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 = netappModule.v1.NetAppClient.servicePath; - assert.strictEqual(servicePath, 'netapp.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = netappModule.v1.NetAppClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'netapp.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new netappModule.v1.NetAppClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'netapp.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new netappModule.v1.NetAppClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'netapp.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 netappModule.v1.NetAppClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = netappModule.v1.NetAppClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new netappModule.v1.NetAppClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new netappModule.v1.NetAppClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.netAppStub, undefined); - await client.initialize(); - assert(client.netAppStub); - }); - - it('has close method for the initialized client', done => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => {throw err}); - assert(client.netAppStub); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has close method for the non-initialized client', done => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.netAppStub, undefined); - client.close().then(() => { - done(); - }).catch(err => {throw err}); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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('getStoragePool', () => { - it('invokes getStoragePool without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.StoragePool() - ); - client.innerApiCalls.getStoragePool = stubSimpleCall(expectedResponse); - const [response] = await client.getStoragePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStoragePool without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.StoragePool() - ); - client.innerApiCalls.getStoragePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getStoragePool( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IStoragePool|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStoragePool with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getStoragePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getStoragePool(request), expectedError); - const actualRequest = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getStoragePool with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getStoragePool(request), expectedError); - }); - }); - - describe('getVolume', () => { - it('invokes getVolume without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Volume() - ); - client.innerApiCalls.getVolume = stubSimpleCall(expectedResponse); - const [response] = await client.getVolume(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVolume without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Volume() - ); - client.innerApiCalls.getVolume = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVolume( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVolume|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVolume with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVolume = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVolume(request), expectedError); - const actualRequest = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVolume with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getVolume(request), expectedError); - }); - }); - - describe('getSnapshot', () => { - it('invokes getSnapshot without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Snapshot() - ); - client.innerApiCalls.getSnapshot = stubSimpleCall(expectedResponse); - const [response] = await client.getSnapshot(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSnapshot without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Snapshot() - ); - client.innerApiCalls.getSnapshot = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getSnapshot( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.ISnapshot|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSnapshot with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getSnapshot = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSnapshot with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getSnapshot(request), expectedError); - }); - }); - - describe('getActiveDirectory', () => { - it('invokes getActiveDirectory without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ActiveDirectory() - ); - client.innerApiCalls.getActiveDirectory = stubSimpleCall(expectedResponse); - const [response] = await client.getActiveDirectory(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getActiveDirectory without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ActiveDirectory() - ); - client.innerApiCalls.getActiveDirectory = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getActiveDirectory( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IActiveDirectory|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getActiveDirectory with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getActiveDirectory = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getActiveDirectory(request), expectedError); - const actualRequest = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getActiveDirectory with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getActiveDirectory(request), expectedError); - }); - }); - - describe('getKmsConfig', () => { - it('invokes getKmsConfig without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.KmsConfig() - ); - client.innerApiCalls.getKmsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getKmsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getKmsConfig without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.KmsConfig() - ); - client.innerApiCalls.getKmsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getKmsConfig( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IKmsConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getKmsConfig with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getKmsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getKmsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getKmsConfig with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getKmsConfig(request), expectedError); - }); - }); - - describe('verifyKmsConfig', () => { - it('invokes verifyKmsConfig without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() - ); - client.innerApiCalls.verifyKmsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.verifyKmsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes verifyKmsConfig without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigResponse() - ); - client.innerApiCalls.verifyKmsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.verifyKmsConfig( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVerifyKmsConfigResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes verifyKmsConfig with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.verifyKmsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.verifyKmsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.verifyKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes verifyKmsConfig with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.VerifyKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.VerifyKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.verifyKmsConfig(request), expectedError); - }); - }); - - describe('getReplication', () => { - it('invokes getReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Replication() - ); - client.innerApiCalls.getReplication = stubSimpleCall(expectedResponse); - const [response] = await client.getReplication(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Replication() - ); - client.innerApiCalls.getReplication = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getReplication( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IReplication|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReplication with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getReplication = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getReplication with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getReplication(request), expectedError); - }); - }); - - describe('getBackupVault', () => { - it('invokes getBackupVault without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupVault( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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('getBackup', () => { - it('invokes getBackup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackup( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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('getBackupPolicy', () => { - it('invokes getBackupPolicy without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.BackupPolicy() - ); - client.innerApiCalls.getBackupPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPolicy without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.BackupPolicy() - ); - client.innerApiCalls.getBackupPolicy = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPolicy( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IBackupPolicy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPolicy with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPolicy with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getBackupPolicy(request), expectedError); - }); - }); - - describe('getQuotaRule', () => { - it('invokes getQuotaRule without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.QuotaRule() - ); - client.innerApiCalls.getQuotaRule = stubSimpleCall(expectedResponse); - const [response] = await client.getQuotaRule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getQuotaRule without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.QuotaRule() - ); - client.innerApiCalls.getQuotaRule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getQuotaRule( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IQuotaRule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getQuotaRule with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getQuotaRule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getQuotaRule(request), expectedError); - const actualRequest = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getQuotaRule with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getQuotaRule(request), expectedError); - }); - }); - - describe('getHostGroup', () => { - it('invokes getHostGroup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.HostGroup() - ); - client.innerApiCalls.getHostGroup = stubSimpleCall(expectedResponse); - const [response] = await client.getHostGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getHostGroup without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.HostGroup() - ); - client.innerApiCalls.getHostGroup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getHostGroup( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IHostGroup|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getHostGroup with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.getHostGroup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getHostGroup(request), expectedError); - const actualRequest = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getHostGroup with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.GetHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.GetHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.getHostGroup(request), expectedError); - }); - }); - - describe('executeOntapPost', () => { - it('invokes executeOntapPost without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() - ); - client.innerApiCalls.executeOntapPost = stubSimpleCall(expectedResponse); - const [response] = await client.executeOntapPost(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPost without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() - ); - client.innerApiCalls.executeOntapPost = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeOntapPost( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPostResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPost with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeOntapPost = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeOntapPost(request), expectedError); - const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPost with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.executeOntapPost(request), expectedError); - }); - }); - - describe('executeOntapGet', () => { - it('invokes executeOntapGet without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() - ); - client.innerApiCalls.executeOntapGet = stubSimpleCall(expectedResponse); - const [response] = await client.executeOntapGet(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapGet without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() - ); - client.innerApiCalls.executeOntapGet = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeOntapGet( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapGetResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapGet with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeOntapGet = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeOntapGet(request), expectedError); - const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapGet with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.executeOntapGet(request), expectedError); - }); - }); - - describe('executeOntapDelete', () => { - it('invokes executeOntapDelete without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() - ); - client.innerApiCalls.executeOntapDelete = stubSimpleCall(expectedResponse); - const [response] = await client.executeOntapDelete(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapDelete without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() - ); - client.innerApiCalls.executeOntapDelete = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeOntapDelete( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapDelete with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeOntapDelete = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeOntapDelete(request), expectedError); - const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapDelete with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.executeOntapDelete(request), expectedError); - }); - }); - - describe('executeOntapPatch', () => { - it('invokes executeOntapPatch without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() - ); - client.innerApiCalls.executeOntapPatch = stubSimpleCall(expectedResponse); - const [response] = await client.executeOntapPatch(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPatch without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() - ); - client.innerApiCalls.executeOntapPatch = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeOntapPatch( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPatch with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeOntapPatch = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeOntapPatch(request), expectedError); - const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeOntapPatch with closed client', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); - request.ontapPath = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch(err => {throw err}); - await assert.rejects(client.executeOntapPatch(request), expectedError); - }); - }); - - describe('createStoragePool', () => { - it('invokes createStoragePool without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStoragePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.createStoragePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStoragePool without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createStoragePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createStoragePool( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStoragePool with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStoragePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createStoragePool(request), expectedError); - const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createStoragePool with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateStoragePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createStoragePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createStoragePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateStoragePoolProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateStoragePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateStoragePoolProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateStoragePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateStoragePool', () => { - it('invokes updateStoragePool without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() - ); - request.storagePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); - request.storagePool.name = defaultValue1; - const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStoragePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateStoragePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStoragePool without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() - ); - request.storagePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); - request.storagePool.name = defaultValue1; - const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateStoragePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateStoragePool( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStoragePool with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() - ); - request.storagePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); - request.storagePool.name = defaultValue1; - const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStoragePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateStoragePool(request), expectedError); - const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateStoragePool with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateStoragePoolRequest() - ); - request.storagePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateStoragePoolRequest', ['storagePool', 'name']); - request.storagePool.name = defaultValue1; - const expectedHeaderRequestParams = `storage_pool.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateStoragePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateStoragePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateStoragePoolProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateStoragePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateStoragePoolProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateStoragePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteStoragePool', () => { - it('invokes deleteStoragePool without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStoragePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteStoragePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStoragePool without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteStoragePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteStoragePool( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStoragePool with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStoragePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteStoragePool(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteStoragePool with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteStoragePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteStoragePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteStoragePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteStoragePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteStoragePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteStoragePoolProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteStoragePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteStoragePoolProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteStoragePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('validateDirectoryService', () => { - it('invokes validateDirectoryService without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.validateDirectoryService = stubLongRunningCall(expectedResponse); - const [operation] = await client.validateDirectoryService(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateDirectoryService without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.validateDirectoryService = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.validateDirectoryService( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateDirectoryService with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.validateDirectoryService = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.validateDirectoryService(request), expectedError); - const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateDirectoryService with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ValidateDirectoryServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ValidateDirectoryServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.validateDirectoryService = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.validateDirectoryService(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateDirectoryService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkValidateDirectoryServiceProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkValidateDirectoryServiceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkValidateDirectoryServiceProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkValidateDirectoryServiceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('switchActiveReplicaZone', () => { - it('invokes switchActiveReplicaZone without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(expectedResponse); - const [operation] = await client.switchActiveReplicaZone(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes switchActiveReplicaZone without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.switchActiveReplicaZone( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes switchActiveReplicaZone with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.switchActiveReplicaZone(request), expectedError); - const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes switchActiveReplicaZone with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.switchActiveReplicaZone = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.switchActiveReplicaZone(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.switchActiveReplicaZone as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSwitchActiveReplicaZoneProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkSwitchActiveReplicaZoneProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSwitchActiveReplicaZoneProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkSwitchActiveReplicaZoneProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createVolume', () => { - it('invokes createVolume without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVolume = stubLongRunningCall(expectedResponse); - const [operation] = await client.createVolume(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVolume without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVolume = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createVolume( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVolume with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVolume = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createVolume(request), expectedError); - const actualRequest = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVolume with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateVolumeRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVolume = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createVolume(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateVolumeProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateVolumeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateVolumeProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateVolumeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateVolume', () => { - it('invokes updateVolume without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateVolumeRequest() - ); - request.volume ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); - request.volume.name = defaultValue1; - const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVolume = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateVolume(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVolume without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateVolumeRequest() - ); - request.volume ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); - request.volume.name = defaultValue1; - const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVolume = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateVolume( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVolume with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateVolumeRequest() - ); - request.volume ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); - request.volume.name = defaultValue1; - const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVolume = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateVolume(request), expectedError); - const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVolume with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateVolumeRequest() - ); - request.volume ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateVolumeRequest', ['volume', 'name']); - request.volume.name = defaultValue1; - const expectedHeaderRequestParams = `volume.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVolume = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateVolume(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateVolumeProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateVolumeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateVolumeProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateVolumeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteVolume', () => { - it('invokes deleteVolume without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVolume = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteVolume(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVolume without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVolume = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteVolume( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVolume with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVolume = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteVolume(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVolume with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVolume = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteVolume(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteVolumeProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteVolumeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteVolumeProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteVolumeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('revertVolume', () => { - it('invokes revertVolume without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RevertVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.revertVolume = stubLongRunningCall(expectedResponse); - const [operation] = await client.revertVolume(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes revertVolume without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RevertVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.revertVolume = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.revertVolume( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes revertVolume with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RevertVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.revertVolume = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.revertVolume(request), expectedError); - const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes revertVolume with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RevertVolumeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RevertVolumeRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.revertVolume = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.revertVolume(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.revertVolume as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRevertVolumeProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkRevertVolumeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRevertVolumeProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkRevertVolumeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('establishVolumePeering', () => { - it('invokes establishVolumePeering without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.establishVolumePeering = stubLongRunningCall(expectedResponse); - const [operation] = await client.establishVolumePeering(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishVolumePeering without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.establishVolumePeering = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.establishVolumePeering( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishVolumePeering with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.establishVolumePeering(request), expectedError); - const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishVolumePeering with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.establishVolumePeering(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkEstablishVolumePeeringProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEstablishVolumePeeringProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkEstablishVolumePeeringProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEstablishVolumePeeringProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createSnapshot', () => { - it('invokes createSnapshot without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.createSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSnapshot without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createSnapshot( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSnapshot with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSnapshot with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateSnapshotRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateSnapshotProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateSnapshotProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteSnapshot', () => { - it('invokes deleteSnapshot without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSnapshot without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteSnapshot( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSnapshot with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSnapshot with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteSnapshotRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteSnapshotProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteSnapshotProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateSnapshot', () => { - it('invokes updateSnapshot without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() - ); - request.snapshot ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); - request.snapshot.name = defaultValue1; - const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSnapshot without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() - ); - request.snapshot ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); - request.snapshot.name = defaultValue1; - const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateSnapshot( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSnapshot with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() - ); - request.snapshot ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); - request.snapshot.name = defaultValue1; - const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSnapshot with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateSnapshotRequest() - ); - request.snapshot ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateSnapshotRequest', ['snapshot', 'name']); - request.snapshot.name = defaultValue1; - const expectedHeaderRequestParams = `snapshot.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateSnapshotProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateSnapshotProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createActiveDirectory', () => { - it('invokes createActiveDirectory without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createActiveDirectory = stubLongRunningCall(expectedResponse); - const [operation] = await client.createActiveDirectory(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createActiveDirectory without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createActiveDirectory( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createActiveDirectory with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createActiveDirectory = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createActiveDirectory(request), expectedError); - const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createActiveDirectory with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateActiveDirectoryRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createActiveDirectory(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateActiveDirectoryProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateActiveDirectoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateActiveDirectoryProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateActiveDirectoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateActiveDirectory', () => { - it('invokes updateActiveDirectory without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() - ); - request.activeDirectory ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); - request.activeDirectory.name = defaultValue1; - const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateActiveDirectory(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateActiveDirectory without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() - ); - request.activeDirectory ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); - request.activeDirectory.name = defaultValue1; - const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateActiveDirectory( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateActiveDirectory with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() - ); - request.activeDirectory ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); - request.activeDirectory.name = defaultValue1; - const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateActiveDirectory(request), expectedError); - const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateActiveDirectory with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateActiveDirectoryRequest() - ); - request.activeDirectory ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateActiveDirectoryRequest', ['activeDirectory', 'name']); - request.activeDirectory.name = defaultValue1; - const expectedHeaderRequestParams = `active_directory.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateActiveDirectory(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateActiveDirectoryProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateActiveDirectoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateActiveDirectoryProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateActiveDirectoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteActiveDirectory', () => { - it('invokes deleteActiveDirectory without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteActiveDirectory(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteActiveDirectory without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteActiveDirectory = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteActiveDirectory( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteActiveDirectory with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteActiveDirectory(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteActiveDirectory with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteActiveDirectoryRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteActiveDirectoryRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteActiveDirectory = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteActiveDirectory(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteActiveDirectory as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteActiveDirectoryProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteActiveDirectoryProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteActiveDirectoryProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteActiveDirectoryProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createKmsConfig', () => { - it('invokes createKmsConfig without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createKmsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.createKmsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createKmsConfig without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createKmsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createKmsConfig( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createKmsConfig with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createKmsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createKmsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createKmsConfig with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateKmsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createKmsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateKmsConfigProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateKmsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateKmsConfigProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateKmsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateKmsConfig', () => { - it('invokes updateKmsConfig without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() - ); - request.kmsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); - request.kmsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateKmsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateKmsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateKmsConfig without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() - ); - request.kmsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); - request.kmsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateKmsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateKmsConfig( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateKmsConfig with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() - ); - request.kmsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); - request.kmsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateKmsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateKmsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateKmsConfig with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateKmsConfigRequest() - ); - request.kmsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateKmsConfigRequest', ['kmsConfig', 'name']); - request.kmsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `kms_config.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateKmsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateKmsConfigProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateKmsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateKmsConfigProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateKmsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('encryptVolumes', () => { - it('invokes encryptVolumes without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EncryptVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.encryptVolumes = stubLongRunningCall(expectedResponse); - const [operation] = await client.encryptVolumes(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes encryptVolumes without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EncryptVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.encryptVolumes = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.encryptVolumes( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes encryptVolumes with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EncryptVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.encryptVolumes = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.encryptVolumes(request), expectedError); - const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes encryptVolumes with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EncryptVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EncryptVolumesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.encryptVolumes = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.encryptVolumes(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.encryptVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkEncryptVolumesProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEncryptVolumesProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkEncryptVolumesProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEncryptVolumesProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteKmsConfig', () => { - it('invokes deleteKmsConfig without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteKmsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteKmsConfig without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteKmsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteKmsConfig( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteKmsConfig with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteKmsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteKmsConfig with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteKmsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteKmsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteKmsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteKmsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteKmsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteKmsConfigProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteKmsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteKmsConfigProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteKmsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createReplication', () => { - it('invokes createReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.createReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateReplicationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteReplication', () => { - it('invokes deleteReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateReplication', () => { - it('invokes updateReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateReplicationRequest() - ); - request.replication ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); - request.replication.name = defaultValue1; - const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateReplicationRequest() - ); - request.replication ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); - request.replication.name = defaultValue1; - const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateReplicationRequest() - ); - request.replication ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); - request.replication.name = defaultValue1; - const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateReplicationRequest() - ); - request.replication ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateReplicationRequest', ['replication', 'name']); - request.replication.name = defaultValue1; - const expectedHeaderRequestParams = `replication.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('stopReplication', () => { - it('invokes stopReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.StopReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.stopReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.stopReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.StopReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.stopReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.stopReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.StopReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.stopReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.stopReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.StopReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.StopReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.stopReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.stopReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkStopReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkStopReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkStopReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkStopReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('resumeReplication', () => { - it('invokes resumeReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ResumeReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.resumeReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.resumeReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes resumeReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ResumeReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.resumeReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.resumeReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes resumeReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ResumeReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.resumeReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.resumeReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes resumeReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ResumeReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ResumeReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.resumeReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.resumeReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.resumeReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkResumeReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkResumeReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkResumeReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkResumeReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('reverseReplicationDirection', () => { - it('invokes reverseReplicationDirection without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(expectedResponse); - const [operation] = await client.reverseReplicationDirection(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reverseReplicationDirection without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.reverseReplicationDirection = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.reverseReplicationDirection( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reverseReplicationDirection with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.reverseReplicationDirection(request), expectedError); - const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes reverseReplicationDirection with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ReverseReplicationDirectionRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ReverseReplicationDirectionRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.reverseReplicationDirection = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.reverseReplicationDirection(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.reverseReplicationDirection as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkReverseReplicationDirectionProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkReverseReplicationDirectionProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkReverseReplicationDirectionProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkReverseReplicationDirectionProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('establishPeering', () => { - it('invokes establishPeering without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishPeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.establishPeering = stubLongRunningCall(expectedResponse); - const [operation] = await client.establishPeering(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishPeering without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishPeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.establishPeering = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.establishPeering( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishPeering with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishPeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.establishPeering = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.establishPeering(request), expectedError); - const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes establishPeering with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.EstablishPeeringRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.EstablishPeeringRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.establishPeering = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.establishPeering(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.establishPeering as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkEstablishPeeringProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEstablishPeeringProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkEstablishPeeringProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkEstablishPeeringProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('syncReplication', () => { - it('invokes syncReplication without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SyncReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.syncReplication = stubLongRunningCall(expectedResponse); - const [operation] = await client.syncReplication(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes syncReplication without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SyncReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.syncReplication = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.syncReplication( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes syncReplication with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SyncReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.syncReplication = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.syncReplication(request), expectedError); - const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes syncReplication with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.SyncReplicationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.SyncReplicationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.syncReplication = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.syncReplication(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.syncReplication as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSyncReplicationProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkSyncReplicationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSyncReplicationProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkSyncReplicationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupVault', () => { - it('invokes createBackupVault without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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('createBackup', () => { - it('invokes createBackup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackup without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackup( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackup with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackup with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackup', () => { - it('invokes deleteBackup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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('updateBackup', () => { - it('invokes updateBackup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - 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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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('createBackupPolicy', () => { - it('invokes createBackupPolicy without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPolicy = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPolicy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPolicy without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPolicy( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPolicy with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPolicy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPolicy with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateBackupPolicyRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPolicy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPolicyProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateBackupPolicyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPolicyProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateBackupPolicyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackupPolicy', () => { - it('invokes updateBackupPolicy without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() - ); - request.backupPolicy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); - request.backupPolicy.name = defaultValue1; - const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackupPolicy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupPolicy without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() - ); - request.backupPolicy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); - request.backupPolicy.name = defaultValue1; - const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackupPolicy( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupPolicy with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() - ); - request.backupPolicy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); - request.backupPolicy.name = defaultValue1; - const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackupPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupPolicy with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateBackupPolicyRequest() - ); - request.backupPolicy ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateBackupPolicyRequest', ['backupPolicy', 'name']); - request.backupPolicy.name = defaultValue1; - const expectedHeaderRequestParams = `backup_policy.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackupPolicy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupPolicyProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateBackupPolicyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupPolicyProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateBackupPolicyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPolicy', () => { - it('invokes deleteBackupPolicy without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPolicy(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPolicy without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPolicy = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPolicy( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPolicy with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPolicy(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPolicy with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteBackupPolicyRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteBackupPolicyRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPolicy = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPolicy(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPolicy as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPolicyProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteBackupPolicyProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPolicyProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteBackupPolicyProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createQuotaRule', () => { - it('invokes createQuotaRule without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createQuotaRule = stubLongRunningCall(expectedResponse); - const [operation] = await client.createQuotaRule(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createQuotaRule without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createQuotaRule = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createQuotaRule( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createQuotaRule with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createQuotaRule = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createQuotaRule(request), expectedError); - const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createQuotaRule with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateQuotaRuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createQuotaRule(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateQuotaRuleProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateQuotaRuleProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateQuotaRuleProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateQuotaRuleProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateQuotaRule', () => { - it('invokes updateQuotaRule without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() - ); - request.quotaRule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); - request.quotaRule.name = defaultValue1; - const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateQuotaRule = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateQuotaRule(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateQuotaRule without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() - ); - request.quotaRule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); - request.quotaRule.name = defaultValue1; - const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateQuotaRule = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateQuotaRule( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateQuotaRule with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() - ); - request.quotaRule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); - request.quotaRule.name = defaultValue1; - const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateQuotaRule = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateQuotaRule(request), expectedError); - const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateQuotaRule with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateQuotaRuleRequest() - ); - request.quotaRule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateQuotaRuleRequest', ['quotaRule', 'name']); - request.quotaRule.name = defaultValue1; - const expectedHeaderRequestParams = `quota_rule.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateQuotaRule(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateQuotaRuleProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateQuotaRuleProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateQuotaRuleProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateQuotaRuleProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteQuotaRule', () => { - it('invokes deleteQuotaRule without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteQuotaRule(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteQuotaRule without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteQuotaRule = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteQuotaRule( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteQuotaRule with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteQuotaRule(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteQuotaRule with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteQuotaRuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteQuotaRuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteQuotaRule = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteQuotaRule(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteQuotaRule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteQuotaRuleProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteQuotaRuleProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteQuotaRuleProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteQuotaRuleProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('restoreBackupFiles', () => { - it('invokes restoreBackupFiles without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(expectedResponse); - const [operation] = await client.restoreBackupFiles(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackupFiles without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackupFiles = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.restoreBackupFiles( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackupFiles with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.restoreBackupFiles(request), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackupFiles with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.RestoreBackupFilesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.RestoreBackupFilesRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackupFiles = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.restoreBackupFiles(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackupFiles as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRestoreBackupFilesProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkRestoreBackupFilesProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRestoreBackupFilesProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkRestoreBackupFilesProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createHostGroup', () => { - it('invokes createHostGroup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createHostGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.createHostGroup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createHostGroup without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createHostGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createHostGroup( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createHostGroup with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createHostGroup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createHostGroup(request), expectedError); - const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createHostGroup with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.CreateHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.CreateHostGroupRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createHostGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createHostGroup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateHostGroupProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateHostGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateHostGroupProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkCreateHostGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateHostGroup', () => { - it('invokes updateHostGroup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() - ); - request.hostGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); - request.hostGroup.name = defaultValue1; - const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateHostGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateHostGroup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateHostGroup without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() - ); - request.hostGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); - request.hostGroup.name = defaultValue1; - const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateHostGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateHostGroup( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateHostGroup with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() - ); - request.hostGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); - request.hostGroup.name = defaultValue1; - const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateHostGroup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateHostGroup(request), expectedError); - const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateHostGroup with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.UpdateHostGroupRequest() - ); - request.hostGroup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.UpdateHostGroupRequest', ['hostGroup', 'name']); - request.hostGroup.name = defaultValue1; - const expectedHeaderRequestParams = `host_group.name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateHostGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateHostGroup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateHostGroupProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateHostGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateHostGroupProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkUpdateHostGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteHostGroup', () => { - it('invokes deleteHostGroup without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteHostGroup = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteHostGroup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteHostGroup without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteHostGroup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteHostGroup( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteHostGroup with call error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteHostGroup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteHostGroup(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteHostGroup with LRO error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.DeleteHostGroupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.DeleteHostGroupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteHostGroup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteHostGroup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteHostGroup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteHostGroupProgress without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteHostGroupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteHostGroupProgress with error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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.checkDeleteHostGroupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listStoragePools', () => { - it('invokes listStoragePools without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - ]; - client.innerApiCalls.listStoragePools = stubSimpleCall(expectedResponse); - const [response] = await client.listStoragePools(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStoragePools without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - ]; - client.innerApiCalls.listStoragePools = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listStoragePools( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IStoragePool[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStoragePools with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listStoragePools = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listStoragePools(request), expectedError); - const actualRequest = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listStoragePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listStoragePoolsStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - ]; - client.descriptors.page.listStoragePools.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listStoragePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.StoragePool) => { - 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.listStoragePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStoragePools, request)); - assert( - (client.descriptors.page.listStoragePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listStoragePoolsStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listStoragePools.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listStoragePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.StoragePool[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.StoragePool) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listStoragePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listStoragePools, request)); - assert( - (client.descriptors.page.listStoragePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStoragePools without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - generateSampleMessage(new protos.google.cloud.netapp.v1.StoragePool()), - ]; - client.descriptors.page.listStoragePools.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; - const iterable = client.listStoragePoolsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listStoragePools with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListStoragePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListStoragePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listStoragePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listStoragePoolsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IStoragePool[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listStoragePools.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listVolumes', () => { - it('invokes listVolumes without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - ]; - client.innerApiCalls.listVolumes = stubSimpleCall(expectedResponse); - const [response] = await client.listVolumes(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVolumes without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - ]; - client.innerApiCalls.listVolumes = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listVolumes( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IVolume[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVolumes with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listVolumes = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listVolumes(request), expectedError); - const actualRequest = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVolumes as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVolumesStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - ]; - client.descriptors.page.listVolumes.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVolumesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Volume[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { - 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.listVolumes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVolumes, request)); - assert( - (client.descriptors.page.listVolumes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listVolumesStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVolumes.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVolumesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Volume[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Volume) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listVolumes.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVolumes, request)); - assert( - (client.descriptors.page.listVolumes.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVolumes without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Volume()), - ]; - client.descriptors.page.listVolumes.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IVolume[] = []; - const iterable = client.listVolumesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listVolumes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVolumes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVolumes with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListVolumesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListVolumesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listVolumes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVolumesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IVolume[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listVolumes.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVolumes.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listSnapshots', () => { - it('invokes listSnapshots without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - ]; - client.innerApiCalls.listSnapshots = stubSimpleCall(expectedResponse); - const [response] = await client.listSnapshots(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSnapshots without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - ]; - client.innerApiCalls.listSnapshots = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listSnapshots( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.ISnapshot[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSnapshots with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listSnapshots = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listSnapshots(request), expectedError); - const actualRequest = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSnapshots as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSnapshotsStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - ]; - client.descriptors.page.listSnapshots.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSnapshotsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Snapshot) => { - 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.listSnapshots.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSnapshots, request)); - assert( - (client.descriptors.page.listSnapshots.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listSnapshotsStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listSnapshots.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSnapshotsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Snapshot[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Snapshot) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listSnapshots.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSnapshots, request)); - assert( - (client.descriptors.page.listSnapshots.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSnapshots without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Snapshot()), - ]; - client.descriptors.page.listSnapshots.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; - const iterable = client.listSnapshotsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSnapshots with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListSnapshotsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListSnapshotsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listSnapshots.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSnapshotsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.ISnapshot[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSnapshots.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listActiveDirectories', () => { - it('invokes listActiveDirectories without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - ]; - client.innerApiCalls.listActiveDirectories = stubSimpleCall(expectedResponse); - const [response] = await client.listActiveDirectories(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listActiveDirectories without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - ]; - client.innerApiCalls.listActiveDirectories = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listActiveDirectories( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IActiveDirectory[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listActiveDirectories with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listActiveDirectories = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listActiveDirectories(request), expectedError); - const actualRequest = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listActiveDirectories as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listActiveDirectoriesStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - ]; - client.descriptors.page.listActiveDirectories.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listActiveDirectoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { - 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.listActiveDirectories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listActiveDirectories, request)); - assert( - (client.descriptors.page.listActiveDirectories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listActiveDirectoriesStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listActiveDirectories.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listActiveDirectoriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.ActiveDirectory[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.ActiveDirectory) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listActiveDirectories.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listActiveDirectories, request)); - assert( - (client.descriptors.page.listActiveDirectories.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listActiveDirectories without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - generateSampleMessage(new protos.google.cloud.netapp.v1.ActiveDirectory()), - ]; - client.descriptors.page.listActiveDirectories.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; - const iterable = client.listActiveDirectoriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listActiveDirectories with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListActiveDirectoriesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListActiveDirectoriesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listActiveDirectories.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listActiveDirectoriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IActiveDirectory[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listActiveDirectories.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listKmsConfigs', () => { - it('invokes listKmsConfigs without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - ]; - client.innerApiCalls.listKmsConfigs = stubSimpleCall(expectedResponse); - const [response] = await client.listKmsConfigs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listKmsConfigs without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - ]; - client.innerApiCalls.listKmsConfigs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listKmsConfigs( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IKmsConfig[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listKmsConfigs with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listKmsConfigs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listKmsConfigs(request), expectedError); - const actualRequest = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listKmsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listKmsConfigsStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - ]; - client.descriptors.page.listKmsConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listKmsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.KmsConfig) => { - 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.listKmsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listKmsConfigs, request)); - assert( - (client.descriptors.page.listKmsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listKmsConfigsStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listKmsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listKmsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.KmsConfig[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.KmsConfig) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listKmsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listKmsConfigs, request)); - assert( - (client.descriptors.page.listKmsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listKmsConfigs without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - generateSampleMessage(new protos.google.cloud.netapp.v1.KmsConfig()), - ]; - client.descriptors.page.listKmsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; - const iterable = client.listKmsConfigsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listKmsConfigs with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListKmsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListKmsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listKmsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listKmsConfigsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IKmsConfig[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listKmsConfigs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listReplications', () => { - it('invokes listReplications without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - ]; - client.innerApiCalls.listReplications = stubSimpleCall(expectedResponse); - const [response] = await client.listReplications(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReplications without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - ]; - client.innerApiCalls.listReplications = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listReplications( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IReplication[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReplications with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listReplications = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listReplications(request), expectedError); - const actualRequest = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReplications as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReplicationsStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - ]; - client.descriptors.page.listReplications.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listReplicationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Replication[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Replication) => { - 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.listReplications.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReplications, request)); - assert( - (client.descriptors.page.listReplications.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listReplicationsStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listReplications.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listReplicationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Replication[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.Replication) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listReplications.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReplications, request)); - assert( - (client.descriptors.page.listReplications.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReplications without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Replication()), - ]; - client.descriptors.page.listReplications.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IReplication[] = []; - const iterable = client.listReplicationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listReplications.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReplications.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReplications with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListReplicationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListReplicationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listReplications.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listReplicationsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IReplication[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listReplications.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReplications.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.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('listBackups', () => { - it('invokes listBackups without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackups( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - ]; - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.Backup()), - ]; - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.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 netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.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.netapp.v1.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('listBackupPolicies', () => { - it('invokes listBackupPolicies without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - ]; - client.innerApiCalls.listBackupPolicies = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPolicies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPolicies without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - ]; - client.innerApiCalls.listBackupPolicies = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPolicies( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IBackupPolicy[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPolicies with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPolicies = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPolicies(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPolicies as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPoliciesStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - ]; - client.descriptors.page.listBackupPolicies.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPoliciesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.BackupPolicy[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.BackupPolicy) => { - 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.listBackupPolicies.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPolicies, request)); - assert( - (client.descriptors.page.listBackupPolicies.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPoliciesStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPolicies.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPoliciesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.BackupPolicy[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.BackupPolicy) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPolicies.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPolicies, request)); - assert( - (client.descriptors.page.listBackupPolicies.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPolicies without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - generateSampleMessage(new protos.google.cloud.netapp.v1.BackupPolicy()), - ]; - client.descriptors.page.listBackupPolicies.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IBackupPolicy[] = []; - const iterable = client.listBackupPoliciesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPolicies with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListBackupPoliciesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListBackupPoliciesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPolicies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPoliciesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IBackupPolicy[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPolicies.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listQuotaRules', () => { - it('invokes listQuotaRules without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - ]; - client.innerApiCalls.listQuotaRules = stubSimpleCall(expectedResponse); - const [response] = await client.listQuotaRules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listQuotaRules without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - ]; - client.innerApiCalls.listQuotaRules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listQuotaRules( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IQuotaRule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listQuotaRules with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listQuotaRules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listQuotaRules(request), expectedError); - const actualRequest = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listQuotaRules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listQuotaRulesStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - ]; - client.descriptors.page.listQuotaRules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listQuotaRulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.QuotaRule[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.QuotaRule) => { - 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.listQuotaRules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listQuotaRules, request)); - assert( - (client.descriptors.page.listQuotaRules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listQuotaRulesStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listQuotaRules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listQuotaRulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.QuotaRule[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.QuotaRule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listQuotaRules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listQuotaRules, request)); - assert( - (client.descriptors.page.listQuotaRules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listQuotaRules without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - generateSampleMessage(new protos.google.cloud.netapp.v1.QuotaRule()), - ]; - client.descriptors.page.listQuotaRules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IQuotaRule[] = []; - const iterable = client.listQuotaRulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listQuotaRules with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListQuotaRulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListQuotaRulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listQuotaRules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listQuotaRulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IQuotaRule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listQuotaRules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listHostGroups', () => { - it('invokes listHostGroups without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - ]; - client.innerApiCalls.listHostGroups = stubSimpleCall(expectedResponse); - const [response] = await client.listHostGroups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listHostGroups without error using callback', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - ]; - client.innerApiCalls.listHostGroups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listHostGroups( - request, - (err?: Error|null, result?: protos.google.cloud.netapp.v1.IHostGroup[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listHostGroups with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.listHostGroups = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listHostGroups(request), expectedError); - const actualRequest = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listHostGroups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listHostGroupsStream without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - ]; - client.descriptors.page.listHostGroups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listHostGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.HostGroup[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.HostGroup) => { - 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.listHostGroups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listHostGroups, request)); - assert( - (client.descriptors.page.listHostGroups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listHostGroupsStream with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listHostGroups.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listHostGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.netapp.v1.HostGroup[] = []; - stream.on('data', (response: protos.google.cloud.netapp.v1.HostGroup) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listHostGroups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listHostGroups, request)); - assert( - (client.descriptors.page.listHostGroups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listHostGroups without error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - generateSampleMessage(new protos.google.cloud.netapp.v1.HostGroup()), - ]; - client.descriptors.page.listHostGroups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.netapp.v1.IHostGroup[] = []; - const iterable = client.listHostGroupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listHostGroups with error', async () => { - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.netapp.v1.ListHostGroupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.netapp.v1.ListHostGroupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.descriptors.page.listHostGroups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listHostGroupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.netapp.v1.IHostGroup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listHostGroups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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 netappModule.v1.NetAppClient({ - 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('activeDirectory', async () => { - const fakePath = "/rendered/path/activeDirectory"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - active_directory: "activeDirectoryValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.activeDirectoryPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.activeDirectoryPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('activeDirectoryPath', () => { - const result = client.activeDirectoryPath("projectValue", "locationValue", "activeDirectoryValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.activeDirectoryPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromActiveDirectoryName', () => { - const result = client.matchProjectFromActiveDirectoryName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromActiveDirectoryName', () => { - const result = client.matchLocationFromActiveDirectoryName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchActiveDirectoryFromActiveDirectoryName', () => { - const result = client.matchActiveDirectoryFromActiveDirectoryName(fakePath); - assert.strictEqual(result, "activeDirectoryValue"); - assert((client.pathTemplates.activeDirectoryPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backup', async () => { - const fakePath = "/rendered/path/backup"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_vault: "backupVaultValue", - backup: "backupValue", - }; - const client = new netappModule.v1.NetAppClient({ - 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", "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('matchBackupFromBackupName', () => { - const result = client.matchBackupFromBackupName(fakePath); - assert.strictEqual(result, "backupValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPolicy', async () => { - const fakePath = "/rendered/path/backupPolicy"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_policy: "backupPolicyValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.backupPolicyPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPolicyPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPolicyPath', () => { - const result = client.backupPolicyPath("projectValue", "locationValue", "backupPolicyValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPolicyPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPolicyName', () => { - const result = client.matchProjectFromBackupPolicyName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPolicyName', () => { - const result = client.matchLocationFromBackupPolicyName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPolicyFromBackupPolicyName', () => { - const result = client.matchBackupPolicyFromBackupPolicyName(fakePath); - assert.strictEqual(result, "backupPolicyValue"); - assert((client.pathTemplates.backupPolicyPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupVault', async () => { - const fakePath = "/rendered/path/backupVault"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_vault: "backupVaultValue", - }; - const client = new netappModule.v1.NetAppClient({ - 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('hostGroup', async () => { - const fakePath = "/rendered/path/hostGroup"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - host_group: "hostGroupValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.hostGroupPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.hostGroupPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('hostGroupPath', () => { - const result = client.hostGroupPath("projectValue", "locationValue", "hostGroupValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.hostGroupPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromHostGroupName', () => { - const result = client.matchProjectFromHostGroupName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromHostGroupName', () => { - const result = client.matchLocationFromHostGroupName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchHostGroupFromHostGroupName', () => { - const result = client.matchHostGroupFromHostGroupName(fakePath); - assert.strictEqual(result, "hostGroupValue"); - assert((client.pathTemplates.hostGroupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('kmsConfig', async () => { - const fakePath = "/rendered/path/kmsConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - kms_config: "kmsConfigValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.kmsConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.kmsConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('kmsConfigPath', () => { - const result = client.kmsConfigPath("projectValue", "locationValue", "kmsConfigValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.kmsConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromKmsConfigName', () => { - const result = client.matchProjectFromKmsConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromKmsConfigName', () => { - const result = client.matchLocationFromKmsConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchKmsConfigFromKmsConfigName', () => { - const result = client.matchKmsConfigFromKmsConfigName(fakePath); - assert.strictEqual(result, "kmsConfigValue"); - assert((client.pathTemplates.kmsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('quotaRule', async () => { - const fakePath = "/rendered/path/quotaRule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - volume: "volumeValue", - quota_rule: "quotaRuleValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.quotaRulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.quotaRulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('quotaRulePath', () => { - const result = client.quotaRulePath("projectValue", "locationValue", "volumeValue", "quotaRuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.quotaRulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromQuotaRuleName', () => { - const result = client.matchProjectFromQuotaRuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromQuotaRuleName', () => { - const result = client.matchLocationFromQuotaRuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVolumeFromQuotaRuleName', () => { - const result = client.matchVolumeFromQuotaRuleName(fakePath); - assert.strictEqual(result, "volumeValue"); - assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchQuotaRuleFromQuotaRuleName', () => { - const result = client.matchQuotaRuleFromQuotaRuleName(fakePath); - assert.strictEqual(result, "quotaRuleValue"); - assert((client.pathTemplates.quotaRulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('replication', async () => { - const fakePath = "/rendered/path/replication"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - volume: "volumeValue", - replication: "replicationValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.replicationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.replicationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('replicationPath', () => { - const result = client.replicationPath("projectValue", "locationValue", "volumeValue", "replicationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.replicationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromReplicationName', () => { - const result = client.matchProjectFromReplicationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromReplicationName', () => { - const result = client.matchLocationFromReplicationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVolumeFromReplicationName', () => { - const result = client.matchVolumeFromReplicationName(fakePath); - assert.strictEqual(result, "volumeValue"); - assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReplicationFromReplicationName', () => { - const result = client.matchReplicationFromReplicationName(fakePath); - assert.strictEqual(result, "replicationValue"); - assert((client.pathTemplates.replicationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('snapshot', async () => { - const fakePath = "/rendered/path/snapshot"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - volume: "volumeValue", - snapshot: "snapshotValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.snapshotPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.snapshotPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('snapshotPath', () => { - const result = client.snapshotPath("projectValue", "locationValue", "volumeValue", "snapshotValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.snapshotPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromSnapshotName', () => { - const result = client.matchProjectFromSnapshotName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromSnapshotName', () => { - const result = client.matchLocationFromSnapshotName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVolumeFromSnapshotName', () => { - const result = client.matchVolumeFromSnapshotName(fakePath); - assert.strictEqual(result, "volumeValue"); - assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSnapshotFromSnapshotName', () => { - const result = client.matchSnapshotFromSnapshotName(fakePath); - assert.strictEqual(result, "snapshotValue"); - assert((client.pathTemplates.snapshotPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('storagePool', async () => { - const fakePath = "/rendered/path/storagePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - storage_pool: "storagePoolValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.storagePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.storagePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('storagePoolPath', () => { - const result = client.storagePoolPath("projectValue", "locationValue", "storagePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.storagePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromStoragePoolName', () => { - const result = client.matchProjectFromStoragePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromStoragePoolName', () => { - const result = client.matchLocationFromStoragePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchStoragePoolFromStoragePoolName', () => { - const result = client.matchStoragePoolFromStoragePoolName(fakePath); - assert.strictEqual(result, "storagePoolValue"); - assert((client.pathTemplates.storagePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('volume', async () => { - const fakePath = "/rendered/path/volume"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - volume: "volumeValue", - }; - const client = new netappModule.v1.NetAppClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.volumePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.volumePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('volumePath', () => { - const result = client.volumePath("projectValue", "locationValue", "volumeValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.volumePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVolumeName', () => { - const result = client.matchProjectFromVolumeName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.volumePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVolumeName', () => { - const result = client.matchLocationFromVolumeName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.volumePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVolumeFromVolumeName', () => { - const result = client.matchVolumeFromVolumeName(fakePath); - assert.strictEqual(result, "volumeValue"); - assert((client.pathTemplates.volumePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-netapp/tsconfig.json b/owl-bot-staging/google-cloud-netapp/tsconfig.json deleted file mode 100644 index ca73e7bfc82..00000000000 --- a/owl-bot-staging/google-cloud-netapp/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-cloud-netapp/webpack.config.js b/owl-bot-staging/google-cloud-netapp/webpack.config.js deleted file mode 100644 index a2b8685a421..00000000000 --- a/owl-bot-staging/google-cloud-netapp/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 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. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'NetApp', - filename: './net-app.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-netapp/README.md b/packages/google-cloud-netapp/README.md index 525247099ea..f4c7d90f98b 100644 --- a/packages/google-cloud-netapp/README.md +++ b/packages/google-cloud-netapp/README.md @@ -82,6 +82,11 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | delete volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js) | | encrypt volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js) | | establish peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js) | +| establish volume peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js) | +| execute ontap delete | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js) | +| execute ontap get | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js) | +| execute ontap patch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js) | +| execute ontap post | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js) | | get active directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js) | | get backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js) | | get backup policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js) | diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto index d3b52e0f286..22f6dfd68bb 100644 --- a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/backup.proto @@ -100,6 +100,7 @@ message Backup { Type backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Volume full name of this backup belongs to. + // Either source_volume or ontap_source should be provided. // Format: // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` string source_volume = 6 [ diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto index a5402c41820..6d4beaa5435 100644 --- a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/cloud_netapp_service.proto @@ -26,6 +26,7 @@ import "google/cloud/netapp/v1/backup_policy.proto"; import "google/cloud/netapp/v1/backup_vault.proto"; import "google/cloud/netapp/v1/host_group.proto"; import "google/cloud/netapp/v1/kms.proto"; +import "google/cloud/netapp/v1/ontap.proto"; import "google/cloud/netapp/v1/quota_rule.proto"; import "google/cloud/netapp/v1/replication.proto"; import "google/cloud/netapp/v1/snapshot.proto"; @@ -208,6 +209,20 @@ service NetApp { }; } + // Establish volume peering. This is used to establish cluster and svm + // peerings between the GCNV and OnPrem clusters. + rpc EstablishVolumePeering(EstablishVolumePeeringRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Volume" + metadata_type: "OperationMetadata" + }; + } + // Returns descriptions of all snapshots for a volume. rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) { option (google.api.http) = { @@ -832,6 +847,44 @@ service NetApp { metadata_type: "OperationMetadata" }; } + + // `ExecuteOntapPost` dispatches the ONTAP `POST` request to the + // `StoragePool` cluster. + rpc ExecuteOntapPost(ExecuteOntapPostRequest) + returns (ExecuteOntapPostResponse) { + option (google.api.http) = { + post: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + body: "*" + }; + } + + // `ExecuteOntapGet` dispatches the ONTAP `GET` request to the + // `StoragePool` cluster. + rpc ExecuteOntapGet(ExecuteOntapGetRequest) + returns (ExecuteOntapGetResponse) { + option (google.api.http) = { + get: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }; + } + + // `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the + // `StoragePool` cluster. + rpc ExecuteOntapDelete(ExecuteOntapDeleteRequest) + returns (ExecuteOntapDeleteResponse) { + option (google.api.http) = { + delete: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }; + } + + // `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the + // `StoragePool` cluster. + rpc ExecuteOntapPatch(ExecuteOntapPatchRequest) + returns (ExecuteOntapPatchResponse) { + option (google.api.http) = { + patch: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + body: "*" + }; + } } // Represents the metadata of the long-running operation. diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto index 7a189955394..789ad87e8be 100644 --- a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/common.proto @@ -87,9 +87,6 @@ enum StoragePoolType { // Storage pool type is unified. UNIFIED = 2; - - // Storage pool type is unified large capacity. - UNIFIED_LARGE_CAPACITY = 3; } // Schedule for Hybrid Replication. diff --git a/owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto similarity index 100% rename from owl-bot-staging/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto rename to packages/google-cloud-netapp/protos/google/cloud/netapp/v1/ontap.proto diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto index 5599607a9c8..7bbca2f7588 100644 --- a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/storage_pool.proto @@ -30,6 +30,19 @@ option java_package = "com.google.cloud.netapp.v1"; option php_namespace = "Google\\Cloud\\NetApp\\V1"; option ruby_package = "Google::Cloud::NetApp::V1"; +// `Mode` of the storage pool or volume. This field is used to control whether +// the resource is managed by the GCNV APIs or the GCNV ONTAP Mode APIs. +enum Mode { + // The `Mode` is not specified. + MODE_UNSPECIFIED = 0; + + // The resource is managed by the GCNV APIs. + DEFAULT = 1; + + // The resource is managed by the GCNV ONTAP Mode APIs. + ONTAP = 2; +} + // GetStoragePoolRequest gets a Storage Pool. message GetStoragePoolRequest { // Required. Name of the storage pool @@ -302,10 +315,14 @@ message StoragePool { // Optional. Type of the storage pool. This field is used to control whether // the pool supports `FILE` based volumes only or `UNIFIED` (both `FILE` and - // `BLOCK`) volumes or `UNIFIED_LARGE_CAPACITY` (both `FILE` and `BLOCK`) - // volumes with large capacity. If not specified during creation, it defaults - // to `FILE`. + // `BLOCK`) volumes. If not specified during creation, it defaults to `FILE`. optional StoragePoolType type = 35 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mode of the storage pool. This field is used to control whether + // the user can perform the ONTAP operations on the storage pool using the + // GCNV ONTAP Mode APIs. If not specified during creation, it defaults to + // `DEFAULT`. + optional Mode mode = 36 [(google.api.field_behavior) = OPTIONAL]; } // ValidateDirectoryServiceRequest validates the directory service policy diff --git a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto index 96a5b010e12..d5526eaefd4 100644 --- a/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto +++ b/packages/google-cloud-netapp/protos/google/cloud/netapp/v1/volume.proto @@ -236,6 +236,31 @@ message Volume { singular: "volume" }; + // Details about a clone volume. + message CloneDetails { + // Output only. Specifies the full resource name of the source snapshot from + // which this volume was cloned. Format: + // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + string source_snapshot = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/Snapshot" + } + ]; + + // Output only. Full name of the source volume resource. + // Format: + // projects/{project}/locations/{location}/volumes/{volume} + string source_volume = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Output only. Shared space in GiB. Determined at volume creation time + // based on size of source snapshot. + int64 shared_space_gib = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // The volume states enum State { // Unspecified Volume State @@ -438,6 +463,10 @@ message Volume { // Currently, only one block device is permitted per Volume. repeated BlockDevice block_devices = 45 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. If this volume is a clone, this field contains details about + // the clone. + CloneDetails clone_details = 47 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines the export policy for the volume. @@ -634,9 +663,13 @@ message RestoreParameters { string source_snapshot = 1; // Full name of the backup resource. - // Format: + // Format for standard backup: // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} - string source_backup = 2; + // Format for BackupDR backup: + // projects/{project}/locations/{location}/backupVaults/{backup_vault}/dataSources/{data_source}/backups/{backup} + string source_backup = 2 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; } } @@ -960,3 +993,30 @@ message RestoreBackupFilesRequest { // RestoreBackupFilesResponse is the result of RestoreBackupFilesRequest. message RestoreBackupFilesResponse {} + +// EstablishVolumePeeringRequest establishes cluster and svm peerings between +// the source and destination clusters. +message EstablishVolumePeeringRequest { + // Required. The volume resource name, in the format + // `projects/{project_id}/locations/{location}/volumes/{volume_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // Required. Name of the user's local source cluster to be peered with the + // destination cluster. + string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the user's local source vserver svm to be peered with the + // destination vserver svm. + string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of IPv4 ip addresses to be used for peering. + repeated string peer_ip_addresses = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name of the user's local source volume to be peered with the + // destination volume. + string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-netapp/protos/protos.d.ts b/packages/google-cloud-netapp/protos/protos.d.ts index 5fb5ce97589..ebfa437a676 100644 --- a/packages/google-cloud-netapp/protos/protos.d.ts +++ b/packages/google-cloud-netapp/protos/protos.d.ts @@ -3701,6 +3701,20 @@ export namespace google { */ public revertVolume(request: google.cloud.netapp.v1.IRevertVolumeRequest): Promise; + /** + * Calls EstablishVolumePeering. + * @param request EstablishVolumePeeringRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, callback: google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback): void; + + /** + * Calls EstablishVolumePeering. + * @param request EstablishVolumePeeringRequest message or plain object + * @returns Promise + */ + public establishVolumePeering(request: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): Promise; + /** * Calls ListSnapshots. * @param request ListSnapshotsRequest message or plain object @@ -4442,6 +4456,62 @@ export namespace google { * @returns Promise */ public deleteHostGroup(request: google.cloud.netapp.v1.IDeleteHostGroupRequest): Promise; + + /** + * Calls ExecuteOntapPost. + * @param request ExecuteOntapPostRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse + */ + public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback): void; + + /** + * Calls ExecuteOntapPost. + * @param request ExecuteOntapPostRequest message or plain object + * @returns Promise + */ + public executeOntapPost(request: google.cloud.netapp.v1.IExecuteOntapPostRequest): Promise; + + /** + * Calls ExecuteOntapGet. + * @param request ExecuteOntapGetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse + */ + public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback): void; + + /** + * Calls ExecuteOntapGet. + * @param request ExecuteOntapGetRequest message or plain object + * @returns Promise + */ + public executeOntapGet(request: google.cloud.netapp.v1.IExecuteOntapGetRequest): Promise; + + /** + * Calls ExecuteOntapDelete. + * @param request ExecuteOntapDeleteRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse + */ + public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback): void; + + /** + * Calls ExecuteOntapDelete. + * @param request ExecuteOntapDeleteRequest message or plain object + * @returns Promise + */ + public executeOntapDelete(request: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): Promise; + + /** + * Calls ExecuteOntapPatch. + * @param request ExecuteOntapPatchRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse + */ + public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest, callback: google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback): void; + + /** + * Calls ExecuteOntapPatch. + * @param request ExecuteOntapPatchRequest message or plain object + * @returns Promise + */ + public executeOntapPatch(request: google.cloud.netapp.v1.IExecuteOntapPatchRequest): Promise; } namespace NetApp { @@ -4537,6 +4607,13 @@ export namespace google { */ type RevertVolumeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. + * @param error Error, if any + * @param [response] Operation + */ + type EstablishVolumePeeringCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. * @param error Error, if any @@ -4907,6 +4984,34 @@ export namespace google { * @param [response] Operation */ type DeleteHostGroupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. + * @param error Error, if any + * @param [response] ExecuteOntapPostResponse + */ + type ExecuteOntapPostCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPostResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. + * @param error Error, if any + * @param [response] ExecuteOntapGetResponse + */ + type ExecuteOntapGetCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapGetResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. + * @param error Error, if any + * @param [response] ExecuteOntapDeleteResponse + */ + type ExecuteOntapDeleteCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapDeleteResponse) => void; + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. + * @param error Error, if any + * @param [response] ExecuteOntapPatchResponse + */ + type ExecuteOntapPatchCallback = (error: (Error|null), response?: google.cloud.netapp.v1.ExecuteOntapPatchResponse) => void; } /** Properties of an OperationMetadata. */ @@ -5869,8 +5974,7 @@ export namespace google { enum StoragePoolType { STORAGE_POOL_TYPE_UNSPECIFIED = 0, FILE = 1, - UNIFIED = 2, - UNIFIED_LARGE_CAPACITY = 3 + UNIFIED = 2 } /** HybridReplicationSchedule enum. */ @@ -7078,139 +7182,927 @@ export namespace google { serviceAccount?: (string|null); } - /** Represents a KmsConfig. */ - class KmsConfig implements IKmsConfig { + /** Represents a KmsConfig. */ + class KmsConfig implements IKmsConfig { + + /** + * Constructs a new KmsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IKmsConfig); + + /** KmsConfig name. */ + public name: string; + + /** KmsConfig cryptoKeyName. */ + public cryptoKeyName: string; + + /** KmsConfig state. */ + public state: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State); + + /** KmsConfig stateDetails. */ + public stateDetails: string; + + /** KmsConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** KmsConfig description. */ + public description: string; + + /** KmsConfig labels. */ + public labels: { [k: string]: string }; + + /** KmsConfig instructions. */ + public instructions: string; + + /** KmsConfig serviceAccount. */ + public serviceAccount: string; + + /** + * Creates a new KmsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KmsConfig instance + */ + public static create(properties?: google.cloud.netapp.v1.IKmsConfig): google.cloud.netapp.v1.KmsConfig; + + /** + * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. + * @param message KmsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KmsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KmsConfig + * @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.netapp.v1.KmsConfig; + + /** + * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KmsConfig + * @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.netapp.v1.KmsConfig; + + /** + * Verifies a KmsConfig 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 KmsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KmsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.KmsConfig; + + /** + * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. + * @param message KmsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.KmsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KmsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KmsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KmsConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + READY = 1, + CREATING = 2, + DELETING = 3, + UPDATING = 4, + IN_USE = 5, + ERROR = 6, + KEY_CHECK_PENDING = 7, + KEY_NOT_REACHABLE = 8, + DISABLING = 9, + DISABLED = 10, + MIGRATING = 11 + } + } + + /** Properties of an ExecuteOntapPostRequest. */ + interface IExecuteOntapPostRequest { + + /** ExecuteOntapPostRequest body */ + body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPostRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapPostRequest. */ + class ExecuteOntapPostRequest implements IExecuteOntapPostRequest { + + /** + * Constructs a new ExecuteOntapPostRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest); + + /** ExecuteOntapPostRequest body. */ + public body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPostRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapPostRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPostRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostRequest): google.cloud.netapp.v1.ExecuteOntapPostRequest; + + /** + * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @param message ExecuteOntapPostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. + * @param message ExecuteOntapPostRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPostRequest + * @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.netapp.v1.ExecuteOntapPostRequest; + + /** + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPostRequest + * @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.netapp.v1.ExecuteOntapPostRequest; + + /** + * Verifies an ExecuteOntapPostRequest 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 ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPostRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostRequest; + + /** + * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapPostRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPostRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPostRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapPostResponse. */ + interface IExecuteOntapPostResponse { + + /** ExecuteOntapPostResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapPostResponse. */ + class ExecuteOntapPostResponse implements IExecuteOntapPostResponse { + + /** + * Constructs a new ExecuteOntapPostResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse); + + /** ExecuteOntapPostResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapPostResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPostResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPostResponse): google.cloud.netapp.v1.ExecuteOntapPostResponse; + + /** + * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @param message ExecuteOntapPostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. + * @param message ExecuteOntapPostResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPostResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPostResponse + * @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.netapp.v1.ExecuteOntapPostResponse; + + /** + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPostResponse + * @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.netapp.v1.ExecuteOntapPostResponse; + + /** + * Verifies an ExecuteOntapPostResponse 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 ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPostResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPostResponse; + + /** + * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapPostResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPostResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapPostResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapPostResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapGetRequest. */ + interface IExecuteOntapGetRequest { + + /** ExecuteOntapGetRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapGetRequest. */ + class ExecuteOntapGetRequest implements IExecuteOntapGetRequest { + + /** + * Constructs a new ExecuteOntapGetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest); + + /** ExecuteOntapGetRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapGetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapGetRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetRequest): google.cloud.netapp.v1.ExecuteOntapGetRequest; + + /** + * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @param message ExecuteOntapGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. + * @param message ExecuteOntapGetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapGetRequest + * @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.netapp.v1.ExecuteOntapGetRequest; + + /** + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapGetRequest + * @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.netapp.v1.ExecuteOntapGetRequest; + + /** + * Verifies an ExecuteOntapGetRequest 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 ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapGetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetRequest; + + /** + * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapGetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapGetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapGetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapGetResponse. */ + interface IExecuteOntapGetResponse { + + /** ExecuteOntapGetResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapGetResponse. */ + class ExecuteOntapGetResponse implements IExecuteOntapGetResponse { + + /** + * Constructs a new ExecuteOntapGetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse); + + /** ExecuteOntapGetResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapGetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapGetResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapGetResponse): google.cloud.netapp.v1.ExecuteOntapGetResponse; + + /** + * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @param message ExecuteOntapGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. + * @param message ExecuteOntapGetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapGetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapGetResponse + * @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.netapp.v1.ExecuteOntapGetResponse; + + /** + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapGetResponse + * @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.netapp.v1.ExecuteOntapGetResponse; + + /** + * Verifies an ExecuteOntapGetResponse 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 ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapGetResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapGetResponse; + + /** + * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapGetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapGetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapGetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapGetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapDeleteRequest. */ + interface IExecuteOntapDeleteRequest { + + /** ExecuteOntapDeleteRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapDeleteRequest. */ + class ExecuteOntapDeleteRequest implements IExecuteOntapDeleteRequest { + + /** + * Constructs a new ExecuteOntapDeleteRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest); + + /** ExecuteOntapDeleteRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapDeleteRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteRequest): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @param message ExecuteOntapDeleteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. + * @param message ExecuteOntapDeleteRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapDeleteRequest + * @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.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapDeleteRequest + * @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.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Verifies an ExecuteOntapDeleteRequest 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 ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapDeleteRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteRequest; + + /** + * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapDeleteRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapDeleteRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapDeleteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapDeleteResponse. */ + interface IExecuteOntapDeleteResponse { + + /** ExecuteOntapDeleteResponse body */ + body?: (google.protobuf.IStruct|null); + } + + /** Represents an ExecuteOntapDeleteResponse. */ + class ExecuteOntapDeleteResponse implements IExecuteOntapDeleteResponse { + + /** + * Constructs a new ExecuteOntapDeleteResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse); + + /** ExecuteOntapDeleteResponse body. */ + public body?: (google.protobuf.IStruct|null); + + /** + * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapDeleteResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapDeleteResponse): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @param message ExecuteOntapDeleteResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. + * @param message ExecuteOntapDeleteResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapDeleteResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapDeleteResponse + * @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.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapDeleteResponse + * @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.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Verifies an ExecuteOntapDeleteResponse 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 ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapDeleteResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapDeleteResponse; + + /** + * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapDeleteResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapDeleteResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteOntapDeleteResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteOntapDeleteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteOntapPatchRequest. */ + interface IExecuteOntapPatchRequest { + + /** ExecuteOntapPatchRequest body */ + body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPatchRequest ontapPath */ + ontapPath?: (string|null); + } + + /** Represents an ExecuteOntapPatchRequest. */ + class ExecuteOntapPatchRequest implements IExecuteOntapPatchRequest { + + /** + * Constructs a new ExecuteOntapPatchRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest); + + /** ExecuteOntapPatchRequest body. */ + public body?: (google.protobuf.IStruct|null); + + /** ExecuteOntapPatchRequest ontapPath. */ + public ontapPath: string; + + /** + * Creates a new ExecuteOntapPatchRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteOntapPatchRequest instance + */ + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchRequest): google.cloud.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @param message ExecuteOntapPatchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. + * @param message ExecuteOntapPatchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteOntapPatchRequest + * @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.netapp.v1.ExecuteOntapPatchRequest; + + /** + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteOntapPatchRequest + * @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.netapp.v1.ExecuteOntapPatchRequest; /** - * Constructs a new KmsConfig. - * @param [properties] Properties to set + * Verifies an ExecuteOntapPatchRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - constructor(properties?: google.cloud.netapp.v1.IKmsConfig); + public static verify(message: { [k: string]: any }): (string|null); - /** KmsConfig name. */ - public name: string; + /** + * Creates an ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteOntapPatchRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchRequest; - /** KmsConfig cryptoKeyName. */ - public cryptoKeyName: string; + /** + * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. + * @param message ExecuteOntapPatchRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** KmsConfig state. */ - public state: (google.cloud.netapp.v1.KmsConfig.State|keyof typeof google.cloud.netapp.v1.KmsConfig.State); + /** + * Converts this ExecuteOntapPatchRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** KmsConfig stateDetails. */ - public stateDetails: string; + /** + * Gets the default type url for ExecuteOntapPatchRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** KmsConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an ExecuteOntapPatchResponse. */ + interface IExecuteOntapPatchResponse { - /** KmsConfig description. */ - public description: string; + /** ExecuteOntapPatchResponse body */ + body?: (google.protobuf.IStruct|null); + } - /** KmsConfig labels. */ - public labels: { [k: string]: string }; + /** Represents an ExecuteOntapPatchResponse. */ + class ExecuteOntapPatchResponse implements IExecuteOntapPatchResponse { - /** KmsConfig instructions. */ - public instructions: string; + /** + * Constructs a new ExecuteOntapPatchResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse); - /** KmsConfig serviceAccount. */ - public serviceAccount: string; + /** ExecuteOntapPatchResponse body. */ + public body?: (google.protobuf.IStruct|null); /** - * Creates a new KmsConfig instance using the specified properties. + * Creates a new ExecuteOntapPatchResponse instance using the specified properties. * @param [properties] Properties to set - * @returns KmsConfig instance + * @returns ExecuteOntapPatchResponse instance */ - public static create(properties?: google.cloud.netapp.v1.IKmsConfig): google.cloud.netapp.v1.KmsConfig; + public static create(properties?: google.cloud.netapp.v1.IExecuteOntapPatchResponse): google.cloud.netapp.v1.ExecuteOntapPatchResponse; /** - * Encodes the specified KmsConfig message. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @param message KmsConfig message or plain object to encode + * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @param message ExecuteOntapPatchResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KmsConfig message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.KmsConfig.verify|verify} messages. - * @param message KmsConfig message or plain object to encode + * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. + * @param message ExecuteOntapPatchResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.netapp.v1.IKmsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.netapp.v1.IExecuteOntapPatchResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KmsConfig message from the specified reader or buffer. + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KmsConfig + * @returns ExecuteOntapPatchResponse * @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.netapp.v1.KmsConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.ExecuteOntapPatchResponse; /** - * Decodes a KmsConfig message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KmsConfig + * @returns ExecuteOntapPatchResponse * @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.netapp.v1.KmsConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.ExecuteOntapPatchResponse; /** - * Verifies a KmsConfig message. + * Verifies an ExecuteOntapPatchResponse 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 KmsConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KmsConfig + * @returns ExecuteOntapPatchResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.KmsConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.ExecuteOntapPatchResponse; /** - * Creates a plain object from a KmsConfig message. Also converts values to other types if specified. - * @param message KmsConfig + * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. + * @param message ExecuteOntapPatchResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.netapp.v1.KmsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.netapp.v1.ExecuteOntapPatchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KmsConfig to JSON. + * Converts this ExecuteOntapPatchResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KmsConfig + * Gets the default type url for ExecuteOntapPatchResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace KmsConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - READY = 1, - CREATING = 2, - DELETING = 3, - UPDATING = 4, - IN_USE = 5, - ERROR = 6, - KEY_CHECK_PENDING = 7, - KEY_NOT_REACHABLE = 8, - DISABLING = 9, - DISABLED = 10, - MIGRATING = 11 - } - } - /** Properties of a ListQuotaRulesRequest. */ interface IListQuotaRulesRequest { @@ -10728,6 +11620,9 @@ export namespace google { /** Volume blockDevices */ blockDevices?: (google.cloud.netapp.v1.IBlockDevice[]|null); + + /** Volume cloneDetails */ + cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); } /** Represents a Volume. */ @@ -10865,6 +11760,9 @@ export namespace google { /** Volume blockDevices. */ public blockDevices: google.cloud.netapp.v1.IBlockDevice[]; + /** Volume cloneDetails. */ + public cloneDetails?: (google.cloud.netapp.v1.Volume.ICloneDetails|null); + /** * Creates a new Volume instance using the specified properties. * @param [properties] Properties to set @@ -10945,6 +11843,115 @@ export namespace google { namespace Volume { + /** Properties of a CloneDetails. */ + interface ICloneDetails { + + /** CloneDetails sourceSnapshot */ + sourceSnapshot?: (string|null); + + /** CloneDetails sourceVolume */ + sourceVolume?: (string|null); + + /** CloneDetails sharedSpaceGib */ + sharedSpaceGib?: (number|Long|string|null); + } + + /** Represents a CloneDetails. */ + class CloneDetails implements ICloneDetails { + + /** + * Constructs a new CloneDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.Volume.ICloneDetails); + + /** CloneDetails sourceSnapshot. */ + public sourceSnapshot: string; + + /** CloneDetails sourceVolume. */ + public sourceVolume: string; + + /** CloneDetails sharedSpaceGib. */ + public sharedSpaceGib: (number|Long|string); + + /** + * Creates a new CloneDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CloneDetails instance + */ + public static create(properties?: google.cloud.netapp.v1.Volume.ICloneDetails): google.cloud.netapp.v1.Volume.CloneDetails; + + /** + * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @param message CloneDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @param message CloneDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.Volume.ICloneDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloneDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloneDetails + * @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.netapp.v1.Volume.CloneDetails; + + /** + * Decodes a CloneDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloneDetails + * @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.netapp.v1.Volume.CloneDetails; + + /** + * Verifies a CloneDetails 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 CloneDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloneDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.Volume.CloneDetails; + + /** + * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. + * @param message CloneDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.Volume.CloneDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloneDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloneDetails + * @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, @@ -13071,91 +14078,212 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreBackupFilesResponse. */ - interface IRestoreBackupFilesResponse { + /** Properties of a RestoreBackupFilesResponse. */ + interface IRestoreBackupFilesResponse { + } + + /** Represents a RestoreBackupFilesResponse. */ + class RestoreBackupFilesResponse implements IRestoreBackupFilesResponse { + + /** + * Constructs a new RestoreBackupFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse); + + /** + * Creates a new RestoreBackupFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupFilesResponse instance + */ + public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse): google.cloud.netapp.v1.RestoreBackupFilesResponse; + + /** + * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @param message RestoreBackupFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. + * @param message RestoreBackupFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupFilesResponse + * @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.netapp.v1.RestoreBackupFilesResponse; + + /** + * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupFilesResponse + * @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.netapp.v1.RestoreBackupFilesResponse; + + /** + * Verifies a RestoreBackupFilesResponse 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 RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupFilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesResponse; + + /** + * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. + * @param message RestoreBackupFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupFilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupFilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EstablishVolumePeeringRequest. */ + interface IEstablishVolumePeeringRequest { + + /** EstablishVolumePeeringRequest name */ + name?: (string|null); + + /** EstablishVolumePeeringRequest peerClusterName */ + peerClusterName?: (string|null); + + /** EstablishVolumePeeringRequest peerSvmName */ + peerSvmName?: (string|null); + + /** EstablishVolumePeeringRequest peerIpAddresses */ + peerIpAddresses?: (string[]|null); + + /** EstablishVolumePeeringRequest peerVolumeName */ + peerVolumeName?: (string|null); } - /** Represents a RestoreBackupFilesResponse. */ - class RestoreBackupFilesResponse implements IRestoreBackupFilesResponse { + /** Represents an EstablishVolumePeeringRequest. */ + class EstablishVolumePeeringRequest implements IEstablishVolumePeeringRequest { /** - * Constructs a new RestoreBackupFilesResponse. + * Constructs a new EstablishVolumePeeringRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse); + constructor(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest); + + /** EstablishVolumePeeringRequest name. */ + public name: string; + + /** EstablishVolumePeeringRequest peerClusterName. */ + public peerClusterName: string; + + /** EstablishVolumePeeringRequest peerSvmName. */ + public peerSvmName: string; + + /** EstablishVolumePeeringRequest peerIpAddresses. */ + public peerIpAddresses: string[]; + + /** EstablishVolumePeeringRequest peerVolumeName. */ + public peerVolumeName: string; /** - * Creates a new RestoreBackupFilesResponse instance using the specified properties. + * Creates a new EstablishVolumePeeringRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreBackupFilesResponse instance + * @returns EstablishVolumePeeringRequest instance */ - public static create(properties?: google.cloud.netapp.v1.IRestoreBackupFilesResponse): google.cloud.netapp.v1.RestoreBackupFilesResponse; + public static create(properties?: google.cloud.netapp.v1.IEstablishVolumePeeringRequest): google.cloud.netapp.v1.EstablishVolumePeeringRequest; /** - * Encodes the specified RestoreBackupFilesResponse message. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @param message RestoreBackupFilesResponse message or plain object to encode + * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @param message EstablishVolumePeeringRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreBackupFilesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RestoreBackupFilesResponse.verify|verify} messages. - * @param message RestoreBackupFilesResponse message or plain object to encode + * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @param message EstablishVolumePeeringRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.netapp.v1.IRestoreBackupFilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.netapp.v1.IEstablishVolumePeeringRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer. + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreBackupFilesResponse + * @returns EstablishVolumePeeringRequest * @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.netapp.v1.RestoreBackupFilesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.netapp.v1.EstablishVolumePeeringRequest; /** - * Decodes a RestoreBackupFilesResponse message from the specified reader or buffer, length delimited. + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreBackupFilesResponse + * @returns EstablishVolumePeeringRequest * @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.netapp.v1.RestoreBackupFilesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.netapp.v1.EstablishVolumePeeringRequest; /** - * Verifies a RestoreBackupFilesResponse message. + * Verifies an EstablishVolumePeeringRequest 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 RestoreBackupFilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreBackupFilesResponse + * @returns EstablishVolumePeeringRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.RestoreBackupFilesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.netapp.v1.EstablishVolumePeeringRequest; /** - * Creates a plain object from a RestoreBackupFilesResponse message. Also converts values to other types if specified. - * @param message RestoreBackupFilesResponse + * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. + * @param message EstablishVolumePeeringRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.netapp.v1.RestoreBackupFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.netapp.v1.EstablishVolumePeeringRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreBackupFilesResponse to JSON. + * Converts this EstablishVolumePeeringRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreBackupFilesResponse + * Gets the default type url for EstablishVolumePeeringRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -13945,6 +15073,13 @@ export namespace google { } } + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DEFAULT = 1, + ONTAP = 2 + } + /** Properties of a GetStoragePoolRequest. */ interface IGetStoragePoolRequest { @@ -14776,6 +15911,9 @@ export namespace google { /** StoragePool type */ type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); + + /** StoragePool mode */ + mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); } /** Represents a StoragePool. */ @@ -14883,6 +16021,9 @@ export namespace google { /** StoragePool type. */ public type?: (google.cloud.netapp.v1.StoragePoolType|keyof typeof google.cloud.netapp.v1.StoragePoolType|null); + /** StoragePool mode. */ + public mode?: (google.cloud.netapp.v1.Mode|keyof typeof google.cloud.netapp.v1.Mode|null); + /** * Creates a new StoragePool instance using the specified properties. * @param [properties] Properties to set @@ -21730,6 +22871,335 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @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.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @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.protobuf.Struct; + + /** + * Verifies a Struct 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 Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @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.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @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.protobuf.Value; + + /** + * Verifies a Value 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 Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Verifies a ListValue 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 ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an Any. */ interface IAny { diff --git a/packages/google-cloud-netapp/protos/protos.js b/packages/google-cloud-netapp/protos/protos.js index 49d73c9a0fd..43bea2b29fb 100644 --- a/packages/google-cloud-netapp/protos/protos.js +++ b/packages/google-cloud-netapp/protos/protos.js @@ -9665,6 +9665,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|establishVolumePeering}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef EstablishVolumePeeringCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EstablishVolumePeering. + * @function establishVolumePeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.EstablishVolumePeeringCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.establishVolumePeering = function establishVolumePeering(request, callback) { + return this.rpcCall(establishVolumePeering, $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EstablishVolumePeering" }); + + /** + * Calls EstablishVolumePeering. + * @function establishVolumePeering + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} request EstablishVolumePeeringRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.netapp.v1.NetApp|listSnapshots}. * @memberof google.cloud.netapp.v1.NetApp @@ -11414,6 +11447,138 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPost}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapPostCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} [response] ExecuteOntapPostResponse + */ + + /** + * Calls ExecuteOntapPost. + * @function executeOntapPost + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPostCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPostResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapPost = function executeOntapPost(request, callback) { + return this.rpcCall(executeOntapPost, $root.google.cloud.netapp.v1.ExecuteOntapPostRequest, $root.google.cloud.netapp.v1.ExecuteOntapPostResponse, request, callback); + }, "name", { value: "ExecuteOntapPost" }); + + /** + * Calls ExecuteOntapPost. + * @function executeOntapPost + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} request ExecuteOntapPostRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapGet}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapGetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} [response] ExecuteOntapGetResponse + */ + + /** + * Calls ExecuteOntapGet. + * @function executeOntapGet + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapGetCallback} callback Node-style callback called with the error, if any, and ExecuteOntapGetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapGet = function executeOntapGet(request, callback) { + return this.rpcCall(executeOntapGet, $root.google.cloud.netapp.v1.ExecuteOntapGetRequest, $root.google.cloud.netapp.v1.ExecuteOntapGetResponse, request, callback); + }, "name", { value: "ExecuteOntapGet" }); + + /** + * Calls ExecuteOntapGet. + * @function executeOntapGet + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} request ExecuteOntapGetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapDelete}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapDeleteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} [response] ExecuteOntapDeleteResponse + */ + + /** + * Calls ExecuteOntapDelete. + * @function executeOntapDelete + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapDeleteCallback} callback Node-style callback called with the error, if any, and ExecuteOntapDeleteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapDelete = function executeOntapDelete(request, callback) { + return this.rpcCall(executeOntapDelete, $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest, $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse, request, callback); + }, "name", { value: "ExecuteOntapDelete" }); + + /** + * Calls ExecuteOntapDelete. + * @function executeOntapDelete + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} request ExecuteOntapDeleteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.netapp.v1.NetApp|executeOntapPatch}. + * @memberof google.cloud.netapp.v1.NetApp + * @typedef ExecuteOntapPatchCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} [response] ExecuteOntapPatchResponse + */ + + /** + * Calls ExecuteOntapPatch. + * @function executeOntapPatch + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object + * @param {google.cloud.netapp.v1.NetApp.ExecuteOntapPatchCallback} callback Node-style callback called with the error, if any, and ExecuteOntapPatchResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetApp.prototype.executeOntapPatch = function executeOntapPatch(request, callback) { + return this.rpcCall(executeOntapPatch, $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest, $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse, request, callback); + }, "name", { value: "ExecuteOntapPatch" }); + + /** + * Calls ExecuteOntapPatch. + * @function executeOntapPatch + * @memberof google.cloud.netapp.v1.NetApp + * @instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} request ExecuteOntapPatchRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return NetApp; })(); @@ -13886,14 +14051,12 @@ * @property {number} STORAGE_POOL_TYPE_UNSPECIFIED=0 STORAGE_POOL_TYPE_UNSPECIFIED value * @property {number} FILE=1 FILE value * @property {number} UNIFIED=2 UNIFIED value - * @property {number} UNIFIED_LARGE_CAPACITY=3 UNIFIED_LARGE_CAPACITY value */ v1.StoragePoolType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STORAGE_POOL_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "FILE"] = 1; values[valuesById[2] = "UNIFIED"] = 2; - values[valuesById[3] = "UNIFIED_LARGE_CAPACITY"] = 3; return values; })(); @@ -17243,28 +17406,25 @@ return KmsConfig; })(); - v1.ListQuotaRulesRequest = (function() { + v1.ExecuteOntapPostRequest = (function() { /** - * Properties of a ListQuotaRulesRequest. + * Properties of an ExecuteOntapPostRequest. * @memberof google.cloud.netapp.v1 - * @interface IListQuotaRulesRequest - * @property {string|null} [parent] ListQuotaRulesRequest parent - * @property {number|null} [pageSize] ListQuotaRulesRequest pageSize - * @property {string|null} [pageToken] ListQuotaRulesRequest pageToken - * @property {string|null} [filter] ListQuotaRulesRequest filter - * @property {string|null} [orderBy] ListQuotaRulesRequest orderBy + * @interface IExecuteOntapPostRequest + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostRequest body + * @property {string|null} [ontapPath] ExecuteOntapPostRequest ontapPath */ /** - * Constructs a new ListQuotaRulesRequest. + * Constructs a new ExecuteOntapPostRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListQuotaRulesRequest. - * @implements IListQuotaRulesRequest + * @classdesc Represents an ExecuteOntapPostRequest. + * @implements IExecuteOntapPostRequest * @constructor - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set */ - function ListQuotaRulesRequest(properties) { + function ExecuteOntapPostRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17272,133 +17432,91 @@ } /** - * ListQuotaRulesRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.parent = ""; - - /** - * ListQuotaRulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.pageSize = 0; - - /** - * ListQuotaRulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest - * @instance - */ - ListQuotaRulesRequest.prototype.pageToken = ""; - - /** - * ListQuotaRulesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * ExecuteOntapPostRequest body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @instance */ - ListQuotaRulesRequest.prototype.filter = ""; + ExecuteOntapPostRequest.prototype.body = null; /** - * ListQuotaRulesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * ExecuteOntapPostRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @instance */ - ListQuotaRulesRequest.prototype.orderBy = ""; + ExecuteOntapPostRequest.prototype.ontapPath = ""; /** - * Creates a new ListQuotaRulesRequest instance using the specified properties. + * Creates a new ExecuteOntapPostRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest instance */ - ListQuotaRulesRequest.create = function create(properties) { - return new ListQuotaRulesRequest(properties); + ExecuteOntapPostRequest.create = function create(properties) { + return new ExecuteOntapPostRequest(properties); }; /** - * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapPostRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListQuotaRulesRequest.encode = function encode(message, writer) { + ExecuteOntapPostRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); return writer; }; /** - * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapPostRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPostRequest} message ExecuteOntapPostRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListQuotaRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapPostRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListQuotaRulesRequest.decode = function decode(reader, length, error) { + ExecuteOntapPostRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } case 2: { - message.pageSize = reader.int32(); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.ontapPath = reader.string(); break; } default: @@ -17410,159 +17528,136 @@ }; /** - * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapPostRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListQuotaRulesRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapPostRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListQuotaRulesRequest message. + * Verifies an ExecuteOntapPostRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListQuotaRulesRequest.verify = function verify(message) { + ExecuteOntapPostRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; return null; }; /** - * Creates a ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapPostRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapPostRequest} ExecuteOntapPostRequest */ - ListQuotaRulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesRequest) + ExecuteOntapPostRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostRequest) return object; - var message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostRequest(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostRequest.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); return message; }; /** - * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapPostRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static - * @param {google.cloud.netapp.v1.ListQuotaRulesRequest} message ListQuotaRulesRequest + * @param {google.cloud.netapp.v1.ExecuteOntapPostRequest} message ExecuteOntapPostRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListQuotaRulesRequest.toObject = function toObject(message, options) { + ExecuteOntapPostRequest.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.body = null; + object.ontapPath = ""; } - 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.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; return object; }; /** - * Converts this ListQuotaRulesRequest to JSON. + * Converts this ExecuteOntapPostRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @instance * @returns {Object.} JSON object */ - ListQuotaRulesRequest.prototype.toJSON = function toJSON() { + ExecuteOntapPostRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListQuotaRulesRequest + * Gets the default type url for ExecuteOntapPostRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapPostRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListQuotaRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapPostRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostRequest"; }; - return ListQuotaRulesRequest; + return ExecuteOntapPostRequest; })(); - v1.ListQuotaRulesResponse = (function() { + v1.ExecuteOntapPostResponse = (function() { /** - * Properties of a ListQuotaRulesResponse. + * Properties of an ExecuteOntapPostResponse. * @memberof google.cloud.netapp.v1 - * @interface IListQuotaRulesResponse - * @property {Array.|null} [quotaRules] ListQuotaRulesResponse quotaRules - * @property {string|null} [nextPageToken] ListQuotaRulesResponse nextPageToken - * @property {Array.|null} [unreachable] ListQuotaRulesResponse unreachable + * @interface IExecuteOntapPostResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPostResponse body */ /** - * Constructs a new ListQuotaRulesResponse. + * Constructs a new ExecuteOntapPostResponse. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListQuotaRulesResponse. - * @implements IListQuotaRulesResponse + * @classdesc Represents an ExecuteOntapPostResponse. + * @implements IExecuteOntapPostResponse * @constructor - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set */ - function ListQuotaRulesResponse(properties) { - this.quotaRules = []; - this.unreachable = []; + function ExecuteOntapPostResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17570,111 +17665,77 @@ } /** - * ListQuotaRulesResponse quotaRules. - * @member {Array.} quotaRules - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - */ - ListQuotaRulesResponse.prototype.quotaRules = $util.emptyArray; - - /** - * ListQuotaRulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse - * @instance - */ - ListQuotaRulesResponse.prototype.nextPageToken = ""; - - /** - * ListQuotaRulesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * ExecuteOntapPostResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @instance */ - ListQuotaRulesResponse.prototype.unreachable = $util.emptyArray; + ExecuteOntapPostResponse.prototype.body = null; /** - * Creates a new ListQuotaRulesResponse instance using the specified properties. + * Creates a new ExecuteOntapPostResponse instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse instance + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse instance */ - ListQuotaRulesResponse.create = function create(properties) { - return new ListQuotaRulesResponse(properties); + ExecuteOntapPostResponse.create = function create(properties) { + return new ExecuteOntapPostResponse(properties); }; /** - * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * Encodes the specified ExecuteOntapPostResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListQuotaRulesResponse.encode = function encode(message, writer) { + ExecuteOntapPostResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.quotaRules != null && message.quotaRules.length) - for (var i = 0; i < message.quotaRules.length; ++i) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. + * Encodes the specified ExecuteOntapPostResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPostResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static - * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPostResponse} message ExecuteOntapPostResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListQuotaRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapPostResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListQuotaRulesResponse.decode = function decode(reader, length, error) { + ExecuteOntapPostResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.quotaRules && message.quotaRules.length)) - message.quotaRules = []; - message.quotaRules.push($root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -17686,169 +17747,127 @@ }; /** - * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapPostResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListQuotaRulesResponse.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapPostResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListQuotaRulesResponse message. + * Verifies an ExecuteOntapPostResponse message. * @function verify - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListQuotaRulesResponse.verify = function verify(message) { + ExecuteOntapPostResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.quotaRules != null && message.hasOwnProperty("quotaRules")) { - if (!Array.isArray(message.quotaRules)) - return "quotaRules: array expected"; - for (var i = 0; i < message.quotaRules.length; ++i) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRules[i]); - if (error) - return "quotaRules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; } return null; }; /** - * Creates a ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapPostResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse + * @returns {google.cloud.netapp.v1.ExecuteOntapPostResponse} ExecuteOntapPostResponse */ - ListQuotaRulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesResponse) + ExecuteOntapPostResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPostResponse) return object; - var message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); - if (object.quotaRules) { - if (!Array.isArray(object.quotaRules)) - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: array expected"); - message.quotaRules = []; - for (var i = 0; i < object.quotaRules.length; ++i) { - if (typeof object.quotaRules[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: object expected"); - message.quotaRules[i] = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPostResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPostResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); } return message; }; /** - * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapPostResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static - * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} message ListQuotaRulesResponse + * @param {google.cloud.netapp.v1.ExecuteOntapPostResponse} message ExecuteOntapPostResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListQuotaRulesResponse.toObject = function toObject(message, options) { + ExecuteOntapPostResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.quotaRules = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.quotaRules && message.quotaRules.length) { - object.quotaRules = []; - for (var j = 0; j < message.quotaRules.length; ++j) - object.quotaRules[j] = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); return object; }; /** - * Converts this ListQuotaRulesResponse to JSON. + * Converts this ExecuteOntapPostResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @instance * @returns {Object.} JSON object */ - ListQuotaRulesResponse.prototype.toJSON = function toJSON() { + ExecuteOntapPostResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListQuotaRulesResponse + * Gets the default type url for ExecuteOntapPostResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @memberof google.cloud.netapp.v1.ExecuteOntapPostResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListQuotaRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapPostResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesResponse"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPostResponse"; }; - return ListQuotaRulesResponse; + return ExecuteOntapPostResponse; })(); - v1.GetQuotaRuleRequest = (function() { + v1.ExecuteOntapGetRequest = (function() { /** - * Properties of a GetQuotaRuleRequest. + * Properties of an ExecuteOntapGetRequest. * @memberof google.cloud.netapp.v1 - * @interface IGetQuotaRuleRequest - * @property {string|null} [name] GetQuotaRuleRequest name + * @interface IExecuteOntapGetRequest + * @property {string|null} [ontapPath] ExecuteOntapGetRequest ontapPath */ /** - * Constructs a new GetQuotaRuleRequest. + * Constructs a new ExecuteOntapGetRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetQuotaRuleRequest. - * @implements IGetQuotaRuleRequest + * @classdesc Represents an ExecuteOntapGetRequest. + * @implements IExecuteOntapGetRequest * @constructor - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set */ - function GetQuotaRuleRequest(properties) { + function ExecuteOntapGetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17856,77 +17875,77 @@ } /** - * GetQuotaRuleRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * ExecuteOntapGetRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @instance */ - GetQuotaRuleRequest.prototype.name = ""; + ExecuteOntapGetRequest.prototype.ontapPath = ""; /** - * Creates a new GetQuotaRuleRequest instance using the specified properties. + * Creates a new ExecuteOntapGetRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest instance */ - GetQuotaRuleRequest.create = function create(properties) { - return new GetQuotaRuleRequest(properties); + ExecuteOntapGetRequest.create = function create(properties) { + return new ExecuteOntapGetRequest(properties); }; /** - * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapGetRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetQuotaRuleRequest.encode = function encode(message, writer) { + ExecuteOntapGetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ontapPath); return writer; }; /** - * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapGetRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static - * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapGetRequest} message ExecuteOntapGetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapGetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetQuotaRuleRequest.decode = function decode(reader, length, error) { + ExecuteOntapGetRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.ontapPath = reader.string(); break; } default: @@ -17938,124 +17957,122 @@ }; /** - * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapGetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapGetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetQuotaRuleRequest message. + * Verifies an ExecuteOntapGetRequest message. * @function verify - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetQuotaRuleRequest.verify = function verify(message) { + ExecuteOntapGetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; return null; }; /** - * Creates a GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapGetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetRequest} ExecuteOntapGetRequest */ - GetQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetQuotaRuleRequest) + ExecuteOntapGetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetRequest) return object; - var message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetRequest(); + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); return message; }; /** - * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapGetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static - * @param {google.cloud.netapp.v1.GetQuotaRuleRequest} message GetQuotaRuleRequest + * @param {google.cloud.netapp.v1.ExecuteOntapGetRequest} message ExecuteOntapGetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetQuotaRuleRequest.toObject = function toObject(message, options) { + ExecuteOntapGetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.ontapPath = ""; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; return object; }; /** - * Converts this GetQuotaRuleRequest to JSON. + * Converts this ExecuteOntapGetRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @instance * @returns {Object.} JSON object */ - GetQuotaRuleRequest.prototype.toJSON = function toJSON() { + ExecuteOntapGetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetQuotaRuleRequest + * Gets the default type url for ExecuteOntapGetRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapGetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetQuotaRuleRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetRequest"; }; - return GetQuotaRuleRequest; + return ExecuteOntapGetRequest; })(); - v1.CreateQuotaRuleRequest = (function() { + v1.ExecuteOntapGetResponse = (function() { /** - * Properties of a CreateQuotaRuleRequest. + * Properties of an ExecuteOntapGetResponse. * @memberof google.cloud.netapp.v1 - * @interface ICreateQuotaRuleRequest - * @property {string|null} [parent] CreateQuotaRuleRequest parent - * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] CreateQuotaRuleRequest quotaRule - * @property {string|null} [quotaRuleId] CreateQuotaRuleRequest quotaRuleId + * @interface IExecuteOntapGetResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapGetResponse body */ /** - * Constructs a new CreateQuotaRuleRequest. + * Constructs a new ExecuteOntapGetResponse. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateQuotaRuleRequest. - * @implements ICreateQuotaRuleRequest + * @classdesc Represents an ExecuteOntapGetResponse. + * @implements IExecuteOntapGetResponse * @constructor - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set */ - function CreateQuotaRuleRequest(properties) { + function ExecuteOntapGetResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18063,105 +18080,77 @@ } /** - * CreateQuotaRuleRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - */ - CreateQuotaRuleRequest.prototype.parent = ""; - - /** - * CreateQuotaRuleRequest quotaRule. - * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest - * @instance - */ - CreateQuotaRuleRequest.prototype.quotaRule = null; - - /** - * CreateQuotaRuleRequest quotaRuleId. - * @member {string} quotaRuleId - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * ExecuteOntapGetResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @instance */ - CreateQuotaRuleRequest.prototype.quotaRuleId = ""; + ExecuteOntapGetResponse.prototype.body = null; /** - * Creates a new CreateQuotaRuleRequest instance using the specified properties. + * Creates a new ExecuteOntapGetResponse instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest instance + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse instance */ - CreateQuotaRuleRequest.create = function create(properties) { - return new CreateQuotaRuleRequest(properties); + ExecuteOntapGetResponse.create = function create(properties) { + return new ExecuteOntapGetResponse(properties); }; /** - * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapGetResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateQuotaRuleRequest.encode = function encode(message, writer) { + ExecuteOntapGetResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.quotaRuleId != null && Object.hasOwnProperty.call(message, "quotaRuleId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.quotaRuleId); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapGetResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapGetResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static - * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapGetResponse} message ExecuteOntapGetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapGetResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateQuotaRuleRequest.decode = function decode(reader, length, error) { + ExecuteOntapGetResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.quotaRuleId = reader.string(); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -18173,145 +18162,127 @@ }; /** - * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapGetResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapGetResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateQuotaRuleRequest message. + * Verifies an ExecuteOntapGetResponse message. * @function verify - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateQuotaRuleRequest.verify = function verify(message) { + ExecuteOntapGetResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); if (error) - return "quotaRule." + error; + return "body." + error; } - if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) - if (!$util.isString(message.quotaRuleId)) - return "quotaRuleId: string expected"; return null; }; /** - * Creates a CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapGetResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapGetResponse} ExecuteOntapGetResponse */ - CreateQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateQuotaRuleRequest) + ExecuteOntapGetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapGetResponse) return object; - var message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.quotaRule != null) { - if (typeof object.quotaRule !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateQuotaRuleRequest.quotaRule: object expected"); - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapGetResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapGetResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); } - if (object.quotaRuleId != null) - message.quotaRuleId = String(object.quotaRuleId); return message; }; /** - * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapGetResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static - * @param {google.cloud.netapp.v1.CreateQuotaRuleRequest} message CreateQuotaRuleRequest + * @param {google.cloud.netapp.v1.ExecuteOntapGetResponse} message ExecuteOntapGetResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateQuotaRuleRequest.toObject = function toObject(message, options) { + ExecuteOntapGetResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.quotaRule = null; - object.quotaRuleId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) - object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); - if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) - object.quotaRuleId = message.quotaRuleId; + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); return object; }; /** - * Converts this CreateQuotaRuleRequest to JSON. + * Converts this ExecuteOntapGetResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @instance * @returns {Object.} JSON object */ - CreateQuotaRuleRequest.prototype.toJSON = function toJSON() { + ExecuteOntapGetResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateQuotaRuleRequest + * Gets the default type url for ExecuteOntapGetResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapGetResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapGetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateQuotaRuleRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapGetResponse"; }; - return CreateQuotaRuleRequest; + return ExecuteOntapGetResponse; })(); - v1.UpdateQuotaRuleRequest = (function() { + v1.ExecuteOntapDeleteRequest = (function() { /** - * Properties of an UpdateQuotaRuleRequest. + * Properties of an ExecuteOntapDeleteRequest. * @memberof google.cloud.netapp.v1 - * @interface IUpdateQuotaRuleRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQuotaRuleRequest updateMask - * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] UpdateQuotaRuleRequest quotaRule + * @interface IExecuteOntapDeleteRequest + * @property {string|null} [ontapPath] ExecuteOntapDeleteRequest ontapPath */ /** - * Constructs a new UpdateQuotaRuleRequest. + * Constructs a new ExecuteOntapDeleteRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateQuotaRuleRequest. - * @implements IUpdateQuotaRuleRequest + * @classdesc Represents an ExecuteOntapDeleteRequest. + * @implements IExecuteOntapDeleteRequest * @constructor - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set */ - function UpdateQuotaRuleRequest(properties) { + function ExecuteOntapDeleteRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18319,91 +18290,77 @@ } /** - * UpdateQuotaRuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest - * @instance - */ - UpdateQuotaRuleRequest.prototype.updateMask = null; - - /** - * UpdateQuotaRuleRequest quotaRule. - * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * ExecuteOntapDeleteRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @instance */ - UpdateQuotaRuleRequest.prototype.quotaRule = null; + ExecuteOntapDeleteRequest.prototype.ontapPath = ""; /** - * Creates a new UpdateQuotaRuleRequest instance using the specified properties. + * Creates a new ExecuteOntapDeleteRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest instance */ - UpdateQuotaRuleRequest.create = function create(properties) { - return new UpdateQuotaRuleRequest(properties); + ExecuteOntapDeleteRequest.create = function create(properties) { + return new ExecuteOntapDeleteRequest(properties); }; /** - * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapDeleteRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateQuotaRuleRequest.encode = function encode(message, writer) { + ExecuteOntapDeleteRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) - $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ontapPath); return writer; }; /** - * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapDeleteRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static - * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapDeleteRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateQuotaRuleRequest.decode = function decode(reader, length, error) { + ExecuteOntapDeleteRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } case 2: { - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); + message.ontapPath = reader.string(); break; } default: @@ -18415,141 +18372,122 @@ }; /** - * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapDeleteRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapDeleteRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateQuotaRuleRequest message. + * Verifies an ExecuteOntapDeleteRequest message. * @function verify - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateQuotaRuleRequest.verify = function verify(message) { + ExecuteOntapDeleteRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { - var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); - if (error) - return "quotaRule." + error; - } + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; return null; }; /** - * Creates an UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapDeleteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} ExecuteOntapDeleteRequest */ - UpdateQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest) + ExecuteOntapDeleteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest) return object; - var message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.quotaRule != null) { - if (typeof object.quotaRule !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.quotaRule: object expected"); - message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); - } + var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteRequest(); + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); return message; }; /** - * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapDeleteRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static - * @param {google.cloud.netapp.v1.UpdateQuotaRuleRequest} message UpdateQuotaRuleRequest + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteRequest} message ExecuteOntapDeleteRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateQuotaRuleRequest.toObject = function toObject(message, options) { + ExecuteOntapDeleteRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.quotaRule = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) - object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); + if (options.defaults) + object.ontapPath = ""; + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; return object; }; /** - * Converts this UpdateQuotaRuleRequest to JSON. + * Converts this ExecuteOntapDeleteRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @instance * @returns {Object.} JSON object */ - UpdateQuotaRuleRequest.prototype.toJSON = function toJSON() { + ExecuteOntapDeleteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateQuotaRuleRequest + * Gets the default type url for ExecuteOntapDeleteRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapDeleteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateQuotaRuleRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteRequest"; }; - return UpdateQuotaRuleRequest; + return ExecuteOntapDeleteRequest; })(); - v1.DeleteQuotaRuleRequest = (function() { + v1.ExecuteOntapDeleteResponse = (function() { /** - * Properties of a DeleteQuotaRuleRequest. + * Properties of an ExecuteOntapDeleteResponse. * @memberof google.cloud.netapp.v1 - * @interface IDeleteQuotaRuleRequest - * @property {string|null} [name] DeleteQuotaRuleRequest name + * @interface IExecuteOntapDeleteResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapDeleteResponse body */ /** - * Constructs a new DeleteQuotaRuleRequest. + * Constructs a new ExecuteOntapDeleteResponse. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteQuotaRuleRequest. - * @implements IDeleteQuotaRuleRequest + * @classdesc Represents an ExecuteOntapDeleteResponse. + * @implements IExecuteOntapDeleteResponse * @constructor - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set */ - function DeleteQuotaRuleRequest(properties) { + function ExecuteOntapDeleteResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18557,77 +18495,77 @@ } /** - * DeleteQuotaRuleRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * ExecuteOntapDeleteResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @instance */ - DeleteQuotaRuleRequest.prototype.name = ""; + ExecuteOntapDeleteResponse.prototype.body = null; /** - * Creates a new DeleteQuotaRuleRequest instance using the specified properties. + * Creates a new ExecuteOntapDeleteResponse instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest instance + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse instance */ - DeleteQuotaRuleRequest.create = function create(properties) { - return new DeleteQuotaRuleRequest(properties); + ExecuteOntapDeleteResponse.create = function create(properties) { + return new ExecuteOntapDeleteResponse(properties); }; /** - * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapDeleteResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteQuotaRuleRequest.encode = function encode(message, writer) { + ExecuteOntapDeleteResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. + * Encodes the specified ExecuteOntapDeleteResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapDeleteResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static - * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapDeleteResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteQuotaRuleRequest.decode = function decode(reader, length, error) { + ExecuteOntapDeleteResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -18639,131 +18577,128 @@ }; /** - * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapDeleteResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapDeleteResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteQuotaRuleRequest message. + * Verifies an ExecuteOntapDeleteResponse message. * @function verify - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteQuotaRuleRequest.verify = function verify(message) { + ExecuteOntapDeleteResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; + } return null; }; /** - * Creates a DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapDeleteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest + * @returns {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} ExecuteOntapDeleteResponse */ - DeleteQuotaRuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest) + ExecuteOntapDeleteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse) return object; - var message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapDeleteResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapDeleteResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } return message; }; /** - * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapDeleteResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static - * @param {google.cloud.netapp.v1.DeleteQuotaRuleRequest} message DeleteQuotaRuleRequest + * @param {google.cloud.netapp.v1.ExecuteOntapDeleteResponse} message ExecuteOntapDeleteResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteQuotaRuleRequest.toObject = function toObject(message, options) { + ExecuteOntapDeleteResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); return object; }; /** - * Converts this DeleteQuotaRuleRequest to JSON. + * Converts this ExecuteOntapDeleteResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @instance * @returns {Object.} JSON object */ - DeleteQuotaRuleRequest.prototype.toJSON = function toJSON() { + ExecuteOntapDeleteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteQuotaRuleRequest + * Gets the default type url for ExecuteOntapDeleteResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest + * @memberof google.cloud.netapp.v1.ExecuteOntapDeleteResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapDeleteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteQuotaRuleRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapDeleteResponse"; }; - return DeleteQuotaRuleRequest; + return ExecuteOntapDeleteResponse; })(); - v1.QuotaRule = (function() { + v1.ExecuteOntapPatchRequest = (function() { /** - * Properties of a QuotaRule. + * Properties of an ExecuteOntapPatchRequest. * @memberof google.cloud.netapp.v1 - * @interface IQuotaRule - * @property {string|null} [name] QuotaRule name - * @property {string|null} [target] QuotaRule target - * @property {google.cloud.netapp.v1.QuotaRule.Type|null} [type] QuotaRule type - * @property {number|null} [diskLimitMib] QuotaRule diskLimitMib - * @property {google.cloud.netapp.v1.QuotaRule.State|null} [state] QuotaRule state - * @property {string|null} [stateDetails] QuotaRule stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] QuotaRule createTime - * @property {string|null} [description] QuotaRule description - * @property {Object.|null} [labels] QuotaRule labels + * @interface IExecuteOntapPatchRequest + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchRequest body + * @property {string|null} [ontapPath] ExecuteOntapPatchRequest ontapPath */ /** - * Constructs a new QuotaRule. + * Constructs a new ExecuteOntapPatchRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a QuotaRule. - * @implements IQuotaRule + * @classdesc Represents an ExecuteOntapPatchRequest. + * @implements IExecuteOntapPatchRequest * @constructor - * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set */ - function QuotaRule(properties) { - this.labels = {}; + function ExecuteOntapPatchRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18771,209 +18706,91 @@ } /** - * QuotaRule name. - * @member {string} name - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.name = ""; - - /** - * QuotaRule target. - * @member {string} target - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.target = ""; - - /** - * QuotaRule type. - * @member {google.cloud.netapp.v1.QuotaRule.Type} type - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.type = 0; - - /** - * QuotaRule diskLimitMib. - * @member {number} diskLimitMib - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.diskLimitMib = 0; - - /** - * QuotaRule state. - * @member {google.cloud.netapp.v1.QuotaRule.State} state - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.state = 0; - - /** - * QuotaRule stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.stateDetails = ""; - - /** - * QuotaRule createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.QuotaRule - * @instance - */ - QuotaRule.prototype.createTime = null; - - /** - * QuotaRule description. - * @member {string} description - * @memberof google.cloud.netapp.v1.QuotaRule + * ExecuteOntapPatchRequest body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @instance */ - QuotaRule.prototype.description = ""; + ExecuteOntapPatchRequest.prototype.body = null; /** - * QuotaRule labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.QuotaRule + * ExecuteOntapPatchRequest ontapPath. + * @member {string} ontapPath + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @instance */ - QuotaRule.prototype.labels = $util.emptyObject; + ExecuteOntapPatchRequest.prototype.ontapPath = ""; /** - * Creates a new QuotaRule instance using the specified properties. + * Creates a new ExecuteOntapPatchRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static - * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest instance */ - QuotaRule.create = function create(properties) { - return new QuotaRule(properties); + ExecuteOntapPatchRequest.create = function create(properties) { + return new ExecuteOntapPatchRequest(properties); }; /** - * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * Encodes the specified ExecuteOntapPatchRequest message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static - * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaRule.encode = function encode(message, writer) { + ExecuteOntapPatchRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.diskLimitMib != null && Object.hasOwnProperty.call(message, "diskLimitMib")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.diskLimitMib); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ontapPath != null && Object.hasOwnProperty.call(message, "ontapPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontapPath); return writer; }; /** - * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. + * Encodes the specified ExecuteOntapPatchRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static - * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPatchRequest} message ExecuteOntapPatchRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuotaRule.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapPatchRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuotaRule message from the specified reader or buffer. + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaRule.decode = function decode(reader, length, error) { + ExecuteOntapPatchRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.QuotaRule(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } case 2: { - message.target = reader.string(); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } case 3: { - message.type = reader.int32(); - break; - } - case 4: { - message.diskLimitMib = reader.int32(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.stateDetails = reader.string(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.description = reader.string(); - break; - } - case 10: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; + message.ontapPath = reader.string(); break; } default: @@ -18985,329 +18802,136 @@ }; /** - * Decodes a QuotaRule message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapPatchRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuotaRule.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapPatchRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuotaRule message. + * Verifies an ExecuteOntapPatchRequest message. * @function verify - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuotaRule.verify = function verify(message) { + ExecuteOntapPatchRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: 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.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) - if (!$util.isInteger(message.diskLimitMib)) - return "diskLimitMib: integer expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); if (error) - return "createTime." + error; - } - 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 < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + return "body." + error; } + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + if (!$util.isString(message.ontapPath)) + return "ontapPath: string expected"; return null; }; /** - * Creates a QuotaRule message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapPatchRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchRequest} ExecuteOntapPatchRequest */ - QuotaRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.QuotaRule) + ExecuteOntapPatchRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest) return object; - var message = new $root.google.cloud.netapp.v1.QuotaRule(); - if (object.name != null) - message.name = String(object.name); - if (object.target != null) - message.target = String(object.target); - 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 "INDIVIDUAL_USER_QUOTA": - case 1: - message.type = 1; - break; - case "INDIVIDUAL_GROUP_QUOTA": - case 2: - message.type = 2; - break; - case "DEFAULT_USER_QUOTA": - case 3: - message.type = 3; - break; - case "DEFAULT_GROUP_QUOTA": - case 4: - message.type = 4; - break; - } - if (object.diskLimitMib != null) - message.diskLimitMib = object.diskLimitMib | 0; - 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 "UPDATING": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "READY": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.QuotaRule.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.QuotaRule.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchRequest(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchRequest.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); + } + if (object.ontapPath != null) + message.ontapPath = String(object.ontapPath); return message; }; /** - * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapPatchRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static - * @param {google.cloud.netapp.v1.QuotaRule} message QuotaRule + * @param {google.cloud.netapp.v1.ExecuteOntapPatchRequest} message ExecuteOntapPatchRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuotaRule.toObject = function toObject(message, options) { + ExecuteOntapPatchRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.name = ""; - object.target = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.diskLimitMib = 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.stateDetails = ""; - object.createTime = null; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] : message.type; - if (message.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) - object.diskLimitMib = message.diskLimitMib; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.QuotaRule.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + object.body = null; + object.ontapPath = ""; } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); + if (message.ontapPath != null && message.hasOwnProperty("ontapPath")) + object.ontapPath = message.ontapPath; return object; }; /** - * Converts this QuotaRule to JSON. + * Converts this ExecuteOntapPatchRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @instance * @returns {Object.} JSON object */ - QuotaRule.prototype.toJSON = function toJSON() { + ExecuteOntapPatchRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QuotaRule + * Gets the default type url for ExecuteOntapPatchRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.QuotaRule + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QuotaRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapPatchRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.QuotaRule"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchRequest"; }; - /** - * Type enum. - * @name google.cloud.netapp.v1.QuotaRule.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INDIVIDUAL_USER_QUOTA=1 INDIVIDUAL_USER_QUOTA value - * @property {number} INDIVIDUAL_GROUP_QUOTA=2 INDIVIDUAL_GROUP_QUOTA value - * @property {number} DEFAULT_USER_QUOTA=3 DEFAULT_USER_QUOTA value - * @property {number} DEFAULT_GROUP_QUOTA=4 DEFAULT_GROUP_QUOTA value - */ - QuotaRule.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INDIVIDUAL_USER_QUOTA"] = 1; - values[valuesById[2] = "INDIVIDUAL_GROUP_QUOTA"] = 2; - values[valuesById[3] = "DEFAULT_USER_QUOTA"] = 3; - values[valuesById[4] = "DEFAULT_GROUP_QUOTA"] = 4; - return values; - })(); - - /** - * State enum. - * @name google.cloud.netapp.v1.QuotaRule.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} UPDATING=2 UPDATING value - * @property {number} DELETING=3 DELETING value - * @property {number} READY=4 READY value - * @property {number} ERROR=5 ERROR value - */ - QuotaRule.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "UPDATING"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "READY"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; - })(); - - return QuotaRule; + return ExecuteOntapPatchRequest; })(); - v1.TransferStats = (function() { + v1.ExecuteOntapPatchResponse = (function() { /** - * Properties of a TransferStats. + * Properties of an ExecuteOntapPatchResponse. * @memberof google.cloud.netapp.v1 - * @interface ITransferStats - * @property {number|Long|null} [transferBytes] TransferStats transferBytes - * @property {google.protobuf.IDuration|null} [totalTransferDuration] TransferStats totalTransferDuration - * @property {number|Long|null} [lastTransferBytes] TransferStats lastTransferBytes - * @property {google.protobuf.IDuration|null} [lastTransferDuration] TransferStats lastTransferDuration - * @property {google.protobuf.IDuration|null} [lagDuration] TransferStats lagDuration - * @property {google.protobuf.ITimestamp|null} [updateTime] TransferStats updateTime - * @property {google.protobuf.ITimestamp|null} [lastTransferEndTime] TransferStats lastTransferEndTime - * @property {string|null} [lastTransferError] TransferStats lastTransferError + * @interface IExecuteOntapPatchResponse + * @property {google.protobuf.IStruct|null} [body] ExecuteOntapPatchResponse body */ /** - * Constructs a new TransferStats. + * Constructs a new ExecuteOntapPatchResponse. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a TransferStats. - * @implements ITransferStats + * @classdesc Represents an ExecuteOntapPatchResponse. + * @implements IExecuteOntapPatchResponse * @constructor - * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set */ - function TransferStats(properties) { + function ExecuteOntapPatchResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19315,226 +18939,77 @@ } /** - * TransferStats transferBytes. - * @member {number|Long|null|undefined} transferBytes - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.transferBytes = null; - - /** - * TransferStats totalTransferDuration. - * @member {google.protobuf.IDuration|null|undefined} totalTransferDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.totalTransferDuration = null; - - /** - * TransferStats lastTransferBytes. - * @member {number|Long|null|undefined} lastTransferBytes - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferBytes = null; - - /** - * TransferStats lastTransferDuration. - * @member {google.protobuf.IDuration|null|undefined} lastTransferDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferDuration = null; - - /** - * TransferStats lagDuration. - * @member {google.protobuf.IDuration|null|undefined} lagDuration - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lagDuration = null; - - /** - * TransferStats updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.updateTime = null; - - /** - * TransferStats lastTransferEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastTransferEndTime - * @memberof google.cloud.netapp.v1.TransferStats - * @instance - */ - TransferStats.prototype.lastTransferEndTime = null; - - /** - * TransferStats lastTransferError. - * @member {string|null|undefined} lastTransferError - * @memberof google.cloud.netapp.v1.TransferStats + * ExecuteOntapPatchResponse body. + * @member {google.protobuf.IStruct|null|undefined} body + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @instance */ - TransferStats.prototype.lastTransferError = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_transferBytes", { - get: $util.oneOfGetter($oneOfFields = ["transferBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_totalTransferDuration", { - get: $util.oneOfGetter($oneOfFields = ["totalTransferDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferBytes", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferDuration", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lagDuration", { - get: $util.oneOfGetter($oneOfFields = ["lagDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferEndTime", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TransferStats.prototype, "_lastTransferError", { - get: $util.oneOfGetter($oneOfFields = ["lastTransferError"]), - set: $util.oneOfSetter($oneOfFields) - }); + ExecuteOntapPatchResponse.prototype.body = null; /** - * Creates a new TransferStats instance using the specified properties. + * Creates a new ExecuteOntapPatchResponse instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static - * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats instance + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse instance */ - TransferStats.create = function create(properties) { - return new TransferStats(properties); + ExecuteOntapPatchResponse.create = function create(properties) { + return new ExecuteOntapPatchResponse(properties); }; /** - * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * Encodes the specified ExecuteOntapPatchResponse message. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static - * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransferStats.encode = function encode(message, writer) { + ExecuteOntapPatchResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transferBytes != null && Object.hasOwnProperty.call(message, "transferBytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transferBytes); - if (message.totalTransferDuration != null && Object.hasOwnProperty.call(message, "totalTransferDuration")) - $root.google.protobuf.Duration.encode(message.totalTransferDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastTransferBytes != null && Object.hasOwnProperty.call(message, "lastTransferBytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastTransferBytes); - if (message.lastTransferDuration != null && Object.hasOwnProperty.call(message, "lastTransferDuration")) - $root.google.protobuf.Duration.encode(message.lastTransferDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lagDuration != null && Object.hasOwnProperty.call(message, "lagDuration")) - $root.google.protobuf.Duration.encode(message.lagDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastTransferEndTime != null && Object.hasOwnProperty.call(message, "lastTransferEndTime")) - $root.google.protobuf.Timestamp.encode(message.lastTransferEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastTransferError != null && Object.hasOwnProperty.call(message, "lastTransferError")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastTransferError); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.protobuf.Struct.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. + * Encodes the specified ExecuteOntapPatchResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ExecuteOntapPatchResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static - * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode + * @param {google.cloud.netapp.v1.IExecuteOntapPatchResponse} message ExecuteOntapPatchResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransferStats.encodeDelimited = function encodeDelimited(message, writer) { + ExecuteOntapPatchResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransferStats message from the specified reader or buffer. + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransferStats.decode = function decode(reader, length, error) { + ExecuteOntapPatchResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TransferStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.transferBytes = reader.int64(); - break; - } - case 2: { - message.totalTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastTransferBytes = reader.int64(); - break; - } - case 4: { - message.lastTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lagDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.lastTransferEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.lastTransferError = reader.string(); + message.body = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -19546,278 +19021,131 @@ }; /** - * Decodes a TransferStats message from the specified reader or buffer, length delimited. + * Decodes an ExecuteOntapPatchResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransferStats.decodeDelimited = function decodeDelimited(reader) { + ExecuteOntapPatchResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransferStats message. + * Verifies an ExecuteOntapPatchResponse message. * @function verify - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransferStats.verify = function verify(message) { + ExecuteOntapPatchResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { - properties._transferBytes = 1; - if (!$util.isInteger(message.transferBytes) && !(message.transferBytes && $util.isInteger(message.transferBytes.low) && $util.isInteger(message.transferBytes.high))) - return "transferBytes: integer|Long expected"; - } - if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { - properties._totalTransferDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.totalTransferDuration); - if (error) - return "totalTransferDuration." + error; - } - } - if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { - properties._lastTransferBytes = 1; - if (!$util.isInteger(message.lastTransferBytes) && !(message.lastTransferBytes && $util.isInteger(message.lastTransferBytes.low) && $util.isInteger(message.lastTransferBytes.high))) - return "lastTransferBytes: integer|Long expected"; - } - if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { - properties._lastTransferDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.lastTransferDuration); - if (error) - return "lastTransferDuration." + error; - } - } - if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { - properties._lagDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.lagDuration); - if (error) - return "lagDuration." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { - properties._lastTransferEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.lastTransferEndTime); - if (error) - return "lastTransferEndTime." + error; - } - } - if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { - properties._lastTransferError = 1; - if (!$util.isString(message.lastTransferError)) - return "lastTransferError: string expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.protobuf.Struct.verify(message.body); + if (error) + return "body." + error; } return null; }; /** - * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. + * Creates an ExecuteOntapPatchResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.TransferStats} TransferStats + * @returns {google.cloud.netapp.v1.ExecuteOntapPatchResponse} ExecuteOntapPatchResponse */ - TransferStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.TransferStats) + ExecuteOntapPatchResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse) return object; - var message = new $root.google.cloud.netapp.v1.TransferStats(); - if (object.transferBytes != null) - if ($util.Long) - (message.transferBytes = $util.Long.fromValue(object.transferBytes)).unsigned = false; - else if (typeof object.transferBytes === "string") - message.transferBytes = parseInt(object.transferBytes, 10); - else if (typeof object.transferBytes === "number") - message.transferBytes = object.transferBytes; - else if (typeof object.transferBytes === "object") - message.transferBytes = new $util.LongBits(object.transferBytes.low >>> 0, object.transferBytes.high >>> 0).toNumber(); - if (object.totalTransferDuration != null) { - if (typeof object.totalTransferDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.totalTransferDuration: object expected"); - message.totalTransferDuration = $root.google.protobuf.Duration.fromObject(object.totalTransferDuration); - } - if (object.lastTransferBytes != null) - if ($util.Long) - (message.lastTransferBytes = $util.Long.fromValue(object.lastTransferBytes)).unsigned = false; - else if (typeof object.lastTransferBytes === "string") - message.lastTransferBytes = parseInt(object.lastTransferBytes, 10); - else if (typeof object.lastTransferBytes === "number") - message.lastTransferBytes = object.lastTransferBytes; - else if (typeof object.lastTransferBytes === "object") - message.lastTransferBytes = new $util.LongBits(object.lastTransferBytes.low >>> 0, object.lastTransferBytes.high >>> 0).toNumber(); - if (object.lastTransferDuration != null) { - if (typeof object.lastTransferDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferDuration: object expected"); - message.lastTransferDuration = $root.google.protobuf.Duration.fromObject(object.lastTransferDuration); - } - if (object.lagDuration != null) { - if (typeof object.lagDuration !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lagDuration: object expected"); - message.lagDuration = $root.google.protobuf.Duration.fromObject(object.lagDuration); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastTransferEndTime != null) { - if (typeof object.lastTransferEndTime !== "object") - throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferEndTime: object expected"); - message.lastTransferEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastTransferEndTime); + var message = new $root.google.cloud.netapp.v1.ExecuteOntapPatchResponse(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.cloud.netapp.v1.ExecuteOntapPatchResponse.body: object expected"); + message.body = $root.google.protobuf.Struct.fromObject(object.body); } - if (object.lastTransferError != null) - message.lastTransferError = String(object.lastTransferError); return message; }; /** - * Creates a plain object from a TransferStats message. Also converts values to other types if specified. + * Creates a plain object from an ExecuteOntapPatchResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static - * @param {google.cloud.netapp.v1.TransferStats} message TransferStats + * @param {google.cloud.netapp.v1.ExecuteOntapPatchResponse} message ExecuteOntapPatchResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransferStats.toObject = function toObject(message, options) { + ExecuteOntapPatchResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { - if (typeof message.transferBytes === "number") - object.transferBytes = options.longs === String ? String(message.transferBytes) : message.transferBytes; - else - object.transferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transferBytes) : options.longs === Number ? new $util.LongBits(message.transferBytes.low >>> 0, message.transferBytes.high >>> 0).toNumber() : message.transferBytes; - if (options.oneofs) - object._transferBytes = "transferBytes"; - } - if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { - object.totalTransferDuration = $root.google.protobuf.Duration.toObject(message.totalTransferDuration, options); - if (options.oneofs) - object._totalTransferDuration = "totalTransferDuration"; - } - if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { - if (typeof message.lastTransferBytes === "number") - object.lastTransferBytes = options.longs === String ? String(message.lastTransferBytes) : message.lastTransferBytes; - else - object.lastTransferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.lastTransferBytes) : options.longs === Number ? new $util.LongBits(message.lastTransferBytes.low >>> 0, message.lastTransferBytes.high >>> 0).toNumber() : message.lastTransferBytes; - if (options.oneofs) - object._lastTransferBytes = "lastTransferBytes"; - } - if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { - object.lastTransferDuration = $root.google.protobuf.Duration.toObject(message.lastTransferDuration, options); - if (options.oneofs) - object._lastTransferDuration = "lastTransferDuration"; - } - if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { - object.lagDuration = $root.google.protobuf.Duration.toObject(message.lagDuration, options); - if (options.oneofs) - object._lagDuration = "lagDuration"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { - object.lastTransferEndTime = $root.google.protobuf.Timestamp.toObject(message.lastTransferEndTime, options); - if (options.oneofs) - object._lastTransferEndTime = "lastTransferEndTime"; - } - if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { - object.lastTransferError = message.lastTransferError; - if (options.oneofs) - object._lastTransferError = "lastTransferError"; - } + if (options.defaults) + object.body = null; + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.protobuf.Struct.toObject(message.body, options); return object; }; /** - * Converts this TransferStats to JSON. + * Converts this ExecuteOntapPatchResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @instance * @returns {Object.} JSON object */ - TransferStats.prototype.toJSON = function toJSON() { + ExecuteOntapPatchResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransferStats + * Gets the default type url for ExecuteOntapPatchResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.TransferStats + * @memberof google.cloud.netapp.v1.ExecuteOntapPatchResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransferStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecuteOntapPatchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.TransferStats"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ExecuteOntapPatchResponse"; }; - return TransferStats; + return ExecuteOntapPatchResponse; })(); - v1.Replication = (function() { + v1.ListQuotaRulesRequest = (function() { /** - * Properties of a Replication. + * Properties of a ListQuotaRulesRequest. * @memberof google.cloud.netapp.v1 - * @interface IReplication - * @property {string|null} [name] Replication name - * @property {google.cloud.netapp.v1.Replication.State|null} [state] Replication state - * @property {string|null} [stateDetails] Replication stateDetails - * @property {google.cloud.netapp.v1.Replication.ReplicationRole|null} [role] Replication role - * @property {google.cloud.netapp.v1.Replication.ReplicationSchedule|null} [replicationSchedule] Replication replicationSchedule - * @property {google.cloud.netapp.v1.Replication.MirrorState|null} [mirrorState] Replication mirrorState - * @property {boolean|null} [healthy] Replication healthy - * @property {google.protobuf.ITimestamp|null} [createTime] Replication createTime - * @property {string|null} [destinationVolume] Replication destinationVolume - * @property {google.cloud.netapp.v1.ITransferStats|null} [transferStats] Replication transferStats - * @property {Object.|null} [labels] Replication labels - * @property {string|null} [description] Replication description - * @property {google.cloud.netapp.v1.IDestinationVolumeParameters|null} [destinationVolumeParameters] Replication destinationVolumeParameters - * @property {string|null} [sourceVolume] Replication sourceVolume - * @property {google.cloud.netapp.v1.IHybridPeeringDetails|null} [hybridPeeringDetails] Replication hybridPeeringDetails - * @property {string|null} [clusterLocation] Replication clusterLocation - * @property {google.cloud.netapp.v1.Replication.HybridReplicationType|null} [hybridReplicationType] Replication hybridReplicationType - * @property {google.cloud.netapp.v1.IUserCommands|null} [hybridReplicationUserCommands] Replication hybridReplicationUserCommands + * @interface IListQuotaRulesRequest + * @property {string|null} [parent] ListQuotaRulesRequest parent + * @property {number|null} [pageSize] ListQuotaRulesRequest pageSize + * @property {string|null} [pageToken] ListQuotaRulesRequest pageToken + * @property {string|null} [filter] ListQuotaRulesRequest filter + * @property {string|null} [orderBy] ListQuotaRulesRequest orderBy */ /** - * Constructs a new Replication. + * Constructs a new ListQuotaRulesRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Replication. - * @implements IReplication + * @classdesc Represents a ListQuotaRulesRequest. + * @implements IListQuotaRulesRequest * @constructor - * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set */ - function Replication(properties) { - this.labels = {}; + function ListQuotaRulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19825,350 +19153,409 @@ } /** - * Replication name. - * @member {string} name - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance */ - Replication.prototype.name = ""; + ListQuotaRulesRequest.prototype.parent = ""; /** - * Replication state. - * @member {google.cloud.netapp.v1.Replication.State} state - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance */ - Replication.prototype.state = 0; + ListQuotaRulesRequest.prototype.pageSize = 0; /** - * Replication stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance */ - Replication.prototype.stateDetails = ""; + ListQuotaRulesRequest.prototype.pageToken = ""; /** - * Replication role. - * @member {google.cloud.netapp.v1.Replication.ReplicationRole} role - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance */ - Replication.prototype.role = 0; + ListQuotaRulesRequest.prototype.filter = ""; /** - * Replication replicationSchedule. - * @member {google.cloud.netapp.v1.Replication.ReplicationSchedule} replicationSchedule - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance */ - Replication.prototype.replicationSchedule = 0; + ListQuotaRulesRequest.prototype.orderBy = ""; /** - * Replication mirrorState. - * @member {google.cloud.netapp.v1.Replication.MirrorState} mirrorState - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Creates a new ListQuotaRulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest instance */ - Replication.prototype.mirrorState = 0; + ListQuotaRulesRequest.create = function create(properties) { + return new ListQuotaRulesRequest(properties); + }; /** - * Replication healthy. - * @member {boolean|null|undefined} healthy - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Encodes the specified ListQuotaRulesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Replication.prototype.healthy = null; + ListQuotaRulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Replication createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Encodes the specified ListQuotaRulesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.IListQuotaRulesRequest} message ListQuotaRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Replication.prototype.createTime = null; + ListQuotaRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Replication destinationVolume. - * @member {string} destinationVolume - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Replication.prototype.destinationVolume = ""; + ListQuotaRulesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Replication transferStats. - * @member {google.cloud.netapp.v1.ITransferStats|null|undefined} transferStats - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Decodes a ListQuotaRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Replication.prototype.transferStats = null; + ListQuotaRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Replication labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Verifies a ListQuotaRulesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Replication.prototype.labels = $util.emptyObject; + ListQuotaRulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Replication description. - * @member {string|null|undefined} description - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Creates a ListQuotaRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListQuotaRulesRequest} ListQuotaRulesRequest */ - Replication.prototype.description = null; + ListQuotaRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListQuotaRulesRequest(); + 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; + }; /** - * Replication destinationVolumeParameters. - * @member {google.cloud.netapp.v1.IDestinationVolumeParameters|null|undefined} destinationVolumeParameters - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Creates a plain object from a ListQuotaRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {google.cloud.netapp.v1.ListQuotaRulesRequest} message ListQuotaRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Replication.prototype.destinationVolumeParameters = null; + ListQuotaRulesRequest.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; + }; /** - * Replication sourceVolume. - * @member {string} sourceVolume - * @memberof google.cloud.netapp.v1.Replication + * Converts this ListQuotaRulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest * @instance + * @returns {Object.} JSON object */ - Replication.prototype.sourceVolume = ""; + ListQuotaRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Replication hybridPeeringDetails. - * @member {google.cloud.netapp.v1.IHybridPeeringDetails|null|undefined} hybridPeeringDetails - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Gets the default type url for ListQuotaRulesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListQuotaRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Replication.prototype.hybridPeeringDetails = null; + ListQuotaRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesRequest"; + }; + + return ListQuotaRulesRequest; + })(); + + v1.ListQuotaRulesResponse = (function() { /** - * Replication clusterLocation. - * @member {string} clusterLocation - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Properties of a ListQuotaRulesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListQuotaRulesResponse + * @property {Array.|null} [quotaRules] ListQuotaRulesResponse quotaRules + * @property {string|null} [nextPageToken] ListQuotaRulesResponse nextPageToken + * @property {Array.|null} [unreachable] ListQuotaRulesResponse unreachable */ - Replication.prototype.clusterLocation = ""; /** - * Replication hybridReplicationType. - * @member {google.cloud.netapp.v1.Replication.HybridReplicationType} hybridReplicationType - * @memberof google.cloud.netapp.v1.Replication - * @instance + * Constructs a new ListQuotaRulesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListQuotaRulesResponse. + * @implements IListQuotaRulesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set */ - Replication.prototype.hybridReplicationType = 0; + function ListQuotaRulesResponse(properties) { + this.quotaRules = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Replication hybridReplicationUserCommands. - * @member {google.cloud.netapp.v1.IUserCommands|null|undefined} hybridReplicationUserCommands - * @memberof google.cloud.netapp.v1.Replication + * ListQuotaRulesResponse quotaRules. + * @member {Array.} quotaRules + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @instance */ - Replication.prototype.hybridReplicationUserCommands = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListQuotaRulesResponse.prototype.quotaRules = $util.emptyArray; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Replication.prototype, "_healthy", { - get: $util.oneOfGetter($oneOfFields = ["healthy"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListQuotaRulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + */ + ListQuotaRulesResponse.prototype.nextPageToken = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Replication.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ListQuotaRulesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse + * @instance + */ + ListQuotaRulesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new Replication instance using the specified properties. + * Creates a new ListQuotaRulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static - * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Replication} Replication instance + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse instance */ - Replication.create = function create(properties) { - return new Replication(properties); + ListQuotaRulesResponse.create = function create(properties) { + return new ListQuotaRulesResponse(properties); }; /** - * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * Encodes the specified ListQuotaRulesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static - * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Replication.encode = function encode(message, writer) { + ListQuotaRulesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.role); - if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.replicationSchedule); - if (message.mirrorState != null && Object.hasOwnProperty.call(message, "mirrorState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mirrorState); - if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.healthy); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.destinationVolume != null && Object.hasOwnProperty.call(message, "destinationVolume")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationVolume); - if (message.transferStats != null && Object.hasOwnProperty.call(message, "transferStats")) - $root.google.cloud.netapp.v1.TransferStats.encode(message.transferStats, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); - if (message.destinationVolumeParameters != null && Object.hasOwnProperty.call(message, "destinationVolumeParameters")) - $root.google.cloud.netapp.v1.DestinationVolumeParameters.encode(message.destinationVolumeParameters, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.sourceVolume); - if (message.hybridPeeringDetails != null && Object.hasOwnProperty.call(message, "hybridPeeringDetails")) - $root.google.cloud.netapp.v1.HybridPeeringDetails.encode(message.hybridPeeringDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.clusterLocation); - if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.hybridReplicationType); - if (message.hybridReplicationUserCommands != null && Object.hasOwnProperty.call(message, "hybridReplicationUserCommands")) - $root.google.cloud.netapp.v1.UserCommands.encode(message.hybridReplicationUserCommands, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.quotaRules != null && message.quotaRules.length) + for (var i = 0; i < message.quotaRules.length; ++i) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. + * Encodes the specified ListQuotaRulesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListQuotaRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static - * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode + * @param {google.cloud.netapp.v1.IListQuotaRulesResponse} message ListQuotaRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Replication.encodeDelimited = function encodeDelimited(message, writer) { + ListQuotaRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Replication message from the specified reader or buffer. + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Replication} Replication + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Replication.decode = function decode(reader, length, error) { + ListQuotaRulesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Replication(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.quotaRules && message.quotaRules.length)) + message.quotaRules = []; + message.quotaRules.push($root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32())); break; } case 2: { - message.state = reader.int32(); + message.nextPageToken = reader.string(); break; } case 3: { - message.stateDetails = reader.string(); - break; - } - case 4: { - message.role = reader.int32(); - break; - } - case 5: { - message.replicationSchedule = reader.int32(); - break; - } - case 6: { - message.mirrorState = reader.int32(); - break; - } - case 8: { - message.healthy = reader.bool(); - break; - } - case 9: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.destinationVolume = reader.string(); - break; - } - case 11: { - message.transferStats = $root.google.cloud.netapp.v1.TransferStats.decode(reader, reader.uint32()); - break; - } - case 12: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 13: { - message.description = reader.string(); - break; - } - case 14: { - message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.decode(reader, reader.uint32()); - break; - } - case 15: { - message.sourceVolume = reader.string(); - break; - } - case 16: { - message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.decode(reader, reader.uint32()); - break; - } - case 18: { - message.clusterLocation = reader.string(); - break; - } - case 19: { - message.hybridReplicationType = reader.int32(); - break; - } - case 20: { - message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.decode(reader, reader.uint32()); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -20180,626 +19567,169 @@ }; /** - * Decodes a Replication message from the specified reader or buffer, length delimited. + * Decodes a ListQuotaRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Replication} Replication + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Replication.decodeDelimited = function decodeDelimited(reader) { + ListQuotaRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Replication message. + * Verifies a ListQuotaRulesResponse message. * @function verify - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Replication.verify = function verify(message) { + ListQuotaRulesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 6: - case 8: - case 9: - case 10: - case 11: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.role != null && message.hasOwnProperty("role")) - switch (message.role) { - default: - return "role: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - switch (message.replicationSchedule) { - default: - return "replicationSchedule: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) - switch (message.mirrorState) { - default: - return "mirrorState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; + if (message.quotaRules != null && message.hasOwnProperty("quotaRules")) { + if (!Array.isArray(message.quotaRules)) + return "quotaRules: array expected"; + for (var i = 0; i < message.quotaRules.length; ++i) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRules[i]); + if (error) + return "quotaRules." + error; } - if (message.healthy != null && message.hasOwnProperty("healthy")) { - properties._healthy = 1; - if (typeof message.healthy !== "boolean") - return "healthy: boolean expected"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) - if (!$util.isString(message.destinationVolume)) - return "destinationVolume: string expected"; - if (message.transferStats != null && message.hasOwnProperty("transferStats")) { - var error = $root.google.cloud.netapp.v1.TransferStats.verify(message.transferStats); - if (error) - return "transferStats." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) { - var error = $root.google.cloud.netapp.v1.DestinationVolumeParameters.verify(message.destinationVolumeParameters); - if (error) - return "destinationVolumeParameters." + error; - } - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - if (!$util.isString(message.sourceVolume)) - return "sourceVolume: string expected"; - if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) { - var error = $root.google.cloud.netapp.v1.HybridPeeringDetails.verify(message.hybridPeeringDetails); - if (error) - return "hybridPeeringDetails." + error; - } - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - if (!$util.isString(message.clusterLocation)) - return "clusterLocation: string expected"; - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - switch (message.hybridReplicationType) { - default: - return "hybridReplicationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) { - var error = $root.google.cloud.netapp.v1.UserCommands.verify(message.hybridReplicationUserCommands); - if (error) - return "hybridReplicationUserCommands." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } return null; }; /** - * Creates a Replication message from a plain object. Also converts values to their respective internal types. + * Creates a ListQuotaRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.Replication} Replication + * @returns {google.cloud.netapp.v1.ListQuotaRulesResponse} ListQuotaRulesResponse */ - Replication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.Replication) + ListQuotaRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListQuotaRulesResponse) return object; - var message = new $root.google.cloud.netapp.v1.Replication(); - 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 "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 5: - message.state = 5; - break; - case "ERROR": - case 6: - message.state = 6; - break; - case "PENDING_CLUSTER_PEERING": - case 8: - message.state = 8; - break; - case "PENDING_SVM_PEERING": - case 9: - message.state = 9; - break; - case "PENDING_REMOTE_RESYNC": - case 10: - message.state = 10; - break; - case "EXTERNALLY_MANAGED_REPLICATION": - case 11: - message.state = 11; - break; - } - if (object.stateDetails != null) - message.stateDetails = String(object.stateDetails); - switch (object.role) { - default: - if (typeof object.role === "number") { - message.role = object.role; - break; - } - break; - case "REPLICATION_ROLE_UNSPECIFIED": - case 0: - message.role = 0; - break; - case "SOURCE": - case 1: - message.role = 1; - break; - case "DESTINATION": - case 2: - message.role = 2; - break; - } - switch (object.replicationSchedule) { - default: - if (typeof object.replicationSchedule === "number") { - message.replicationSchedule = object.replicationSchedule; - break; - } - break; - case "REPLICATION_SCHEDULE_UNSPECIFIED": - case 0: - message.replicationSchedule = 0; - break; - case "EVERY_10_MINUTES": - case 1: - message.replicationSchedule = 1; - break; - case "HOURLY": - case 2: - message.replicationSchedule = 2; - break; - case "DAILY": - case 3: - message.replicationSchedule = 3; - break; - } - switch (object.mirrorState) { - default: - if (typeof object.mirrorState === "number") { - message.mirrorState = object.mirrorState; - break; - } - break; - case "MIRROR_STATE_UNSPECIFIED": - case 0: - message.mirrorState = 0; - break; - case "PREPARING": - case 1: - message.mirrorState = 1; - break; - case "MIRRORED": - case 2: - message.mirrorState = 2; - break; - case "STOPPED": - case 3: - message.mirrorState = 3; - break; - case "TRANSFERRING": - case 4: - message.mirrorState = 4; - break; - case "BASELINE_TRANSFERRING": - case 5: - message.mirrorState = 5; - break; - case "ABORTED": - case 6: - message.mirrorState = 6; - break; - case "EXTERNALLY_MANAGED": - case 7: - message.mirrorState = 7; - break; - case "PENDING_PEERING": - case 8: - message.mirrorState = 8; - break; - } - if (object.healthy != null) - message.healthy = Boolean(object.healthy); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.destinationVolume != null) - message.destinationVolume = String(object.destinationVolume); - if (object.transferStats != null) { - if (typeof object.transferStats !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.transferStats: object expected"); - message.transferStats = $root.google.cloud.netapp.v1.TransferStats.fromObject(object.transferStats); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - if (object.destinationVolumeParameters != null) { - if (typeof object.destinationVolumeParameters !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.destinationVolumeParameters: object expected"); - message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.fromObject(object.destinationVolumeParameters); - } - if (object.sourceVolume != null) - message.sourceVolume = String(object.sourceVolume); - if (object.hybridPeeringDetails != null) { - if (typeof object.hybridPeeringDetails !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.hybridPeeringDetails: object expected"); - message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.fromObject(object.hybridPeeringDetails); - } - if (object.clusterLocation != null) - message.clusterLocation = String(object.clusterLocation); - switch (object.hybridReplicationType) { - default: - if (typeof object.hybridReplicationType === "number") { - message.hybridReplicationType = object.hybridReplicationType; - break; + var message = new $root.google.cloud.netapp.v1.ListQuotaRulesResponse(); + if (object.quotaRules) { + if (!Array.isArray(object.quotaRules)) + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: array expected"); + message.quotaRules = []; + for (var i = 0; i < object.quotaRules.length; ++i) { + if (typeof object.quotaRules[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.quotaRules: object expected"); + message.quotaRules[i] = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRules[i]); } - break; - case "HYBRID_REPLICATION_TYPE_UNSPECIFIED": - case 0: - message.hybridReplicationType = 0; - break; - case "MIGRATION": - case 1: - message.hybridReplicationType = 1; - break; - case "CONTINUOUS_REPLICATION": - case 2: - message.hybridReplicationType = 2; - break; - case "ONPREM_REPLICATION": - case 3: - message.hybridReplicationType = 3; - break; - case "REVERSE_ONPREM_REPLICATION": - case 4: - message.hybridReplicationType = 4; - break; } - if (object.hybridReplicationUserCommands != null) { - if (typeof object.hybridReplicationUserCommands !== "object") - throw TypeError(".google.cloud.netapp.v1.Replication.hybridReplicationUserCommands: object expected"); - message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.fromObject(object.hybridReplicationUserCommands); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListQuotaRulesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } return message; }; /** - * Creates a plain object from a Replication message. Also converts values to other types if specified. + * Creates a plain object from a ListQuotaRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static - * @param {google.cloud.netapp.v1.Replication} message Replication + * @param {google.cloud.netapp.v1.ListQuotaRulesResponse} message ListQuotaRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Replication.toObject = function toObject(message, options) { + ListQuotaRulesResponse.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.stateDetails = ""; - object.role = options.enums === String ? "REPLICATION_ROLE_UNSPECIFIED" : 0; - object.replicationSchedule = options.enums === String ? "REPLICATION_SCHEDULE_UNSPECIFIED" : 0; - object.mirrorState = options.enums === String ? "MIRROR_STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.destinationVolume = ""; - object.transferStats = null; - object.destinationVolumeParameters = null; - object.sourceVolume = ""; - object.hybridPeeringDetails = null; - object.clusterLocation = ""; - object.hybridReplicationType = options.enums === String ? "HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; - object.hybridReplicationUserCommands = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.netapp.v1.Replication.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Replication.State[message.state] : message.state; - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - object.stateDetails = message.stateDetails; - if (message.role != null && message.hasOwnProperty("role")) - object.role = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] === undefined ? message.role : $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] : message.role; - if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) - object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; - if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) - object.mirrorState = options.enums === String ? $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] === undefined ? message.mirrorState : $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] : message.mirrorState; - if (message.healthy != null && message.hasOwnProperty("healthy")) { - object.healthy = message.healthy; - if (options.oneofs) - object._healthy = "healthy"; + if (options.arrays || options.defaults) { + object.quotaRules = []; + object.unreachable = []; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) - object.destinationVolume = message.destinationVolume; - if (message.transferStats != null && message.hasOwnProperty("transferStats")) - object.transferStats = $root.google.cloud.netapp.v1.TransferStats.toObject(message.transferStats, options); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (options.defaults) + object.nextPageToken = ""; + if (message.quotaRules && message.quotaRules.length) { + object.quotaRules = []; + for (var j = 0; j < message.quotaRules.length; ++j) + object.quotaRules[j] = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRules[j], options); } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) - object.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.toObject(message.destinationVolumeParameters, options); - if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) - object.sourceVolume = message.sourceVolume; - if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) - object.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.toObject(message.hybridPeeringDetails, options); - if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) - object.clusterLocation = message.clusterLocation; - if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) - object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; - if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) - object.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.toObject(message.hybridReplicationUserCommands, options); return object; }; /** - * Converts this Replication to JSON. + * Converts this ListQuotaRulesResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @instance * @returns {Object.} JSON object */ - Replication.prototype.toJSON = function toJSON() { + ListQuotaRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Replication + * Gets the default type url for ListQuotaRulesResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.Replication + * @memberof google.cloud.netapp.v1.ListQuotaRulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Replication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListQuotaRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.Replication"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ListQuotaRulesResponse"; }; - /** - * State enum. - * @name google.cloud.netapp.v1.Replication.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=5 DELETING value - * @property {number} ERROR=6 ERROR value - * @property {number} PENDING_CLUSTER_PEERING=8 PENDING_CLUSTER_PEERING value - * @property {number} PENDING_SVM_PEERING=9 PENDING_SVM_PEERING value - * @property {number} PENDING_REMOTE_RESYNC=10 PENDING_REMOTE_RESYNC value - * @property {number} EXTERNALLY_MANAGED_REPLICATION=11 EXTERNALLY_MANAGED_REPLICATION value - */ - Replication.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[5] = "DELETING"] = 5; - values[valuesById[6] = "ERROR"] = 6; - values[valuesById[8] = "PENDING_CLUSTER_PEERING"] = 8; - values[valuesById[9] = "PENDING_SVM_PEERING"] = 9; - values[valuesById[10] = "PENDING_REMOTE_RESYNC"] = 10; - values[valuesById[11] = "EXTERNALLY_MANAGED_REPLICATION"] = 11; - return values; - })(); - - /** - * ReplicationRole enum. - * @name google.cloud.netapp.v1.Replication.ReplicationRole - * @enum {number} - * @property {number} REPLICATION_ROLE_UNSPECIFIED=0 REPLICATION_ROLE_UNSPECIFIED value - * @property {number} SOURCE=1 SOURCE value - * @property {number} DESTINATION=2 DESTINATION value - */ - Replication.ReplicationRole = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPLICATION_ROLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SOURCE"] = 1; - values[valuesById[2] = "DESTINATION"] = 2; - return values; - })(); - - /** - * ReplicationSchedule enum. - * @name google.cloud.netapp.v1.Replication.ReplicationSchedule - * @enum {number} - * @property {number} REPLICATION_SCHEDULE_UNSPECIFIED=0 REPLICATION_SCHEDULE_UNSPECIFIED value - * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value - * @property {number} HOURLY=2 HOURLY value - * @property {number} DAILY=3 DAILY value - */ - Replication.ReplicationSchedule = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EVERY_10_MINUTES"] = 1; - values[valuesById[2] = "HOURLY"] = 2; - values[valuesById[3] = "DAILY"] = 3; - return values; - })(); - - /** - * MirrorState enum. - * @name google.cloud.netapp.v1.Replication.MirrorState - * @enum {number} - * @property {number} MIRROR_STATE_UNSPECIFIED=0 MIRROR_STATE_UNSPECIFIED value - * @property {number} PREPARING=1 PREPARING value - * @property {number} MIRRORED=2 MIRRORED value - * @property {number} STOPPED=3 STOPPED value - * @property {number} TRANSFERRING=4 TRANSFERRING value - * @property {number} BASELINE_TRANSFERRING=5 BASELINE_TRANSFERRING value - * @property {number} ABORTED=6 ABORTED value - * @property {number} EXTERNALLY_MANAGED=7 EXTERNALLY_MANAGED value - * @property {number} PENDING_PEERING=8 PENDING_PEERING value - */ - Replication.MirrorState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MIRROR_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREPARING"] = 1; - values[valuesById[2] = "MIRRORED"] = 2; - values[valuesById[3] = "STOPPED"] = 3; - values[valuesById[4] = "TRANSFERRING"] = 4; - values[valuesById[5] = "BASELINE_TRANSFERRING"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - values[valuesById[7] = "EXTERNALLY_MANAGED"] = 7; - values[valuesById[8] = "PENDING_PEERING"] = 8; - return values; - })(); - - /** - * HybridReplicationType enum. - * @name google.cloud.netapp.v1.Replication.HybridReplicationType - * @enum {number} - * @property {number} HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 HYBRID_REPLICATION_TYPE_UNSPECIFIED value - * @property {number} MIGRATION=1 MIGRATION value - * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value - * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value - * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value - */ - Replication.HybridReplicationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MIGRATION"] = 1; - values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; - values[valuesById[3] = "ONPREM_REPLICATION"] = 3; - values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; - return values; - })(); - - return Replication; + return ListQuotaRulesResponse; })(); - v1.HybridPeeringDetails = (function() { + v1.GetQuotaRuleRequest = (function() { /** - * Properties of a HybridPeeringDetails. + * Properties of a GetQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @interface IHybridPeeringDetails - * @property {string|null} [subnetIp] HybridPeeringDetails subnetIp - * @property {string|null} [command] HybridPeeringDetails command - * @property {google.protobuf.ITimestamp|null} [commandExpiryTime] HybridPeeringDetails commandExpiryTime - * @property {string|null} [passphrase] HybridPeeringDetails passphrase - * @property {string|null} [peerVolumeName] HybridPeeringDetails peerVolumeName - * @property {string|null} [peerClusterName] HybridPeeringDetails peerClusterName - * @property {string|null} [peerSvmName] HybridPeeringDetails peerSvmName + * @interface IGetQuotaRuleRequest + * @property {string|null} [name] GetQuotaRuleRequest name */ /** - * Constructs a new HybridPeeringDetails. + * Constructs a new GetQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a HybridPeeringDetails. - * @implements IHybridPeeringDetails + * @classdesc Represents a GetQuotaRuleRequest. + * @implements IGetQuotaRuleRequest * @constructor - * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set */ - function HybridPeeringDetails(properties) { + function GetQuotaRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20807,161 +19737,77 @@ } /** - * HybridPeeringDetails subnetIp. - * @member {string} subnetIp - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.subnetIp = ""; - - /** - * HybridPeeringDetails command. - * @member {string} command - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.command = ""; - - /** - * HybridPeeringDetails commandExpiryTime. - * @member {google.protobuf.ITimestamp|null|undefined} commandExpiryTime - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.commandExpiryTime = null; - - /** - * HybridPeeringDetails passphrase. - * @member {string} passphrase - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.passphrase = ""; - - /** - * HybridPeeringDetails peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.peerVolumeName = ""; - - /** - * HybridPeeringDetails peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails - * @instance - */ - HybridPeeringDetails.prototype.peerClusterName = ""; - - /** - * HybridPeeringDetails peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * GetQuotaRuleRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @instance */ - HybridPeeringDetails.prototype.peerSvmName = ""; + GetQuotaRuleRequest.prototype.name = ""; /** - * Creates a new HybridPeeringDetails instance using the specified properties. + * Creates a new GetQuotaRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails instance + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest instance */ - HybridPeeringDetails.create = function create(properties) { - return new HybridPeeringDetails(properties); + GetQuotaRuleRequest.create = function create(properties) { + return new GetQuotaRuleRequest(properties); }; /** - * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * Encodes the specified GetQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HybridPeeringDetails.encode = function encode(message, writer) { + GetQuotaRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.subnetIp != null && Object.hasOwnProperty.call(message, "subnetIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetIp); - if (message.command != null && Object.hasOwnProperty.call(message, "command")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); - if (message.commandExpiryTime != null && Object.hasOwnProperty.call(message, "commandExpiryTime")) - $root.google.protobuf.Timestamp.encode(message.commandExpiryTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.passphrase); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.peerSvmName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. + * Encodes the specified GetQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetQuotaRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode + * @param {google.cloud.netapp.v1.IGetQuotaRuleRequest} message GetQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HybridPeeringDetails.encodeDelimited = function encodeDelimited(message, writer) { + GetQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer. + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HybridPeeringDetails.decode = function decode(reader, length, error) { + GetQuotaRuleRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.subnetIp = reader.string(); - break; - } - case 2: { - message.command = reader.string(); - break; - } - case 3: { - message.commandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.passphrase = reader.string(); - break; - } - case 5: { - message.peerVolumeName = reader.string(); - break; - } - case 6: { - message.peerClusterName = reader.string(); - break; - } - case 7: { - message.peerSvmName = reader.string(); + message.name = reader.string(); break; } default: @@ -20973,180 +19819,124 @@ }; /** - * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. + * Decodes a GetQuotaRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HybridPeeringDetails.decodeDelimited = function decodeDelimited(reader) { + GetQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HybridPeeringDetails message. + * Verifies a GetQuotaRuleRequest message. * @function verify - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HybridPeeringDetails.verify = function verify(message) { + GetQuotaRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) - if (!$util.isString(message.subnetIp)) - return "subnetIp: string expected"; - if (message.command != null && message.hasOwnProperty("command")) - if (!$util.isString(message.command)) - return "command: string expected"; - if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.commandExpiryTime); - if (error) - return "commandExpiryTime." + error; - } - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - if (!$util.isString(message.passphrase)) - return "passphrase: string expected"; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. + * Creates a GetQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails + * @returns {google.cloud.netapp.v1.GetQuotaRuleRequest} GetQuotaRuleRequest */ - HybridPeeringDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.HybridPeeringDetails) + GetQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetQuotaRuleRequest) return object; - var message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); - if (object.subnetIp != null) - message.subnetIp = String(object.subnetIp); - if (object.command != null) - message.command = String(object.command); - if (object.commandExpiryTime != null) { - if (typeof object.commandExpiryTime !== "object") - throw TypeError(".google.cloud.netapp.v1.HybridPeeringDetails.commandExpiryTime: object expected"); - message.commandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.commandExpiryTime); - } - if (object.passphrase != null) - message.passphrase = String(object.passphrase); - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); + var message = new $root.google.cloud.netapp.v1.GetQuotaRuleRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. + * Creates a plain object from a GetQuotaRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.HybridPeeringDetails} message HybridPeeringDetails + * @param {google.cloud.netapp.v1.GetQuotaRuleRequest} message GetQuotaRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HybridPeeringDetails.toObject = function toObject(message, options) { + GetQuotaRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.subnetIp = ""; - object.command = ""; - object.commandExpiryTime = null; - object.passphrase = ""; - object.peerVolumeName = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - } - if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) - object.subnetIp = message.subnetIp; - if (message.command != null && message.hasOwnProperty("command")) - object.command = message.command; - if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) - object.commandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.commandExpiryTime, options); - if (message.passphrase != null && message.hasOwnProperty("passphrase")) - object.passphrase = message.passphrase; - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this HybridPeeringDetails to JSON. + * Converts this GetQuotaRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @instance * @returns {Object.} JSON object */ - HybridPeeringDetails.prototype.toJSON = function toJSON() { + GetQuotaRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HybridPeeringDetails + * Gets the default type url for GetQuotaRuleRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @memberof google.cloud.netapp.v1.GetQuotaRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HybridPeeringDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.HybridPeeringDetails"; + return typeUrlPrefix + "/google.cloud.netapp.v1.GetQuotaRuleRequest"; }; - return HybridPeeringDetails; + return GetQuotaRuleRequest; })(); - v1.ListReplicationsRequest = (function() { + v1.CreateQuotaRuleRequest = (function() { /** - * Properties of a ListReplicationsRequest. + * Properties of a CreateQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @interface IListReplicationsRequest - * @property {string|null} [parent] ListReplicationsRequest parent - * @property {number|null} [pageSize] ListReplicationsRequest pageSize - * @property {string|null} [pageToken] ListReplicationsRequest pageToken - * @property {string|null} [orderBy] ListReplicationsRequest orderBy - * @property {string|null} [filter] ListReplicationsRequest filter + * @interface ICreateQuotaRuleRequest + * @property {string|null} [parent] CreateQuotaRuleRequest parent + * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] CreateQuotaRuleRequest quotaRule + * @property {string|null} [quotaRuleId] CreateQuotaRuleRequest quotaRuleId */ /** - * Constructs a new ListReplicationsRequest. + * Constructs a new CreateQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListReplicationsRequest. - * @implements IListReplicationsRequest + * @classdesc Represents a CreateQuotaRuleRequest. + * @implements ICreateQuotaRuleRequest * @constructor - * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set */ - function ListReplicationsRequest(properties) { + function CreateQuotaRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21154,110 +19944,90 @@ } /** - * ListReplicationsRequest parent. + * CreateQuotaRuleRequest parent. * @member {string} parent - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.parent = ""; - - /** - * ListReplicationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListReplicationsRequest - * @instance - */ - ListReplicationsRequest.prototype.pageSize = 0; - - /** - * ListReplicationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @instance */ - ListReplicationsRequest.prototype.pageToken = ""; + CreateQuotaRuleRequest.prototype.parent = ""; /** - * ListReplicationsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * CreateQuotaRuleRequest quotaRule. + * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @instance */ - ListReplicationsRequest.prototype.orderBy = ""; + CreateQuotaRuleRequest.prototype.quotaRule = null; /** - * ListReplicationsRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * CreateQuotaRuleRequest quotaRuleId. + * @member {string} quotaRuleId + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @instance */ - ListReplicationsRequest.prototype.filter = ""; + CreateQuotaRuleRequest.prototype.quotaRuleId = ""; /** - * Creates a new ListReplicationsRequest instance using the specified properties. + * Creates a new CreateQuotaRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest instance + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest instance */ - ListReplicationsRequest.create = function create(properties) { - return new ListReplicationsRequest(properties); + CreateQuotaRuleRequest.create = function create(properties) { + return new CreateQuotaRuleRequest(properties); }; /** - * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * Encodes the specified CreateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReplicationsRequest.encode = function encode(message, writer) { + CreateQuotaRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.quotaRuleId != null && Object.hasOwnProperty.call(message, "quotaRuleId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.quotaRuleId); return writer; }; /** - * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. + * Encodes the specified CreateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateQuotaRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ICreateQuotaRuleRequest} message CreateQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer. + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReplicationsRequest.decode = function decode(reader, length, error) { + CreateQuotaRuleRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -21268,19 +20038,11 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); + message.quotaRuleId = reader.string(); break; } default: @@ -21292,159 +20054,145 @@ }; /** - * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateQuotaRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReplicationsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReplicationsRequest message. + * Verifies a CreateQuotaRuleRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReplicationsRequest.verify = function verify(message) { + CreateQuotaRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); + if (error) + return "quotaRule." + error; + } + if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) + if (!$util.isString(message.quotaRuleId)) + return "quotaRuleId: string expected"; return null; }; /** - * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest + * @returns {google.cloud.netapp.v1.CreateQuotaRuleRequest} CreateQuotaRuleRequest */ - ListReplicationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsRequest) + CreateQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateQuotaRuleRequest) return object; - var message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + var message = new $root.google.cloud.netapp.v1.CreateQuotaRuleRequest(); 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.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); + if (object.quotaRule != null) { + if (typeof object.quotaRule !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateQuotaRuleRequest.quotaRule: object expected"); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); + } + if (object.quotaRuleId != null) + message.quotaRuleId = String(object.quotaRuleId); return message; }; /** - * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateQuotaRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.ListReplicationsRequest} message ListReplicationsRequest + * @param {google.cloud.netapp.v1.CreateQuotaRuleRequest} message CreateQuotaRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReplicationsRequest.toObject = function toObject(message, options) { + CreateQuotaRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.filter = ""; + object.quotaRule = null; + object.quotaRuleId = ""; } 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.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) + object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); + if (message.quotaRuleId != null && message.hasOwnProperty("quotaRuleId")) + object.quotaRuleId = message.quotaRuleId; return object; }; /** - * Converts this ListReplicationsRequest to JSON. + * Converts this CreateQuotaRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @instance * @returns {Object.} JSON object */ - ListReplicationsRequest.prototype.toJSON = function toJSON() { + CreateQuotaRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReplicationsRequest + * Gets the default type url for CreateQuotaRuleRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @memberof google.cloud.netapp.v1.CreateQuotaRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateQuotaRuleRequest"; }; - return ListReplicationsRequest; + return CreateQuotaRuleRequest; })(); - v1.ListReplicationsResponse = (function() { + v1.UpdateQuotaRuleRequest = (function() { /** - * Properties of a ListReplicationsResponse. + * Properties of an UpdateQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @interface IListReplicationsResponse - * @property {Array.|null} [replications] ListReplicationsResponse replications - * @property {string|null} [nextPageToken] ListReplicationsResponse nextPageToken - * @property {Array.|null} [unreachable] ListReplicationsResponse unreachable + * @interface IUpdateQuotaRuleRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQuotaRuleRequest updateMask + * @property {google.cloud.netapp.v1.IQuotaRule|null} [quotaRule] UpdateQuotaRuleRequest quotaRule */ /** - * Constructs a new ListReplicationsResponse. + * Constructs a new UpdateQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListReplicationsResponse. - * @implements IListReplicationsResponse + * @classdesc Represents an UpdateQuotaRuleRequest. + * @implements IUpdateQuotaRuleRequest * @constructor - * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set */ - function ListReplicationsResponse(properties) { - this.replications = []; - this.unreachable = []; + function UpdateQuotaRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21452,111 +20200,91 @@ } /** - * ListReplicationsResponse replications. - * @member {Array.} replications - * @memberof google.cloud.netapp.v1.ListReplicationsResponse - * @instance - */ - ListReplicationsResponse.prototype.replications = $util.emptyArray; - - /** - * ListReplicationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * UpdateQuotaRuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @instance */ - ListReplicationsResponse.prototype.nextPageToken = ""; + UpdateQuotaRuleRequest.prototype.updateMask = null; /** - * ListReplicationsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * UpdateQuotaRuleRequest quotaRule. + * @member {google.cloud.netapp.v1.IQuotaRule|null|undefined} quotaRule + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @instance */ - ListReplicationsResponse.prototype.unreachable = $util.emptyArray; + UpdateQuotaRuleRequest.prototype.quotaRule = null; /** - * Creates a new ListReplicationsResponse instance using the specified properties. + * Creates a new UpdateQuotaRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse instance + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest instance */ - ListReplicationsResponse.create = function create(properties) { - return new ListReplicationsResponse(properties); + UpdateQuotaRuleRequest.create = function create(properties) { + return new UpdateQuotaRuleRequest(properties); }; /** - * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * Encodes the specified UpdateQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReplicationsResponse.encode = function encode(message, writer) { + UpdateQuotaRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.replications != null && message.replications.length) - for (var i = 0; i < message.replications.length; ++i) - $root.google.cloud.netapp.v1.Replication.encode(message.replications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.quotaRule != null && Object.hasOwnProperty.call(message, "quotaRule")) + $root.google.cloud.netapp.v1.QuotaRule.encode(message.quotaRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. + * Encodes the specified UpdateQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateQuotaRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IUpdateQuotaRuleRequest} message UpdateQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer. + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReplicationsResponse.decode = function decode(reader, length, error) { + UpdateQuotaRuleRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.replications && message.replications.length)) - message.replications = []; - message.replications.push($root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.decode(reader, reader.uint32()); break; } default: @@ -21568,169 +20296,141 @@ }; /** - * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateQuotaRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReplicationsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReplicationsResponse message. + * Verifies an UpdateQuotaRuleRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReplicationsResponse.verify = function verify(message) { + UpdateQuotaRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.replications != null && message.hasOwnProperty("replications")) { - if (!Array.isArray(message.replications)) - return "replications: array expected"; - for (var i = 0; i < message.replications.length; ++i) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replications[i]); - if (error) - return "replications." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) { + var error = $root.google.cloud.netapp.v1.QuotaRule.verify(message.quotaRule); + if (error) + return "quotaRule." + error; } return null; }; /** - * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse + * @returns {google.cloud.netapp.v1.UpdateQuotaRuleRequest} UpdateQuotaRuleRequest */ - ListReplicationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsResponse) + UpdateQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest) return object; - var message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); - if (object.replications) { - if (!Array.isArray(object.replications)) - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: array expected"); - message.replications = []; - for (var i = 0; i < object.replications.length; ++i) { - if (typeof object.replications[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: object expected"); - message.replications[i] = $root.google.cloud.netapp.v1.Replication.fromObject(object.replications[i]); - } + var message = new $root.google.cloud.netapp.v1.UpdateQuotaRuleRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.quotaRule != null) { + if (typeof object.quotaRule !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateQuotaRuleRequest.quotaRule: object expected"); + message.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.fromObject(object.quotaRule); } return message; }; /** - * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateQuotaRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.ListReplicationsResponse} message ListReplicationsResponse + * @param {google.cloud.netapp.v1.UpdateQuotaRuleRequest} message UpdateQuotaRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReplicationsResponse.toObject = function toObject(message, options) { + UpdateQuotaRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.replications = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.replications && message.replications.length) { - object.replications = []; - for (var j = 0; j < message.replications.length; ++j) - object.replications[j] = $root.google.cloud.netapp.v1.Replication.toObject(message.replications[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.updateMask = null; + object.quotaRule = null; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.quotaRule != null && message.hasOwnProperty("quotaRule")) + object.quotaRule = $root.google.cloud.netapp.v1.QuotaRule.toObject(message.quotaRule, options); return object; }; /** - * Converts this ListReplicationsResponse to JSON. + * Converts this UpdateQuotaRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @instance * @returns {Object.} JSON object */ - ListReplicationsResponse.prototype.toJSON = function toJSON() { + UpdateQuotaRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReplicationsResponse + * Gets the default type url for UpdateQuotaRuleRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @memberof google.cloud.netapp.v1.UpdateQuotaRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsResponse"; + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateQuotaRuleRequest"; }; - return ListReplicationsResponse; + return UpdateQuotaRuleRequest; })(); - v1.GetReplicationRequest = (function() { + v1.DeleteQuotaRuleRequest = (function() { /** - * Properties of a GetReplicationRequest. + * Properties of a DeleteQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @interface IGetReplicationRequest - * @property {string|null} [name] GetReplicationRequest name + * @interface IDeleteQuotaRuleRequest + * @property {string|null} [name] DeleteQuotaRuleRequest name */ /** - * Constructs a new GetReplicationRequest. + * Constructs a new DeleteQuotaRuleRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetReplicationRequest. - * @implements IGetReplicationRequest + * @classdesc Represents a DeleteQuotaRuleRequest. + * @implements IDeleteQuotaRuleRequest * @constructor - * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set */ - function GetReplicationRequest(properties) { + function DeleteQuotaRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21738,35 +20438,35 @@ } /** - * GetReplicationRequest name. + * DeleteQuotaRuleRequest name. * @member {string} name - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @instance */ - GetReplicationRequest.prototype.name = ""; + DeleteQuotaRuleRequest.prototype.name = ""; /** - * Creates a new GetReplicationRequest instance using the specified properties. + * Creates a new DeleteQuotaRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest instance + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest instance */ - GetReplicationRequest.create = function create(properties) { - return new GetReplicationRequest(properties); + DeleteQuotaRuleRequest.create = function create(properties) { + return new DeleteQuotaRuleRequest(properties); }; /** - * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * Encodes the specified DeleteQuotaRuleRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReplicationRequest.encode = function encode(message, writer) { + DeleteQuotaRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -21775,33 +20475,33 @@ }; /** - * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. + * Encodes the specified DeleteQuotaRuleRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteQuotaRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IDeleteQuotaRuleRequest} message DeleteQuotaRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteQuotaRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetReplicationRequest message from the specified reader or buffer. + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReplicationRequest.decode = function decode(reader, length, error) { + DeleteQuotaRuleRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -21820,30 +20520,30 @@ }; /** - * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteQuotaRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteQuotaRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetReplicationRequest message. + * Verifies a DeleteQuotaRuleRequest message. * @function verify - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetReplicationRequest.verify = function verify(message) { + DeleteQuotaRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -21853,32 +20553,32 @@ }; /** - * Creates a GetReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteQuotaRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest + * @returns {google.cloud.netapp.v1.DeleteQuotaRuleRequest} DeleteQuotaRuleRequest */ - GetReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetReplicationRequest) + DeleteQuotaRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest) return object; - var message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); + var message = new $root.google.cloud.netapp.v1.DeleteQuotaRuleRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteQuotaRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static - * @param {google.cloud.netapp.v1.GetReplicationRequest} message GetReplicationRequest + * @param {google.cloud.netapp.v1.DeleteQuotaRuleRequest} message DeleteQuotaRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetReplicationRequest.toObject = function toObject(message, options) { + DeleteQuotaRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -21890,56 +20590,61 @@ }; /** - * Converts this GetReplicationRequest to JSON. + * Converts this DeleteQuotaRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @instance * @returns {Object.} JSON object */ - GetReplicationRequest.prototype.toJSON = function toJSON() { + DeleteQuotaRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetReplicationRequest + * Gets the default type url for DeleteQuotaRuleRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetReplicationRequest + * @memberof google.cloud.netapp.v1.DeleteQuotaRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteQuotaRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteQuotaRuleRequest"; }; - return GetReplicationRequest; + return DeleteQuotaRuleRequest; })(); - v1.DestinationVolumeParameters = (function() { + v1.QuotaRule = (function() { /** - * Properties of a DestinationVolumeParameters. + * Properties of a QuotaRule. * @memberof google.cloud.netapp.v1 - * @interface IDestinationVolumeParameters - * @property {string|null} [storagePool] DestinationVolumeParameters storagePool - * @property {string|null} [volumeId] DestinationVolumeParameters volumeId - * @property {string|null} [shareName] DestinationVolumeParameters shareName - * @property {string|null} [description] DestinationVolumeParameters description - * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] DestinationVolumeParameters tieringPolicy + * @interface IQuotaRule + * @property {string|null} [name] QuotaRule name + * @property {string|null} [target] QuotaRule target + * @property {google.cloud.netapp.v1.QuotaRule.Type|null} [type] QuotaRule type + * @property {number|null} [diskLimitMib] QuotaRule diskLimitMib + * @property {google.cloud.netapp.v1.QuotaRule.State|null} [state] QuotaRule state + * @property {string|null} [stateDetails] QuotaRule stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] QuotaRule createTime + * @property {string|null} [description] QuotaRule description + * @property {Object.|null} [labels] QuotaRule labels */ /** - * Constructs a new DestinationVolumeParameters. + * Constructs a new QuotaRule. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DestinationVolumeParameters. - * @implements IDestinationVolumeParameters + * @classdesc Represents a QuotaRule. + * @implements IQuotaRule * @constructor - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set */ - function DestinationVolumeParameters(properties) { + function QuotaRule(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21947,148 +20652,209 @@ } /** - * DestinationVolumeParameters storagePool. - * @member {string} storagePool - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * QuotaRule name. + * @member {string} name + * @memberof google.cloud.netapp.v1.QuotaRule * @instance */ - DestinationVolumeParameters.prototype.storagePool = ""; + QuotaRule.prototype.name = ""; /** - * DestinationVolumeParameters volumeId. - * @member {string} volumeId - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * QuotaRule target. + * @member {string} target + * @memberof google.cloud.netapp.v1.QuotaRule * @instance */ - DestinationVolumeParameters.prototype.volumeId = ""; + QuotaRule.prototype.target = ""; /** - * DestinationVolumeParameters shareName. - * @member {string} shareName - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * QuotaRule type. + * @member {google.cloud.netapp.v1.QuotaRule.Type} type + * @memberof google.cloud.netapp.v1.QuotaRule * @instance */ - DestinationVolumeParameters.prototype.shareName = ""; + QuotaRule.prototype.type = 0; /** - * DestinationVolumeParameters description. - * @member {string|null|undefined} description - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * QuotaRule diskLimitMib. + * @member {number} diskLimitMib + * @memberof google.cloud.netapp.v1.QuotaRule * @instance */ - DestinationVolumeParameters.prototype.description = null; + QuotaRule.prototype.diskLimitMib = 0; /** - * DestinationVolumeParameters tieringPolicy. - * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * QuotaRule state. + * @member {google.cloud.netapp.v1.QuotaRule.State} state + * @memberof google.cloud.netapp.v1.QuotaRule * @instance */ - DestinationVolumeParameters.prototype.tieringPolicy = null; + QuotaRule.prototype.state = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * QuotaRule stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.stateDetails = ""; - // Virtual OneOf for proto3 optional field - Object.defineProperty(DestinationVolumeParameters.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * QuotaRule createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.createTime = null; - // Virtual OneOf for proto3 optional field - Object.defineProperty(DestinationVolumeParameters.prototype, "_tieringPolicy", { - get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * QuotaRule description. + * @member {string} description + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.description = ""; /** - * Creates a new DestinationVolumeParameters instance using the specified properties. + * QuotaRule labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.QuotaRule + * @instance + */ + QuotaRule.prototype.labels = $util.emptyObject; + + /** + * Creates a new QuotaRule instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters instance + * @param {google.cloud.netapp.v1.IQuotaRule=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule instance */ - DestinationVolumeParameters.create = function create(properties) { - return new DestinationVolumeParameters(properties); + QuotaRule.create = function create(properties) { + return new QuotaRule(properties); }; /** - * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * Encodes the specified QuotaRule message. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DestinationVolumeParameters.encode = function encode(message, writer) { + QuotaRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.storagePool); - if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); - if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shareName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.diskLimitMib != null && Object.hasOwnProperty.call(message, "diskLimitMib")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.diskLimitMib); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) - $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. + * Encodes the specified QuotaRule message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.QuotaRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static - * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode + * @param {google.cloud.netapp.v1.IQuotaRule} message QuotaRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DestinationVolumeParameters.encodeDelimited = function encodeDelimited(message, writer) { + QuotaRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer. + * Decodes a QuotaRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DestinationVolumeParameters.decode = function decode(reader, length, error) { + QuotaRule.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.QuotaRule(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.storagePool = reader.string(); + message.name = reader.string(); break; } case 2: { - message.volumeId = reader.string(); + message.target = reader.string(); break; } case 3: { - message.shareName = reader.string(); + message.type = reader.int32(); break; } case 4: { + message.diskLimitMib = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.stateDetails = reader.string(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { message.description = reader.string(); break; } - case 5: { - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -22100,172 +20866,329 @@ }; /** - * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. + * Decodes a QuotaRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DestinationVolumeParameters.decodeDelimited = function decodeDelimited(reader) { + QuotaRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DestinationVolumeParameters message. + * Verifies a QuotaRule message. * @function verify - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DestinationVolumeParameters.verify = function verify(message) { + QuotaRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - if (!$util.isString(message.storagePool)) - return "storagePool: string expected"; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - if (!$util.isString(message.volumeId)) - return "volumeId: string expected"; - if (message.shareName != null && message.hasOwnProperty("shareName")) - if (!$util.isString(message.shareName)) - return "shareName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: 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.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) + if (!$util.isInteger(message.diskLimitMib)) + return "diskLimitMib: integer expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; - } - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - properties._tieringPolicy = 1; - { - var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); - if (error) - return "tieringPolicy." + error; - } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. + * Creates a QuotaRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters + * @returns {google.cloud.netapp.v1.QuotaRule} QuotaRule */ - DestinationVolumeParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DestinationVolumeParameters) + QuotaRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.QuotaRule) return object; - var message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); - if (object.storagePool != null) - message.storagePool = String(object.storagePool); - if (object.volumeId != null) - message.volumeId = String(object.volumeId); - if (object.shareName != null) - message.shareName = String(object.shareName); + var message = new $root.google.cloud.netapp.v1.QuotaRule(); + if (object.name != null) + message.name = String(object.name); + if (object.target != null) + message.target = String(object.target); + 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 "INDIVIDUAL_USER_QUOTA": + case 1: + message.type = 1; + break; + case "INDIVIDUAL_GROUP_QUOTA": + case 2: + message.type = 2; + break; + case "DEFAULT_USER_QUOTA": + case 3: + message.type = 3; + break; + case "DEFAULT_GROUP_QUOTA": + case 4: + message.type = 4; + break; + } + if (object.diskLimitMib != null) + message.diskLimitMib = object.diskLimitMib | 0; + 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 "UPDATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "READY": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.QuotaRule.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } if (object.description != null) message.description = String(object.description); - if (object.tieringPolicy != null) { - if (typeof object.tieringPolicy !== "object") - throw TypeError(".google.cloud.netapp.v1.DestinationVolumeParameters.tieringPolicy: object expected"); - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.QuotaRule.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. + * Creates a plain object from a QuotaRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static - * @param {google.cloud.netapp.v1.DestinationVolumeParameters} message DestinationVolumeParameters + * @param {google.cloud.netapp.v1.QuotaRule} message QuotaRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DestinationVolumeParameters.toObject = function toObject(message, options) { + QuotaRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.storagePool = ""; - object.volumeId = ""; - object.shareName = ""; + object.name = ""; + object.target = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.diskLimitMib = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.createTime = null; + object.description = ""; } - if (message.storagePool != null && message.hasOwnProperty("storagePool")) - object.storagePool = message.storagePool; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - object.volumeId = message.volumeId; - if (message.shareName != null && message.hasOwnProperty("shareName")) - object.shareName = message.shareName; - if (message.description != null && message.hasOwnProperty("description")) { + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] === undefined ? message.type : $root.google.cloud.netapp.v1.QuotaRule.Type[message.type] : message.type; + if (message.diskLimitMib != null && message.hasOwnProperty("diskLimitMib")) + object.diskLimitMib = message.diskLimitMib; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.QuotaRule.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.QuotaRule.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { - object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); - if (options.oneofs) - object._tieringPolicy = "tieringPolicy"; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } return object; }; /** - * Converts this DestinationVolumeParameters to JSON. + * Converts this QuotaRule to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @instance * @returns {Object.} JSON object */ - DestinationVolumeParameters.prototype.toJSON = function toJSON() { + QuotaRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DestinationVolumeParameters + * Gets the default type url for QuotaRule * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @memberof google.cloud.netapp.v1.QuotaRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DestinationVolumeParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QuotaRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.DestinationVolumeParameters"; + return typeUrlPrefix + "/google.cloud.netapp.v1.QuotaRule"; }; - return DestinationVolumeParameters; + /** + * Type enum. + * @name google.cloud.netapp.v1.QuotaRule.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INDIVIDUAL_USER_QUOTA=1 INDIVIDUAL_USER_QUOTA value + * @property {number} INDIVIDUAL_GROUP_QUOTA=2 INDIVIDUAL_GROUP_QUOTA value + * @property {number} DEFAULT_USER_QUOTA=3 DEFAULT_USER_QUOTA value + * @property {number} DEFAULT_GROUP_QUOTA=4 DEFAULT_GROUP_QUOTA value + */ + QuotaRule.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INDIVIDUAL_USER_QUOTA"] = 1; + values[valuesById[2] = "INDIVIDUAL_GROUP_QUOTA"] = 2; + values[valuesById[3] = "DEFAULT_USER_QUOTA"] = 3; + values[valuesById[4] = "DEFAULT_GROUP_QUOTA"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.netapp.v1.QuotaRule.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} UPDATING=2 UPDATING value + * @property {number} DELETING=3 DELETING value + * @property {number} READY=4 READY value + * @property {number} ERROR=5 ERROR value + */ + QuotaRule.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "UPDATING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "READY"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return QuotaRule; })(); - v1.CreateReplicationRequest = (function() { + v1.TransferStats = (function() { /** - * Properties of a CreateReplicationRequest. + * Properties of a TransferStats. * @memberof google.cloud.netapp.v1 - * @interface ICreateReplicationRequest - * @property {string|null} [parent] CreateReplicationRequest parent - * @property {google.cloud.netapp.v1.IReplication|null} [replication] CreateReplicationRequest replication - * @property {string|null} [replicationId] CreateReplicationRequest replicationId + * @interface ITransferStats + * @property {number|Long|null} [transferBytes] TransferStats transferBytes + * @property {google.protobuf.IDuration|null} [totalTransferDuration] TransferStats totalTransferDuration + * @property {number|Long|null} [lastTransferBytes] TransferStats lastTransferBytes + * @property {google.protobuf.IDuration|null} [lastTransferDuration] TransferStats lastTransferDuration + * @property {google.protobuf.IDuration|null} [lagDuration] TransferStats lagDuration + * @property {google.protobuf.ITimestamp|null} [updateTime] TransferStats updateTime + * @property {google.protobuf.ITimestamp|null} [lastTransferEndTime] TransferStats lastTransferEndTime + * @property {string|null} [lastTransferError] TransferStats lastTransferError */ /** - * Constructs a new CreateReplicationRequest. + * Constructs a new TransferStats. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateReplicationRequest. - * @implements ICreateReplicationRequest + * @classdesc Represents a TransferStats. + * @implements ITransferStats * @constructor - * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set */ - function CreateReplicationRequest(properties) { + function TransferStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22273,105 +21196,226 @@ } /** - * CreateReplicationRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * TransferStats transferBytes. + * @member {number|Long|null|undefined} transferBytes + * @memberof google.cloud.netapp.v1.TransferStats * @instance */ - CreateReplicationRequest.prototype.parent = ""; + TransferStats.prototype.transferBytes = null; /** - * CreateReplicationRequest replication. - * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * TransferStats totalTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} totalTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats * @instance */ - CreateReplicationRequest.prototype.replication = null; + TransferStats.prototype.totalTransferDuration = null; /** - * CreateReplicationRequest replicationId. - * @member {string} replicationId - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * TransferStats lastTransferBytes. + * @member {number|Long|null|undefined} lastTransferBytes + * @memberof google.cloud.netapp.v1.TransferStats * @instance */ - CreateReplicationRequest.prototype.replicationId = ""; + TransferStats.prototype.lastTransferBytes = null; /** - * Creates a new CreateReplicationRequest instance using the specified properties. + * TransferStats lastTransferDuration. + * @member {google.protobuf.IDuration|null|undefined} lastTransferDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferDuration = null; + + /** + * TransferStats lagDuration. + * @member {google.protobuf.IDuration|null|undefined} lagDuration + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lagDuration = null; + + /** + * TransferStats updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.updateTime = null; + + /** + * TransferStats lastTransferEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastTransferEndTime + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferEndTime = null; + + /** + * TransferStats lastTransferError. + * @member {string|null|undefined} lastTransferError + * @memberof google.cloud.netapp.v1.TransferStats + * @instance + */ + TransferStats.prototype.lastTransferError = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_transferBytes", { + get: $util.oneOfGetter($oneOfFields = ["transferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_totalTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["totalTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferBytes", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferDuration", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lagDuration", { + get: $util.oneOfGetter($oneOfFields = ["lagDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferEndTime", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransferStats.prototype, "_lastTransferError", { + get: $util.oneOfGetter($oneOfFields = ["lastTransferError"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransferStats instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest instance + * @param {google.cloud.netapp.v1.ITransferStats=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats instance */ - CreateReplicationRequest.create = function create(properties) { - return new CreateReplicationRequest(properties); + TransferStats.create = function create(properties) { + return new TransferStats(properties); }; /** - * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * Encodes the specified TransferStats message. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReplicationRequest.encode = function encode(message, writer) { + TransferStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) - $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.replicationId != null && Object.hasOwnProperty.call(message, "replicationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationId); + if (message.transferBytes != null && Object.hasOwnProperty.call(message, "transferBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transferBytes); + if (message.totalTransferDuration != null && Object.hasOwnProperty.call(message, "totalTransferDuration")) + $root.google.protobuf.Duration.encode(message.totalTransferDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastTransferBytes != null && Object.hasOwnProperty.call(message, "lastTransferBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.lastTransferBytes); + if (message.lastTransferDuration != null && Object.hasOwnProperty.call(message, "lastTransferDuration")) + $root.google.protobuf.Duration.encode(message.lastTransferDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lagDuration != null && Object.hasOwnProperty.call(message, "lagDuration")) + $root.google.protobuf.Duration.encode(message.lagDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastTransferEndTime != null && Object.hasOwnProperty.call(message, "lastTransferEndTime")) + $root.google.protobuf.Timestamp.encode(message.lastTransferEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastTransferError != null && Object.hasOwnProperty.call(message, "lastTransferError")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.lastTransferError); return writer; }; /** - * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. + * Encodes the specified TransferStats message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.TransferStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static - * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ITransferStats} message TransferStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + TransferStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer. + * Decodes a TransferStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReplicationRequest.decode = function decode(reader, length, error) { + TransferStats.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.TransferStats(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.transferBytes = reader.int64(); break; } case 2: { - message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + message.totalTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 3: { - message.replicationId = reader.string(); + message.lastTransferBytes = reader.int64(); + break; + } + case 4: { + message.lastTransferDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lagDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastTransferEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastTransferError = reader.string(); break; } default: @@ -22383,144 +21427,278 @@ }; /** - * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a TransferStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + TransferStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateReplicationRequest message. + * Verifies a TransferStats message. * @function verify - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateReplicationRequest.verify = function verify(message) { + TransferStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.replication != null && message.hasOwnProperty("replication")) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); - if (error) - return "replication." + error; + var properties = {}; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + properties._transferBytes = 1; + if (!$util.isInteger(message.transferBytes) && !(message.transferBytes && $util.isInteger(message.transferBytes.low) && $util.isInteger(message.transferBytes.high))) + return "transferBytes: integer|Long expected"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + properties._totalTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.totalTransferDuration); + if (error) + return "totalTransferDuration." + error; + } + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + properties._lastTransferBytes = 1; + if (!$util.isInteger(message.lastTransferBytes) && !(message.lastTransferBytes && $util.isInteger(message.lastTransferBytes.low) && $util.isInteger(message.lastTransferBytes.high))) + return "lastTransferBytes: integer|Long expected"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + properties._lastTransferDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lastTransferDuration); + if (error) + return "lastTransferDuration." + error; + } + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + properties._lagDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.lagDuration); + if (error) + return "lagDuration." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + properties._lastTransferEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastTransferEndTime); + if (error) + return "lastTransferEndTime." + error; + } + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + properties._lastTransferError = 1; + if (!$util.isString(message.lastTransferError)) + return "lastTransferError: string expected"; } - if (message.replicationId != null && message.hasOwnProperty("replicationId")) - if (!$util.isString(message.replicationId)) - return "replicationId: string expected"; return null; }; /** - * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TransferStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest + * @returns {google.cloud.netapp.v1.TransferStats} TransferStats */ - CreateReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateReplicationRequest) + TransferStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.TransferStats) return object; - var message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.replication != null) { - if (typeof object.replication !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateReplicationRequest.replication: object expected"); - message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + var message = new $root.google.cloud.netapp.v1.TransferStats(); + if (object.transferBytes != null) + if ($util.Long) + (message.transferBytes = $util.Long.fromValue(object.transferBytes)).unsigned = false; + else if (typeof object.transferBytes === "string") + message.transferBytes = parseInt(object.transferBytes, 10); + else if (typeof object.transferBytes === "number") + message.transferBytes = object.transferBytes; + else if (typeof object.transferBytes === "object") + message.transferBytes = new $util.LongBits(object.transferBytes.low >>> 0, object.transferBytes.high >>> 0).toNumber(); + if (object.totalTransferDuration != null) { + if (typeof object.totalTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.totalTransferDuration: object expected"); + message.totalTransferDuration = $root.google.protobuf.Duration.fromObject(object.totalTransferDuration); } - if (object.replicationId != null) - message.replicationId = String(object.replicationId); + if (object.lastTransferBytes != null) + if ($util.Long) + (message.lastTransferBytes = $util.Long.fromValue(object.lastTransferBytes)).unsigned = false; + else if (typeof object.lastTransferBytes === "string") + message.lastTransferBytes = parseInt(object.lastTransferBytes, 10); + else if (typeof object.lastTransferBytes === "number") + message.lastTransferBytes = object.lastTransferBytes; + else if (typeof object.lastTransferBytes === "object") + message.lastTransferBytes = new $util.LongBits(object.lastTransferBytes.low >>> 0, object.lastTransferBytes.high >>> 0).toNumber(); + if (object.lastTransferDuration != null) { + if (typeof object.lastTransferDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferDuration: object expected"); + message.lastTransferDuration = $root.google.protobuf.Duration.fromObject(object.lastTransferDuration); + } + if (object.lagDuration != null) { + if (typeof object.lagDuration !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lagDuration: object expected"); + message.lagDuration = $root.google.protobuf.Duration.fromObject(object.lagDuration); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastTransferEndTime != null) { + if (typeof object.lastTransferEndTime !== "object") + throw TypeError(".google.cloud.netapp.v1.TransferStats.lastTransferEndTime: object expected"); + message.lastTransferEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastTransferEndTime); + } + if (object.lastTransferError != null) + message.lastTransferError = String(object.lastTransferError); return message; }; /** - * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a TransferStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static - * @param {google.cloud.netapp.v1.CreateReplicationRequest} message CreateReplicationRequest + * @param {google.cloud.netapp.v1.TransferStats} message TransferStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateReplicationRequest.toObject = function toObject(message, options) { + TransferStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.replication = null; - object.replicationId = ""; + if (message.transferBytes != null && message.hasOwnProperty("transferBytes")) { + if (typeof message.transferBytes === "number") + object.transferBytes = options.longs === String ? String(message.transferBytes) : message.transferBytes; + else + object.transferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transferBytes) : options.longs === Number ? new $util.LongBits(message.transferBytes.low >>> 0, message.transferBytes.high >>> 0).toNumber() : message.transferBytes; + if (options.oneofs) + object._transferBytes = "transferBytes"; + } + if (message.totalTransferDuration != null && message.hasOwnProperty("totalTransferDuration")) { + object.totalTransferDuration = $root.google.protobuf.Duration.toObject(message.totalTransferDuration, options); + if (options.oneofs) + object._totalTransferDuration = "totalTransferDuration"; + } + if (message.lastTransferBytes != null && message.hasOwnProperty("lastTransferBytes")) { + if (typeof message.lastTransferBytes === "number") + object.lastTransferBytes = options.longs === String ? String(message.lastTransferBytes) : message.lastTransferBytes; + else + object.lastTransferBytes = options.longs === String ? $util.Long.prototype.toString.call(message.lastTransferBytes) : options.longs === Number ? new $util.LongBits(message.lastTransferBytes.low >>> 0, message.lastTransferBytes.high >>> 0).toNumber() : message.lastTransferBytes; + if (options.oneofs) + object._lastTransferBytes = "lastTransferBytes"; + } + if (message.lastTransferDuration != null && message.hasOwnProperty("lastTransferDuration")) { + object.lastTransferDuration = $root.google.protobuf.Duration.toObject(message.lastTransferDuration, options); + if (options.oneofs) + object._lastTransferDuration = "lastTransferDuration"; + } + if (message.lagDuration != null && message.hasOwnProperty("lagDuration")) { + object.lagDuration = $root.google.protobuf.Duration.toObject(message.lagDuration, options); + if (options.oneofs) + object._lagDuration = "lagDuration"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.lastTransferEndTime != null && message.hasOwnProperty("lastTransferEndTime")) { + object.lastTransferEndTime = $root.google.protobuf.Timestamp.toObject(message.lastTransferEndTime, options); + if (options.oneofs) + object._lastTransferEndTime = "lastTransferEndTime"; + } + if (message.lastTransferError != null && message.hasOwnProperty("lastTransferError")) { + object.lastTransferError = message.lastTransferError; + if (options.oneofs) + object._lastTransferError = "lastTransferError"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.replication != null && message.hasOwnProperty("replication")) - object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); - if (message.replicationId != null && message.hasOwnProperty("replicationId")) - object.replicationId = message.replicationId; return object; }; /** - * Converts this CreateReplicationRequest to JSON. + * Converts this TransferStats to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @instance * @returns {Object.} JSON object */ - CreateReplicationRequest.prototype.toJSON = function toJSON() { + TransferStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateReplicationRequest + * Gets the default type url for TransferStats * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateReplicationRequest + * @memberof google.cloud.netapp.v1.TransferStats * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransferStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.TransferStats"; }; - return CreateReplicationRequest; + return TransferStats; })(); - v1.DeleteReplicationRequest = (function() { + v1.Replication = (function() { /** - * Properties of a DeleteReplicationRequest. + * Properties of a Replication. * @memberof google.cloud.netapp.v1 - * @interface IDeleteReplicationRequest - * @property {string|null} [name] DeleteReplicationRequest name + * @interface IReplication + * @property {string|null} [name] Replication name + * @property {google.cloud.netapp.v1.Replication.State|null} [state] Replication state + * @property {string|null} [stateDetails] Replication stateDetails + * @property {google.cloud.netapp.v1.Replication.ReplicationRole|null} [role] Replication role + * @property {google.cloud.netapp.v1.Replication.ReplicationSchedule|null} [replicationSchedule] Replication replicationSchedule + * @property {google.cloud.netapp.v1.Replication.MirrorState|null} [mirrorState] Replication mirrorState + * @property {boolean|null} [healthy] Replication healthy + * @property {google.protobuf.ITimestamp|null} [createTime] Replication createTime + * @property {string|null} [destinationVolume] Replication destinationVolume + * @property {google.cloud.netapp.v1.ITransferStats|null} [transferStats] Replication transferStats + * @property {Object.|null} [labels] Replication labels + * @property {string|null} [description] Replication description + * @property {google.cloud.netapp.v1.IDestinationVolumeParameters|null} [destinationVolumeParameters] Replication destinationVolumeParameters + * @property {string|null} [sourceVolume] Replication sourceVolume + * @property {google.cloud.netapp.v1.IHybridPeeringDetails|null} [hybridPeeringDetails] Replication hybridPeeringDetails + * @property {string|null} [clusterLocation] Replication clusterLocation + * @property {google.cloud.netapp.v1.Replication.HybridReplicationType|null} [hybridReplicationType] Replication hybridReplicationType + * @property {google.cloud.netapp.v1.IUserCommands|null} [hybridReplicationUserCommands] Replication hybridReplicationUserCommands */ /** - * Constructs a new DeleteReplicationRequest. + * Constructs a new Replication. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteReplicationRequest. - * @implements IDeleteReplicationRequest + * @classdesc Represents a Replication. + * @implements IReplication * @constructor - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set */ - function DeleteReplicationRequest(properties) { + function Replication(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22528,297 +21706,350 @@ } /** - * DeleteReplicationRequest name. + * Replication name. * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @instance */ - DeleteReplicationRequest.prototype.name = ""; + Replication.prototype.name = ""; /** - * Creates a new DeleteReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest instance + * Replication state. + * @member {google.cloud.netapp.v1.Replication.State} state + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.create = function create(properties) { - return new DeleteReplicationRequest(properties); - }; + Replication.prototype.state = 0; /** - * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Replication stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + Replication.prototype.stateDetails = ""; /** - * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Replication role. + * @member {google.cloud.netapp.v1.Replication.ReplicationRole} role + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Replication.prototype.role = 0; /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Replication replicationSchedule. + * @member {google.cloud.netapp.v1.Replication.ReplicationSchedule} replicationSchedule + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Replication.prototype.replicationSchedule = 0; /** - * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Replication mirrorState. + * @member {google.cloud.netapp.v1.Replication.MirrorState} mirrorState + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Replication.prototype.mirrorState = 0; /** - * Verifies a DeleteReplicationRequest message. - * @function verify - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Replication healthy. + * @member {boolean|null|undefined} healthy + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + Replication.prototype.healthy = null; /** - * Creates a DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest + * Replication createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + Replication.prototype.createTime = null; /** - * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {google.cloud.netapp.v1.DeleteReplicationRequest} message DeleteReplicationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Replication destinationVolume. + * @member {string} destinationVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.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; - }; + Replication.prototype.destinationVolume = ""; /** - * Converts this DeleteReplicationRequest to JSON. - * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest + * Replication transferStats. + * @member {google.cloud.netapp.v1.ITransferStats|null|undefined} transferStats + * @memberof google.cloud.netapp.v1.Replication * @instance - * @returns {Object.} JSON object */ - DeleteReplicationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Replication.prototype.transferStats = null; /** - * Gets the default type url for DeleteReplicationRequest - * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteReplicationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Replication labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - DeleteReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteReplicationRequest"; - }; + Replication.prototype.labels = $util.emptyObject; - return DeleteReplicationRequest; - })(); + /** + * Replication description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.description = null; - v1.UpdateReplicationRequest = (function() { + /** + * Replication destinationVolumeParameters. + * @member {google.cloud.netapp.v1.IDestinationVolumeParameters|null|undefined} destinationVolumeParameters + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.destinationVolumeParameters = null; /** - * Properties of an UpdateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @interface IUpdateReplicationRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReplicationRequest updateMask - * @property {google.cloud.netapp.v1.IReplication|null} [replication] UpdateReplicationRequest replication + * Replication sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Replication + * @instance */ + Replication.prototype.sourceVolume = ""; /** - * Constructs a new UpdateReplicationRequest. - * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateReplicationRequest. - * @implements IUpdateReplicationRequest - * @constructor - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + * Replication hybridPeeringDetails. + * @member {google.cloud.netapp.v1.IHybridPeeringDetails|null|undefined} hybridPeeringDetails + * @memberof google.cloud.netapp.v1.Replication + * @instance */ - function UpdateReplicationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Replication.prototype.hybridPeeringDetails = null; /** - * UpdateReplicationRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * Replication clusterLocation. + * @member {string} clusterLocation + * @memberof google.cloud.netapp.v1.Replication * @instance */ - UpdateReplicationRequest.prototype.updateMask = null; + Replication.prototype.clusterLocation = ""; /** - * UpdateReplicationRequest replication. - * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * Replication hybridReplicationType. + * @member {google.cloud.netapp.v1.Replication.HybridReplicationType} hybridReplicationType + * @memberof google.cloud.netapp.v1.Replication * @instance */ - UpdateReplicationRequest.prototype.replication = null; + Replication.prototype.hybridReplicationType = 0; /** - * Creates a new UpdateReplicationRequest instance using the specified properties. + * Replication hybridReplicationUserCommands. + * @member {google.cloud.netapp.v1.IUserCommands|null|undefined} hybridReplicationUserCommands + * @memberof google.cloud.netapp.v1.Replication + * @instance + */ + Replication.prototype.hybridReplicationUserCommands = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Replication.prototype, "_healthy", { + get: $util.oneOfGetter($oneOfFields = ["healthy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Replication.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Replication instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest instance + * @param {google.cloud.netapp.v1.IReplication=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Replication} Replication instance */ - UpdateReplicationRequest.create = function create(properties) { - return new UpdateReplicationRequest(properties); + Replication.create = function create(properties) { + return new Replication(properties); }; /** - * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * Encodes the specified Replication message. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateReplicationRequest.encode = function encode(message, writer) { + Replication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) - $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.role); + if (message.replicationSchedule != null && Object.hasOwnProperty.call(message, "replicationSchedule")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.replicationSchedule); + if (message.mirrorState != null && Object.hasOwnProperty.call(message, "mirrorState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.mirrorState); + if (message.healthy != null && Object.hasOwnProperty.call(message, "healthy")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.healthy); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.destinationVolume != null && Object.hasOwnProperty.call(message, "destinationVolume")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.destinationVolume); + if (message.transferStats != null && Object.hasOwnProperty.call(message, "transferStats")) + $root.google.cloud.netapp.v1.TransferStats.encode(message.transferStats, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); + if (message.destinationVolumeParameters != null && Object.hasOwnProperty.call(message, "destinationVolumeParameters")) + $root.google.cloud.netapp.v1.DestinationVolumeParameters.encode(message.destinationVolumeParameters, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.sourceVolume); + if (message.hybridPeeringDetails != null && Object.hasOwnProperty.call(message, "hybridPeeringDetails")) + $root.google.cloud.netapp.v1.HybridPeeringDetails.encode(message.hybridPeeringDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.clusterLocation != null && Object.hasOwnProperty.call(message, "clusterLocation")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.clusterLocation); + if (message.hybridReplicationType != null && Object.hasOwnProperty.call(message, "hybridReplicationType")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.hybridReplicationType); + if (message.hybridReplicationUserCommands != null && Object.hasOwnProperty.call(message, "hybridReplicationUserCommands")) + $root.google.cloud.netapp.v1.UserCommands.encode(message.hybridReplicationUserCommands, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. + * Encodes the specified Replication message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Replication.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static - * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IReplication} message Replication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + Replication.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer. + * Decodes a Replication message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @returns {google.cloud.netapp.v1.Replication} Replication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateReplicationRequest.decode = function decode(reader, length, error) { + Replication.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Replication(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.role = reader.int32(); + break; + } + case 5: { + message.replicationSchedule = reader.int32(); + break; + } + case 6: { + message.mirrorState = reader.int32(); + break; + } + case 8: { + message.healthy = reader.bool(); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.destinationVolume = reader.string(); + break; + } + case 11: { + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.decode(reader, reader.uint32()); + break; + } + case 12: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.description = reader.string(); + break; + } + case 14: { + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.decode(reader, reader.uint32()); + break; + } + case 15: { + message.sourceVolume = reader.string(); + break; + } + case 16: { + message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clusterLocation = reader.string(); + break; + } + case 19: { + message.hybridReplicationType = reader.int32(); + break; + } + case 20: { + message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.decode(reader, reader.uint32()); break; } default: @@ -22830,142 +22061,626 @@ }; /** - * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a Replication message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest + * @returns {google.cloud.netapp.v1.Replication} Replication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + Replication.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateReplicationRequest message. + * Verifies a Replication message. * @function verify - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateReplicationRequest.verify = function verify(message) { + Replication.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + 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 5: + case 6: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { + default: + return "role: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + switch (message.replicationSchedule) { + default: + return "replicationSchedule: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + switch (message.mirrorState) { + default: + return "mirrorState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.healthy != null && message.hasOwnProperty("healthy")) { + properties._healthy = 1; + if (typeof message.healthy !== "boolean") + return "healthy: boolean expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "updateMask." + error; + return "createTime." + error; } - if (message.replication != null && message.hasOwnProperty("replication")) { - var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + if (!$util.isString(message.destinationVolume)) + return "destinationVolume: string expected"; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) { + var error = $root.google.cloud.netapp.v1.TransferStats.verify(message.transferStats); if (error) - return "replication." + error; + return "transferStats." + error; } - return null; - }; - - /** - * Creates an UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest - */ - UpdateReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateReplicationRequest) - return object; - var message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (object.replication != null) { - if (typeof object.replication !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.replication: object expected"); - message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; } - return message; - }; - - /** - * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) { + var error = $root.google.cloud.netapp.v1.DestinationVolumeParameters.verify(message.destinationVolumeParameters); + if (error) + return "destinationVolumeParameters." + error; + } + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) { + var error = $root.google.cloud.netapp.v1.HybridPeeringDetails.verify(message.hybridPeeringDetails); + if (error) + return "hybridPeeringDetails." + error; + } + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + if (!$util.isString(message.clusterLocation)) + return "clusterLocation: string expected"; + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + switch (message.hybridReplicationType) { + default: + return "hybridReplicationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) { + var error = $root.google.cloud.netapp.v1.UserCommands.verify(message.hybridReplicationUserCommands); + if (error) + return "hybridReplicationUserCommands." + error; + } + return null; + }; + + /** + * Creates a Replication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Replication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Replication} Replication + */ + Replication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Replication) + return object; + var message = new $root.google.cloud.netapp.v1.Replication(); + 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 "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "ERROR": + case 6: + message.state = 6; + break; + case "PENDING_CLUSTER_PEERING": + case 8: + message.state = 8; + break; + case "PENDING_SVM_PEERING": + case 9: + message.state = 9; + break; + case "PENDING_REMOTE_RESYNC": + case 10: + message.state = 10; + break; + case "EXTERNALLY_MANAGED_REPLICATION": + case 11: + message.state = 11; + break; + } + if (object.stateDetails != null) + message.stateDetails = String(object.stateDetails); + switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; + case "REPLICATION_ROLE_UNSPECIFIED": + case 0: + message.role = 0; + break; + case "SOURCE": + case 1: + message.role = 1; + break; + case "DESTINATION": + case 2: + message.role = 2; + break; + } + switch (object.replicationSchedule) { + default: + if (typeof object.replicationSchedule === "number") { + message.replicationSchedule = object.replicationSchedule; + break; + } + break; + case "REPLICATION_SCHEDULE_UNSPECIFIED": + case 0: + message.replicationSchedule = 0; + break; + case "EVERY_10_MINUTES": + case 1: + message.replicationSchedule = 1; + break; + case "HOURLY": + case 2: + message.replicationSchedule = 2; + break; + case "DAILY": + case 3: + message.replicationSchedule = 3; + break; + } + switch (object.mirrorState) { + default: + if (typeof object.mirrorState === "number") { + message.mirrorState = object.mirrorState; + break; + } + break; + case "MIRROR_STATE_UNSPECIFIED": + case 0: + message.mirrorState = 0; + break; + case "PREPARING": + case 1: + message.mirrorState = 1; + break; + case "MIRRORED": + case 2: + message.mirrorState = 2; + break; + case "STOPPED": + case 3: + message.mirrorState = 3; + break; + case "TRANSFERRING": + case 4: + message.mirrorState = 4; + break; + case "BASELINE_TRANSFERRING": + case 5: + message.mirrorState = 5; + break; + case "ABORTED": + case 6: + message.mirrorState = 6; + break; + case "EXTERNALLY_MANAGED": + case 7: + message.mirrorState = 7; + break; + case "PENDING_PEERING": + case 8: + message.mirrorState = 8; + break; + } + if (object.healthy != null) + message.healthy = Boolean(object.healthy); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.destinationVolume != null) + message.destinationVolume = String(object.destinationVolume); + if (object.transferStats != null) { + if (typeof object.transferStats !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.transferStats: object expected"); + message.transferStats = $root.google.cloud.netapp.v1.TransferStats.fromObject(object.transferStats); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.description != null) + message.description = String(object.description); + if (object.destinationVolumeParameters != null) { + if (typeof object.destinationVolumeParameters !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.destinationVolumeParameters: object expected"); + message.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.fromObject(object.destinationVolumeParameters); + } + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + if (object.hybridPeeringDetails != null) { + if (typeof object.hybridPeeringDetails !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.hybridPeeringDetails: object expected"); + message.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.fromObject(object.hybridPeeringDetails); + } + if (object.clusterLocation != null) + message.clusterLocation = String(object.clusterLocation); + switch (object.hybridReplicationType) { + default: + if (typeof object.hybridReplicationType === "number") { + message.hybridReplicationType = object.hybridReplicationType; + break; + } + break; + case "HYBRID_REPLICATION_TYPE_UNSPECIFIED": + case 0: + message.hybridReplicationType = 0; + break; + case "MIGRATION": + case 1: + message.hybridReplicationType = 1; + break; + case "CONTINUOUS_REPLICATION": + case 2: + message.hybridReplicationType = 2; + break; + case "ONPREM_REPLICATION": + case 3: + message.hybridReplicationType = 3; + break; + case "REVERSE_ONPREM_REPLICATION": + case 4: + message.hybridReplicationType = 4; + break; + } + if (object.hybridReplicationUserCommands != null) { + if (typeof object.hybridReplicationUserCommands !== "object") + throw TypeError(".google.cloud.netapp.v1.Replication.hybridReplicationUserCommands: object expected"); + message.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.fromObject(object.hybridReplicationUserCommands); + } + return message; + }; + + /** + * Creates a plain object from a Replication message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static - * @param {google.cloud.netapp.v1.UpdateReplicationRequest} message UpdateReplicationRequest + * @param {google.cloud.netapp.v1.Replication} message Replication * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateReplicationRequest.toObject = function toObject(message, options) { + Replication.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.updateMask = null; - object.replication = null; + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDetails = ""; + object.role = options.enums === String ? "REPLICATION_ROLE_UNSPECIFIED" : 0; + object.replicationSchedule = options.enums === String ? "REPLICATION_SCHEDULE_UNSPECIFIED" : 0; + object.mirrorState = options.enums === String ? "MIRROR_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.destinationVolume = ""; + object.transferStats = null; + object.destinationVolumeParameters = null; + object.sourceVolume = ""; + object.hybridPeeringDetails = null; + object.clusterLocation = ""; + object.hybridReplicationType = options.enums === String ? "HYBRID_REPLICATION_TYPE_UNSPECIFIED" : 0; + object.hybridReplicationUserCommands = null; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.replication != null && message.hasOwnProperty("replication")) - object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.netapp.v1.Replication.State[message.state] === undefined ? message.state : $root.google.cloud.netapp.v1.Replication.State[message.state] : message.state; + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + object.stateDetails = message.stateDetails; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] === undefined ? message.role : $root.google.cloud.netapp.v1.Replication.ReplicationRole[message.role] : message.role; + if (message.replicationSchedule != null && message.hasOwnProperty("replicationSchedule")) + object.replicationSchedule = options.enums === String ? $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] === undefined ? message.replicationSchedule : $root.google.cloud.netapp.v1.Replication.ReplicationSchedule[message.replicationSchedule] : message.replicationSchedule; + if (message.mirrorState != null && message.hasOwnProperty("mirrorState")) + object.mirrorState = options.enums === String ? $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] === undefined ? message.mirrorState : $root.google.cloud.netapp.v1.Replication.MirrorState[message.mirrorState] : message.mirrorState; + if (message.healthy != null && message.hasOwnProperty("healthy")) { + object.healthy = message.healthy; + if (options.oneofs) + object._healthy = "healthy"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.destinationVolume != null && message.hasOwnProperty("destinationVolume")) + object.destinationVolume = message.destinationVolume; + if (message.transferStats != null && message.hasOwnProperty("transferStats")) + object.transferStats = $root.google.cloud.netapp.v1.TransferStats.toObject(message.transferStats, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.destinationVolumeParameters != null && message.hasOwnProperty("destinationVolumeParameters")) + object.destinationVolumeParameters = $root.google.cloud.netapp.v1.DestinationVolumeParameters.toObject(message.destinationVolumeParameters, options); + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + if (message.hybridPeeringDetails != null && message.hasOwnProperty("hybridPeeringDetails")) + object.hybridPeeringDetails = $root.google.cloud.netapp.v1.HybridPeeringDetails.toObject(message.hybridPeeringDetails, options); + if (message.clusterLocation != null && message.hasOwnProperty("clusterLocation")) + object.clusterLocation = message.clusterLocation; + if (message.hybridReplicationType != null && message.hasOwnProperty("hybridReplicationType")) + object.hybridReplicationType = options.enums === String ? $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] === undefined ? message.hybridReplicationType : $root.google.cloud.netapp.v1.Replication.HybridReplicationType[message.hybridReplicationType] : message.hybridReplicationType; + if (message.hybridReplicationUserCommands != null && message.hasOwnProperty("hybridReplicationUserCommands")) + object.hybridReplicationUserCommands = $root.google.cloud.netapp.v1.UserCommands.toObject(message.hybridReplicationUserCommands, options); return object; }; /** - * Converts this UpdateReplicationRequest to JSON. + * Converts this Replication to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @instance * @returns {Object.} JSON object */ - UpdateReplicationRequest.prototype.toJSON = function toJSON() { + Replication.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateReplicationRequest + * Gets the default type url for Replication * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @memberof google.cloud.netapp.v1.Replication * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Replication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.Replication"; }; - return UpdateReplicationRequest; + /** + * State enum. + * @name google.cloud.netapp.v1.Replication.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=5 DELETING value + * @property {number} ERROR=6 ERROR value + * @property {number} PENDING_CLUSTER_PEERING=8 PENDING_CLUSTER_PEERING value + * @property {number} PENDING_SVM_PEERING=9 PENDING_SVM_PEERING value + * @property {number} PENDING_REMOTE_RESYNC=10 PENDING_REMOTE_RESYNC value + * @property {number} EXTERNALLY_MANAGED_REPLICATION=11 EXTERNALLY_MANAGED_REPLICATION value + */ + Replication.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[8] = "PENDING_CLUSTER_PEERING"] = 8; + values[valuesById[9] = "PENDING_SVM_PEERING"] = 9; + values[valuesById[10] = "PENDING_REMOTE_RESYNC"] = 10; + values[valuesById[11] = "EXTERNALLY_MANAGED_REPLICATION"] = 11; + return values; + })(); + + /** + * ReplicationRole enum. + * @name google.cloud.netapp.v1.Replication.ReplicationRole + * @enum {number} + * @property {number} REPLICATION_ROLE_UNSPECIFIED=0 REPLICATION_ROLE_UNSPECIFIED value + * @property {number} SOURCE=1 SOURCE value + * @property {number} DESTINATION=2 DESTINATION value + */ + Replication.ReplicationRole = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE"] = 1; + values[valuesById[2] = "DESTINATION"] = 2; + return values; + })(); + + /** + * ReplicationSchedule enum. + * @name google.cloud.netapp.v1.Replication.ReplicationSchedule + * @enum {number} + * @property {number} REPLICATION_SCHEDULE_UNSPECIFIED=0 REPLICATION_SCHEDULE_UNSPECIFIED value + * @property {number} EVERY_10_MINUTES=1 EVERY_10_MINUTES value + * @property {number} HOURLY=2 HOURLY value + * @property {number} DAILY=3 DAILY value + */ + Replication.ReplicationSchedule = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPLICATION_SCHEDULE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVERY_10_MINUTES"] = 1; + values[valuesById[2] = "HOURLY"] = 2; + values[valuesById[3] = "DAILY"] = 3; + return values; + })(); + + /** + * MirrorState enum. + * @name google.cloud.netapp.v1.Replication.MirrorState + * @enum {number} + * @property {number} MIRROR_STATE_UNSPECIFIED=0 MIRROR_STATE_UNSPECIFIED value + * @property {number} PREPARING=1 PREPARING value + * @property {number} MIRRORED=2 MIRRORED value + * @property {number} STOPPED=3 STOPPED value + * @property {number} TRANSFERRING=4 TRANSFERRING value + * @property {number} BASELINE_TRANSFERRING=5 BASELINE_TRANSFERRING value + * @property {number} ABORTED=6 ABORTED value + * @property {number} EXTERNALLY_MANAGED=7 EXTERNALLY_MANAGED value + * @property {number} PENDING_PEERING=8 PENDING_PEERING value + */ + Replication.MirrorState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIRROR_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREPARING"] = 1; + values[valuesById[2] = "MIRRORED"] = 2; + values[valuesById[3] = "STOPPED"] = 3; + values[valuesById[4] = "TRANSFERRING"] = 4; + values[valuesById[5] = "BASELINE_TRANSFERRING"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + values[valuesById[7] = "EXTERNALLY_MANAGED"] = 7; + values[valuesById[8] = "PENDING_PEERING"] = 8; + return values; + })(); + + /** + * HybridReplicationType enum. + * @name google.cloud.netapp.v1.Replication.HybridReplicationType + * @enum {number} + * @property {number} HYBRID_REPLICATION_TYPE_UNSPECIFIED=0 HYBRID_REPLICATION_TYPE_UNSPECIFIED value + * @property {number} MIGRATION=1 MIGRATION value + * @property {number} CONTINUOUS_REPLICATION=2 CONTINUOUS_REPLICATION value + * @property {number} ONPREM_REPLICATION=3 ONPREM_REPLICATION value + * @property {number} REVERSE_ONPREM_REPLICATION=4 REVERSE_ONPREM_REPLICATION value + */ + Replication.HybridReplicationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HYBRID_REPLICATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MIGRATION"] = 1; + values[valuesById[2] = "CONTINUOUS_REPLICATION"] = 2; + values[valuesById[3] = "ONPREM_REPLICATION"] = 3; + values[valuesById[4] = "REVERSE_ONPREM_REPLICATION"] = 4; + return values; + })(); + + return Replication; })(); - v1.StopReplicationRequest = (function() { + v1.HybridPeeringDetails = (function() { /** - * Properties of a StopReplicationRequest. + * Properties of a HybridPeeringDetails. * @memberof google.cloud.netapp.v1 - * @interface IStopReplicationRequest - * @property {string|null} [name] StopReplicationRequest name - * @property {boolean|null} [force] StopReplicationRequest force + * @interface IHybridPeeringDetails + * @property {string|null} [subnetIp] HybridPeeringDetails subnetIp + * @property {string|null} [command] HybridPeeringDetails command + * @property {google.protobuf.ITimestamp|null} [commandExpiryTime] HybridPeeringDetails commandExpiryTime + * @property {string|null} [passphrase] HybridPeeringDetails passphrase + * @property {string|null} [peerVolumeName] HybridPeeringDetails peerVolumeName + * @property {string|null} [peerClusterName] HybridPeeringDetails peerClusterName + * @property {string|null} [peerSvmName] HybridPeeringDetails peerSvmName */ /** - * Constructs a new StopReplicationRequest. + * Constructs a new HybridPeeringDetails. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a StopReplicationRequest. - * @implements IStopReplicationRequest + * @classdesc Represents a HybridPeeringDetails. + * @implements IHybridPeeringDetails * @constructor - * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set */ - function StopReplicationRequest(properties) { + function HybridPeeringDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22973,91 +22688,161 @@ } /** - * StopReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * HybridPeeringDetails subnetIp. + * @member {string} subnetIp + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @instance */ - StopReplicationRequest.prototype.name = ""; + HybridPeeringDetails.prototype.subnetIp = ""; /** - * StopReplicationRequest force. - * @member {boolean} force - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * HybridPeeringDetails command. + * @member {string} command + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @instance */ - StopReplicationRequest.prototype.force = false; + HybridPeeringDetails.prototype.command = ""; /** - * Creates a new StopReplicationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.StopReplicationRequest - * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest instance + * HybridPeeringDetails commandExpiryTime. + * @member {google.protobuf.ITimestamp|null|undefined} commandExpiryTime + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance */ - StopReplicationRequest.create = function create(properties) { - return new StopReplicationRequest(properties); + HybridPeeringDetails.prototype.commandExpiryTime = null; + + /** + * HybridPeeringDetails passphrase. + * @member {string} passphrase + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.passphrase = ""; + + /** + * HybridPeeringDetails peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerVolumeName = ""; + + /** + * HybridPeeringDetails peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerClusterName = ""; + + /** + * HybridPeeringDetails peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @instance + */ + HybridPeeringDetails.prototype.peerSvmName = ""; + + /** + * Creates a new HybridPeeringDetails instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.HybridPeeringDetails + * @static + * @param {google.cloud.netapp.v1.IHybridPeeringDetails=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails instance + */ + HybridPeeringDetails.create = function create(properties) { + return new HybridPeeringDetails(properties); }; /** - * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * Encodes the specified HybridPeeringDetails message. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationRequest.encode = function encode(message, writer) { + HybridPeeringDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.subnetIp != null && Object.hasOwnProperty.call(message, "subnetIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetIp); + if (message.command != null && Object.hasOwnProperty.call(message, "command")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); + if (message.commandExpiryTime != null && Object.hasOwnProperty.call(message, "commandExpiryTime")) + $root.google.protobuf.Timestamp.encode(message.commandExpiryTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.passphrase != null && Object.hasOwnProperty.call(message, "passphrase")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.passphrase); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.peerSvmName); return writer; }; /** - * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. + * Encodes the specified HybridPeeringDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.HybridPeeringDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static - * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IHybridPeeringDetails} message HybridPeeringDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + HybridPeeringDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer. + * Decodes a HybridPeeringDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationRequest.decode = function decode(reader, length, error) { + HybridPeeringDetails.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.subnetIp = reader.string(); break; } case 2: { - message.force = reader.bool(); + message.command = reader.string(); + break; + } + case 3: { + message.commandExpiryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.passphrase = reader.string(); + break; + } + case 5: { + message.peerVolumeName = reader.string(); + break; + } + case 6: { + message.peerClusterName = reader.string(); + break; + } + case 7: { + message.peerSvmName = reader.string(); break; } default: @@ -23069,131 +22854,180 @@ }; /** - * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a HybridPeeringDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + HybridPeeringDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopReplicationRequest message. + * Verifies a HybridPeeringDetails message. * @function verify - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopReplicationRequest.verify = function verify(message) { + HybridPeeringDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) + if (!$util.isString(message.subnetIp)) + return "subnetIp: string expected"; + if (message.command != null && message.hasOwnProperty("command")) + if (!$util.isString(message.command)) + return "command: string expected"; + if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.commandExpiryTime); + if (error) + return "commandExpiryTime." + error; + } + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + if (!$util.isString(message.passphrase)) + return "passphrase: string expected"; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; return null; }; /** - * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HybridPeeringDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest + * @returns {google.cloud.netapp.v1.HybridPeeringDetails} HybridPeeringDetails */ - StopReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.StopReplicationRequest) + HybridPeeringDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.HybridPeeringDetails) return object; - var message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.netapp.v1.HybridPeeringDetails(); + if (object.subnetIp != null) + message.subnetIp = String(object.subnetIp); + if (object.command != null) + message.command = String(object.command); + if (object.commandExpiryTime != null) { + if (typeof object.commandExpiryTime !== "object") + throw TypeError(".google.cloud.netapp.v1.HybridPeeringDetails.commandExpiryTime: object expected"); + message.commandExpiryTime = $root.google.protobuf.Timestamp.fromObject(object.commandExpiryTime); + } + if (object.passphrase != null) + message.passphrase = String(object.passphrase); + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); return message; }; /** - * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a HybridPeeringDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static - * @param {google.cloud.netapp.v1.StopReplicationRequest} message StopReplicationRequest + * @param {google.cloud.netapp.v1.HybridPeeringDetails} message HybridPeeringDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopReplicationRequest.toObject = function toObject(message, options) { + HybridPeeringDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; + object.subnetIp = ""; + object.command = ""; + object.commandExpiryTime = null; + object.passphrase = ""; + object.peerVolumeName = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (message.subnetIp != null && message.hasOwnProperty("subnetIp")) + object.subnetIp = message.subnetIp; + if (message.command != null && message.hasOwnProperty("command")) + object.command = message.command; + if (message.commandExpiryTime != null && message.hasOwnProperty("commandExpiryTime")) + object.commandExpiryTime = $root.google.protobuf.Timestamp.toObject(message.commandExpiryTime, options); + if (message.passphrase != null && message.hasOwnProperty("passphrase")) + object.passphrase = message.passphrase; + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; return object; }; /** - * Converts this StopReplicationRequest to JSON. + * Converts this HybridPeeringDetails to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @instance * @returns {Object.} JSON object */ - StopReplicationRequest.prototype.toJSON = function toJSON() { + HybridPeeringDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StopReplicationRequest + * Gets the default type url for HybridPeeringDetails * @function getTypeUrl - * @memberof google.cloud.netapp.v1.StopReplicationRequest + * @memberof google.cloud.netapp.v1.HybridPeeringDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HybridPeeringDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.StopReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.HybridPeeringDetails"; }; - return StopReplicationRequest; + return HybridPeeringDetails; })(); - v1.ResumeReplicationRequest = (function() { + v1.ListReplicationsRequest = (function() { /** - * Properties of a ResumeReplicationRequest. + * Properties of a ListReplicationsRequest. * @memberof google.cloud.netapp.v1 - * @interface IResumeReplicationRequest - * @property {string|null} [name] ResumeReplicationRequest name + * @interface IListReplicationsRequest + * @property {string|null} [parent] ListReplicationsRequest parent + * @property {number|null} [pageSize] ListReplicationsRequest pageSize + * @property {string|null} [pageToken] ListReplicationsRequest pageToken + * @property {string|null} [orderBy] ListReplicationsRequest orderBy + * @property {string|null} [filter] ListReplicationsRequest filter */ /** - * Constructs a new ResumeReplicationRequest. + * Constructs a new ListReplicationsRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ResumeReplicationRequest. - * @implements IResumeReplicationRequest + * @classdesc Represents a ListReplicationsRequest. + * @implements IListReplicationsRequest * @constructor - * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set */ - function ResumeReplicationRequest(properties) { + function ListReplicationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23201,77 +23035,133 @@ } /** - * ResumeReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * ListReplicationsRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @instance */ - ResumeReplicationRequest.prototype.name = ""; + ListReplicationsRequest.prototype.parent = ""; /** - * Creates a new ResumeReplicationRequest instance using the specified properties. + * ListReplicationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageSize = 0; + + /** + * ListReplicationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.pageToken = ""; + + /** + * ListReplicationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.orderBy = ""; + + /** + * ListReplicationsRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListReplicationsRequest + * @instance + */ + ListReplicationsRequest.prototype.filter = ""; + + /** + * Creates a new ListReplicationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest instance + * @param {google.cloud.netapp.v1.IListReplicationsRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest instance */ - ResumeReplicationRequest.create = function create(properties) { - return new ResumeReplicationRequest(properties); + ListReplicationsRequest.create = function create(properties) { + return new ListReplicationsRequest(properties); }; /** - * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * Encodes the specified ListReplicationsRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResumeReplicationRequest.encode = function encode(message, writer) { + ListReplicationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); return writer; }; /** - * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. + * Encodes the specified ListReplicationsRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static - * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IListReplicationsRequest} message ListReplicationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResumeReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListReplicationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer. + * Decodes a ListReplicationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResumeReplicationRequest.decode = function decode(reader, length, error) { + ListReplicationsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); break; } default: @@ -23283,122 +23173,159 @@ }; /** - * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a ListReplicationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResumeReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + ListReplicationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResumeReplicationRequest message. + * Verifies a ListReplicationsRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResumeReplicationRequest.verify = function verify(message) { + ListReplicationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListReplicationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest + * @returns {google.cloud.netapp.v1.ListReplicationsRequest} ListReplicationsRequest */ - ResumeReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ResumeReplicationRequest) + ListReplicationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsRequest) return object; - var message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.ListReplicationsRequest(); + 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.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListReplicationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static - * @param {google.cloud.netapp.v1.ResumeReplicationRequest} message ResumeReplicationRequest + * @param {google.cloud.netapp.v1.ListReplicationsRequest} message ListReplicationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResumeReplicationRequest.toObject = function toObject(message, options) { + ListReplicationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + 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.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this ResumeReplicationRequest to JSON. + * Converts this ListReplicationsRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @instance * @returns {Object.} JSON object */ - ResumeReplicationRequest.prototype.toJSON = function toJSON() { + ListReplicationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResumeReplicationRequest + * Gets the default type url for ListReplicationsRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ResumeReplicationRequest + * @memberof google.cloud.netapp.v1.ListReplicationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResumeReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListReplicationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ResumeReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsRequest"; }; - return ResumeReplicationRequest; + return ListReplicationsRequest; })(); - v1.ReverseReplicationDirectionRequest = (function() { + v1.ListReplicationsResponse = (function() { /** - * Properties of a ReverseReplicationDirectionRequest. + * Properties of a ListReplicationsResponse. * @memberof google.cloud.netapp.v1 - * @interface IReverseReplicationDirectionRequest - * @property {string|null} [name] ReverseReplicationDirectionRequest name + * @interface IListReplicationsResponse + * @property {Array.|null} [replications] ListReplicationsResponse replications + * @property {string|null} [nextPageToken] ListReplicationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReplicationsResponse unreachable */ /** - * Constructs a new ReverseReplicationDirectionRequest. + * Constructs a new ListReplicationsResponse. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ReverseReplicationDirectionRequest. - * @implements IReverseReplicationDirectionRequest + * @classdesc Represents a ListReplicationsResponse. + * @implements IListReplicationsResponse * @constructor - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set */ - function ReverseReplicationDirectionRequest(properties) { + function ListReplicationsResponse(properties) { + this.replications = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23406,77 +23333,111 @@ } /** - * ReverseReplicationDirectionRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * ListReplicationsResponse replications. + * @member {Array.} replications + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @instance */ - ReverseReplicationDirectionRequest.prototype.name = ""; + ListReplicationsResponse.prototype.replications = $util.emptyArray; /** - * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest - * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest instance + * ListReplicationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance */ - ReverseReplicationDirectionRequest.create = function create(properties) { - return new ReverseReplicationDirectionRequest(properties); + ListReplicationsResponse.prototype.nextPageToken = ""; + + /** + * ListReplicationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @instance + */ + ListReplicationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReplicationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListReplicationsResponse + * @static + * @param {google.cloud.netapp.v1.IListReplicationsResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse instance + */ + ListReplicationsResponse.create = function create(properties) { + return new ListReplicationsResponse(properties); }; /** - * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * Encodes the specified ListReplicationsResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReverseReplicationDirectionRequest.encode = function encode(message, writer) { + ListReplicationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.replications != null && message.replications.length) + for (var i = 0; i < message.replications.length; ++i) + $root.google.cloud.netapp.v1.Replication.encode(message.replications[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. + * Encodes the specified ListReplicationsResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListReplicationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static - * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IListReplicationsResponse} message ListReplicationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReverseReplicationDirectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListReplicationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. + * Decodes a ListReplicationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReverseReplicationDirectionRequest.decode = function decode(reader, length, error) { + ListReplicationsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.replications && message.replications.length)) + message.replications = []; + message.replications.push($root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -23488,127 +23449,169 @@ }; /** - * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListReplicationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReverseReplicationDirectionRequest.decodeDelimited = function decodeDelimited(reader) { + ListReplicationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReverseReplicationDirectionRequest message. + * Verifies a ListReplicationsResponse message. * @function verify - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReverseReplicationDirectionRequest.verify = function verify(message) { + ListReplicationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.replications != null && message.hasOwnProperty("replications")) { + if (!Array.isArray(message.replications)) + return "replications: array expected"; + for (var i = 0; i < message.replications.length; ++i) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replications[i]); + if (error) + return "replications." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListReplicationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest + * @returns {google.cloud.netapp.v1.ListReplicationsResponse} ListReplicationsResponse */ - ReverseReplicationDirectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) + ListReplicationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListReplicationsResponse) return object; - var message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.ListReplicationsResponse(); + if (object.replications) { + if (!Array.isArray(object.replications)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: array expected"); + message.replications = []; + for (var i = 0; i < object.replications.length; ++i) { + if (typeof object.replications[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.replications: object expected"); + message.replications[i] = $root.google.cloud.netapp.v1.Replication.fromObject(object.replications[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListReplicationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListReplicationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static - * @param {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest + * @param {google.cloud.netapp.v1.ListReplicationsResponse} message ListReplicationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReverseReplicationDirectionRequest.toObject = function toObject(message, options) { + ListReplicationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.replications = []; + object.unreachable = []; + } if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.replications && message.replications.length) { + object.replications = []; + for (var j = 0; j < message.replications.length; ++j) + object.replications[j] = $root.google.cloud.netapp.v1.Replication.toObject(message.replications[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } return object; }; /** - * Converts this ReverseReplicationDirectionRequest to JSON. + * Converts this ListReplicationsResponse to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @instance * @returns {Object.} JSON object */ - ReverseReplicationDirectionRequest.prototype.toJSON = function toJSON() { + ListReplicationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReverseReplicationDirectionRequest + * Gets the default type url for ListReplicationsResponse * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest + * @memberof google.cloud.netapp.v1.ListReplicationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReverseReplicationDirectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListReplicationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ReverseReplicationDirectionRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ListReplicationsResponse"; }; - return ReverseReplicationDirectionRequest; + return ListReplicationsResponse; })(); - v1.EstablishPeeringRequest = (function() { + v1.GetReplicationRequest = (function() { /** - * Properties of an EstablishPeeringRequest. + * Properties of a GetReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IEstablishPeeringRequest - * @property {string|null} [name] EstablishPeeringRequest name - * @property {string|null} [peerClusterName] EstablishPeeringRequest peerClusterName - * @property {string|null} [peerSvmName] EstablishPeeringRequest peerSvmName - * @property {Array.|null} [peerIpAddresses] EstablishPeeringRequest peerIpAddresses - * @property {string|null} [peerVolumeName] EstablishPeeringRequest peerVolumeName + * @interface IGetReplicationRequest + * @property {string|null} [name] GetReplicationRequest name */ /** - * Constructs a new EstablishPeeringRequest. + * Constructs a new GetReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents an EstablishPeeringRequest. - * @implements IEstablishPeeringRequest + * @classdesc Represents a GetReplicationRequest. + * @implements IGetReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set */ - function EstablishPeeringRequest(properties) { - this.peerIpAddresses = []; + function GetReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23616,111 +23619,70 @@ } /** - * EstablishPeeringRequest name. + * GetReplicationRequest name. * @member {string} name - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.name = ""; - - /** - * EstablishPeeringRequest peerClusterName. - * @member {string} peerClusterName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerClusterName = ""; - - /** - * EstablishPeeringRequest peerSvmName. - * @member {string} peerSvmName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerSvmName = ""; - - /** - * EstablishPeeringRequest peerIpAddresses. - * @member {Array.} peerIpAddresses - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest - * @instance - */ - EstablishPeeringRequest.prototype.peerIpAddresses = $util.emptyArray; - - /** - * EstablishPeeringRequest peerVolumeName. - * @member {string} peerVolumeName - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @instance */ - EstablishPeeringRequest.prototype.peerVolumeName = ""; + GetReplicationRequest.prototype.name = ""; /** - * Creates a new EstablishPeeringRequest instance using the specified properties. + * Creates a new GetReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest instance + * @param {google.cloud.netapp.v1.IGetReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest instance */ - EstablishPeeringRequest.create = function create(properties) { - return new EstablishPeeringRequest(properties); + GetReplicationRequest.create = function create(properties) { + return new GetReplicationRequest(properties); }; /** - * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * Encodes the specified GetReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EstablishPeeringRequest.encode = function encode(message, writer) { + GetReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); - if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); - if (message.peerIpAddresses != null && message.peerIpAddresses.length) - for (var i = 0; i < message.peerIpAddresses.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); - if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); return writer; }; /** - * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. + * Encodes the specified GetReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static - * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IGetReplicationRequest} message GetReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EstablishPeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer. + * Decodes a GetReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EstablishPeeringRequest.decode = function decode(reader, length, error) { + GetReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -23730,24 +23692,6 @@ message.name = reader.string(); break; } - case 2: { - message.peerClusterName = reader.string(); - break; - } - case 3: { - message.peerSvmName = reader.string(); - break; - } - case 4: { - if (!(message.peerIpAddresses && message.peerIpAddresses.length)) - message.peerIpAddresses = []; - message.peerIpAddresses.push(reader.string()); - break; - } - case 5: { - message.peerVolumeName = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -23757,168 +23701,126 @@ }; /** - * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. + * Decodes a GetReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EstablishPeeringRequest.decodeDelimited = function decodeDelimited(reader) { + GetReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EstablishPeeringRequest message. + * Verifies a GetReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EstablishPeeringRequest.verify = function verify(message) { + GetReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - if (!$util.isString(message.peerClusterName)) - return "peerClusterName: string expected"; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - if (!$util.isString(message.peerSvmName)) - return "peerSvmName: string expected"; - if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { - if (!Array.isArray(message.peerIpAddresses)) - return "peerIpAddresses: array expected"; - for (var i = 0; i < message.peerIpAddresses.length; ++i) - if (!$util.isString(message.peerIpAddresses[i])) - return "peerIpAddresses: string[] expected"; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - if (!$util.isString(message.peerVolumeName)) - return "peerVolumeName: string expected"; return null; }; /** - * Creates an EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest + * @returns {google.cloud.netapp.v1.GetReplicationRequest} GetReplicationRequest */ - EstablishPeeringRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.EstablishPeeringRequest) + GetReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); + var message = new $root.google.cloud.netapp.v1.GetReplicationRequest(); if (object.name != null) message.name = String(object.name); - if (object.peerClusterName != null) - message.peerClusterName = String(object.peerClusterName); - if (object.peerSvmName != null) - message.peerSvmName = String(object.peerSvmName); - if (object.peerIpAddresses) { - if (!Array.isArray(object.peerIpAddresses)) - throw TypeError(".google.cloud.netapp.v1.EstablishPeeringRequest.peerIpAddresses: array expected"); - message.peerIpAddresses = []; - for (var i = 0; i < object.peerIpAddresses.length; ++i) - message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); - } - if (object.peerVolumeName != null) - message.peerVolumeName = String(object.peerVolumeName); return message; }; /** - * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static - * @param {google.cloud.netapp.v1.EstablishPeeringRequest} message EstablishPeeringRequest + * @param {google.cloud.netapp.v1.GetReplicationRequest} message GetReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EstablishPeeringRequest.toObject = function toObject(message, options) { + GetReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.peerIpAddresses = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.peerClusterName = ""; - object.peerSvmName = ""; - object.peerVolumeName = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) - object.peerClusterName = message.peerClusterName; - if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) - object.peerSvmName = message.peerSvmName; - if (message.peerIpAddresses && message.peerIpAddresses.length) { - object.peerIpAddresses = []; - for (var j = 0; j < message.peerIpAddresses.length; ++j) - object.peerIpAddresses[j] = message.peerIpAddresses[j]; - } - if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) - object.peerVolumeName = message.peerVolumeName; return object; }; /** - * Converts this EstablishPeeringRequest to JSON. + * Converts this GetReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @instance * @returns {Object.} JSON object */ - EstablishPeeringRequest.prototype.toJSON = function toJSON() { + GetReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EstablishPeeringRequest + * Gets the default type url for GetReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @memberof google.cloud.netapp.v1.GetReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EstablishPeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishPeeringRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.GetReplicationRequest"; }; - return EstablishPeeringRequest; + return GetReplicationRequest; })(); - v1.SyncReplicationRequest = (function() { + v1.DestinationVolumeParameters = (function() { /** - * Properties of a SyncReplicationRequest. + * Properties of a DestinationVolumeParameters. * @memberof google.cloud.netapp.v1 - * @interface ISyncReplicationRequest - * @property {string|null} [name] SyncReplicationRequest name + * @interface IDestinationVolumeParameters + * @property {string|null} [storagePool] DestinationVolumeParameters storagePool + * @property {string|null} [volumeId] DestinationVolumeParameters volumeId + * @property {string|null} [shareName] DestinationVolumeParameters shareName + * @property {string|null} [description] DestinationVolumeParameters description + * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] DestinationVolumeParameters tieringPolicy */ /** - * Constructs a new SyncReplicationRequest. + * Constructs a new DestinationVolumeParameters. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a SyncReplicationRequest. - * @implements ISyncReplicationRequest + * @classdesc Represents a DestinationVolumeParameters. + * @implements IDestinationVolumeParameters * @constructor - * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set */ - function SyncReplicationRequest(properties) { + function DestinationVolumeParameters(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23926,77 +23828,148 @@ } /** - * SyncReplicationRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * DestinationVolumeParameters storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @instance */ - SyncReplicationRequest.prototype.name = ""; + DestinationVolumeParameters.prototype.storagePool = ""; /** - * Creates a new SyncReplicationRequest instance using the specified properties. + * DestinationVolumeParameters volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.volumeId = ""; + + /** + * DestinationVolumeParameters shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.shareName = ""; + + /** + * DestinationVolumeParameters description. + * @member {string|null|undefined} description + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.description = null; + + /** + * DestinationVolumeParameters tieringPolicy. + * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters + * @instance + */ + DestinationVolumeParameters.prototype.tieringPolicy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DestinationVolumeParameters.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DestinationVolumeParameters.prototype, "_tieringPolicy", { + get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DestinationVolumeParameters instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest instance + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters instance */ - SyncReplicationRequest.create = function create(properties) { - return new SyncReplicationRequest(properties); + DestinationVolumeParameters.create = function create(properties) { + return new DestinationVolumeParameters(properties); }; /** - * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * Encodes the specified DestinationVolumeParameters message. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncReplicationRequest.encode = function encode(message, writer) { + DestinationVolumeParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.storagePool); + if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shareName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) + $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * Encodes the specified DestinationVolumeParameters message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DestinationVolumeParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static - * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IDestinationVolumeParameters} message DestinationVolumeParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + DestinationVolumeParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer. + * Decodes a DestinationVolumeParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncReplicationRequest.decode = function decode(reader, length, error) { + DestinationVolumeParameters.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.storagePool = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.shareName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); break; } default: @@ -24008,224 +23981,172 @@ }; /** - * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. + * Decodes a DestinationVolumeParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + DestinationVolumeParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SyncReplicationRequest message. + * Verifies a DestinationVolumeParameters message. * @function verify - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SyncReplicationRequest.verify = function verify(message) { + DestinationVolumeParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + if (!$util.isString(message.storagePool)) + return "storagePool: string expected"; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) + return "shareName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + properties._tieringPolicy = 1; + { + var error = $root.google.cloud.netapp.v1.TieringPolicy.verify(message.tieringPolicy); + if (error) + return "tieringPolicy." + error; + } + } return null; }; /** - * Creates a SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DestinationVolumeParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @returns {google.cloud.netapp.v1.DestinationVolumeParameters} DestinationVolumeParameters */ - SyncReplicationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.SyncReplicationRequest) + DestinationVolumeParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DestinationVolumeParameters) return object; - var message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.DestinationVolumeParameters(); + if (object.storagePool != null) + message.storagePool = String(object.storagePool); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.shareName != null) + message.shareName = String(object.shareName); + if (object.description != null) + message.description = String(object.description); + if (object.tieringPolicy != null) { + if (typeof object.tieringPolicy !== "object") + throw TypeError(".google.cloud.netapp.v1.DestinationVolumeParameters.tieringPolicy: object expected"); + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.fromObject(object.tieringPolicy); + } return message; }; /** - * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. + * Creates a plain object from a DestinationVolumeParameters message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static - * @param {google.cloud.netapp.v1.SyncReplicationRequest} message SyncReplicationRequest + * @param {google.cloud.netapp.v1.DestinationVolumeParameters} message DestinationVolumeParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SyncReplicationRequest.toObject = function toObject(message, options) { + DestinationVolumeParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.storagePool = ""; + object.volumeId = ""; + object.shareName = ""; + } + if (message.storagePool != null && message.hasOwnProperty("storagePool")) + object.storagePool = message.storagePool; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.shareName != null && message.hasOwnProperty("shareName")) + object.shareName = message.shareName; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tieringPolicy != null && message.hasOwnProperty("tieringPolicy")) { + object.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.toObject(message.tieringPolicy, options); + if (options.oneofs) + object._tieringPolicy = "tieringPolicy"; + } return object; }; /** - * Converts this SyncReplicationRequest to JSON. + * Converts this DestinationVolumeParameters to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @instance * @returns {Object.} JSON object */ - SyncReplicationRequest.prototype.toJSON = function toJSON() { + DestinationVolumeParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SyncReplicationRequest + * Gets the default type url for DestinationVolumeParameters * @function getTypeUrl - * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @memberof google.cloud.netapp.v1.DestinationVolumeParameters * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SyncReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DestinationVolumeParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.SyncReplicationRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.DestinationVolumeParameters"; }; - return SyncReplicationRequest; - })(); - - /** - * Protocols enum. - * @name google.cloud.netapp.v1.Protocols - * @enum {number} - * @property {number} PROTOCOLS_UNSPECIFIED=0 PROTOCOLS_UNSPECIFIED value - * @property {number} NFSV3=1 NFSV3 value - * @property {number} NFSV4=2 NFSV4 value - * @property {number} SMB=3 SMB value - * @property {number} ISCSI=4 ISCSI value - */ - v1.Protocols = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROTOCOLS_UNSPECIFIED"] = 0; - values[valuesById[1] = "NFSV3"] = 1; - values[valuesById[2] = "NFSV4"] = 2; - values[valuesById[3] = "SMB"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * AccessType enum. - * @name google.cloud.netapp.v1.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} READ_ONLY=1 READ_ONLY value - * @property {number} READ_WRITE=2 READ_WRITE value - * @property {number} READ_NONE=3 READ_NONE value - */ - v1.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_ONLY"] = 1; - values[valuesById[2] = "READ_WRITE"] = 2; - values[valuesById[3] = "READ_NONE"] = 3; - return values; - })(); - - /** - * SMBSettings enum. - * @name google.cloud.netapp.v1.SMBSettings - * @enum {number} - * @property {number} SMB_SETTINGS_UNSPECIFIED=0 SMB_SETTINGS_UNSPECIFIED value - * @property {number} ENCRYPT_DATA=1 ENCRYPT_DATA value - * @property {number} BROWSABLE=2 BROWSABLE value - * @property {number} CHANGE_NOTIFY=3 CHANGE_NOTIFY value - * @property {number} NON_BROWSABLE=4 NON_BROWSABLE value - * @property {number} OPLOCKS=5 OPLOCKS value - * @property {number} SHOW_SNAPSHOT=6 SHOW_SNAPSHOT value - * @property {number} SHOW_PREVIOUS_VERSIONS=7 SHOW_PREVIOUS_VERSIONS value - * @property {number} ACCESS_BASED_ENUMERATION=8 ACCESS_BASED_ENUMERATION value - * @property {number} CONTINUOUSLY_AVAILABLE=9 CONTINUOUSLY_AVAILABLE value - */ - v1.SMBSettings = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SMB_SETTINGS_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENCRYPT_DATA"] = 1; - values[valuesById[2] = "BROWSABLE"] = 2; - values[valuesById[3] = "CHANGE_NOTIFY"] = 3; - values[valuesById[4] = "NON_BROWSABLE"] = 4; - values[valuesById[5] = "OPLOCKS"] = 5; - values[valuesById[6] = "SHOW_SNAPSHOT"] = 6; - values[valuesById[7] = "SHOW_PREVIOUS_VERSIONS"] = 7; - values[valuesById[8] = "ACCESS_BASED_ENUMERATION"] = 8; - values[valuesById[9] = "CONTINUOUSLY_AVAILABLE"] = 9; - return values; - })(); - - /** - * SecurityStyle enum. - * @name google.cloud.netapp.v1.SecurityStyle - * @enum {number} - * @property {number} SECURITY_STYLE_UNSPECIFIED=0 SECURITY_STYLE_UNSPECIFIED value - * @property {number} NTFS=1 NTFS value - * @property {number} UNIX=2 UNIX value - */ - v1.SecurityStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SECURITY_STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NTFS"] = 1; - values[valuesById[2] = "UNIX"] = 2; - return values; - })(); - - /** - * RestrictedAction enum. - * @name google.cloud.netapp.v1.RestrictedAction - * @enum {number} - * @property {number} RESTRICTED_ACTION_UNSPECIFIED=0 RESTRICTED_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - */ - v1.RestrictedAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESTRICTED_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - return values; + return DestinationVolumeParameters; })(); - v1.ListVolumesRequest = (function() { + v1.CreateReplicationRequest = (function() { /** - * Properties of a ListVolumesRequest. + * Properties of a CreateReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IListVolumesRequest - * @property {string|null} [parent] ListVolumesRequest parent - * @property {number|null} [pageSize] ListVolumesRequest pageSize - * @property {string|null} [pageToken] ListVolumesRequest pageToken - * @property {string|null} [filter] ListVolumesRequest filter - * @property {string|null} [orderBy] ListVolumesRequest orderBy + * @interface ICreateReplicationRequest + * @property {string|null} [parent] CreateReplicationRequest parent + * @property {google.cloud.netapp.v1.IReplication|null} [replication] CreateReplicationRequest replication + * @property {string|null} [replicationId] CreateReplicationRequest replicationId */ /** - * Constructs a new ListVolumesRequest. + * Constructs a new CreateReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListVolumesRequest. - * @implements IListVolumesRequest + * @classdesc Represents a CreateReplicationRequest. + * @implements ICreateReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set */ - function ListVolumesRequest(properties) { + function CreateReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24233,110 +24154,90 @@ } /** - * ListVolumesRequest parent. + * CreateReplicationRequest parent. * @member {string} parent - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.parent = ""; - - /** - * ListVolumesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.netapp.v1.ListVolumesRequest - * @instance - */ - ListVolumesRequest.prototype.pageSize = 0; - - /** - * ListVolumesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @instance */ - ListVolumesRequest.prototype.pageToken = ""; + CreateReplicationRequest.prototype.parent = ""; /** - * ListVolumesRequest filter. - * @member {string} filter - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * CreateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @instance */ - ListVolumesRequest.prototype.filter = ""; + CreateReplicationRequest.prototype.replication = null; /** - * ListVolumesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * CreateReplicationRequest replicationId. + * @member {string} replicationId + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @instance */ - ListVolumesRequest.prototype.orderBy = ""; + CreateReplicationRequest.prototype.replicationId = ""; /** - * Creates a new ListVolumesRequest instance using the specified properties. + * Creates a new CreateReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest instance + * @param {google.cloud.netapp.v1.ICreateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest instance */ - ListVolumesRequest.create = function create(properties) { - return new ListVolumesRequest(properties); + CreateReplicationRequest.create = function create(properties) { + return new CreateReplicationRequest(properties); }; /** - * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * Encodes the specified CreateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVolumesRequest.encode = function encode(message, writer) { + CreateReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replicationId != null && Object.hasOwnProperty.call(message, "replicationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationId); return writer; }; /** - * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * Encodes the specified CreateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {google.cloud.netapp.v1.ICreateReplicationRequest} message CreateReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVolumesRequest message from the specified reader or buffer. + * Decodes a CreateReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVolumesRequest.decode = function decode(reader, length, error) { + CreateReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -24347,19 +24248,11 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.replicationId = reader.string(); break; } default: @@ -24371,159 +24264,144 @@ }; /** - * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVolumesRequest message. + * Verifies a CreateReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVolumesRequest.verify = function verify(message) { + CreateReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + if (!$util.isString(message.replicationId)) + return "replicationId: string expected"; return null; }; /** - * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @returns {google.cloud.netapp.v1.CreateReplicationRequest} CreateReplicationRequest */ - ListVolumesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListVolumesRequest) + CreateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + var message = new $root.google.cloud.netapp.v1.CreateReplicationRequest(); 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); + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } + if (object.replicationId != null) + message.replicationId = String(object.replicationId); return message; }; /** - * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static - * @param {google.cloud.netapp.v1.ListVolumesRequest} message ListVolumesRequest + * @param {google.cloud.netapp.v1.CreateReplicationRequest} message CreateReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVolumesRequest.toObject = function toObject(message, options) { + CreateReplicationRequest.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.replication = null; + object.replicationId = ""; } 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.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); + if (message.replicationId != null && message.hasOwnProperty("replicationId")) + object.replicationId = message.replicationId; return object; }; /** - * Converts this ListVolumesRequest to JSON. + * Converts this CreateReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @instance * @returns {Object.} JSON object */ - ListVolumesRequest.prototype.toJSON = function toJSON() { + CreateReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVolumesRequest + * Gets the default type url for CreateReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @memberof google.cloud.netapp.v1.CreateReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateReplicationRequest"; }; - return ListVolumesRequest; + return CreateReplicationRequest; })(); - v1.ListVolumesResponse = (function() { + v1.DeleteReplicationRequest = (function() { /** - * Properties of a ListVolumesResponse. + * Properties of a DeleteReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IListVolumesResponse - * @property {Array.|null} [volumes] ListVolumesResponse volumes - * @property {string|null} [nextPageToken] ListVolumesResponse nextPageToken - * @property {Array.|null} [unreachable] ListVolumesResponse unreachable + * @interface IDeleteReplicationRequest + * @property {string|null} [name] DeleteReplicationRequest name */ /** - * Constructs a new ListVolumesResponse. + * Constructs a new DeleteReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a ListVolumesResponse. - * @implements IListVolumesResponse + * @classdesc Represents a DeleteReplicationRequest. + * @implements IDeleteReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set */ - function ListVolumesResponse(properties) { - this.volumes = []; - this.unreachable = []; + function DeleteReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24531,111 +24409,77 @@ } /** - * ListVolumesResponse volumes. - * @member {Array.} volumes - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - */ - ListVolumesResponse.prototype.volumes = $util.emptyArray; - - /** - * ListVolumesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.netapp.v1.ListVolumesResponse - * @instance - */ - ListVolumesResponse.prototype.nextPageToken = ""; - - /** - * ListVolumesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * DeleteReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @instance */ - ListVolumesResponse.prototype.unreachable = $util.emptyArray; + DeleteReplicationRequest.prototype.name = ""; /** - * Creates a new ListVolumesResponse instance using the specified properties. + * Creates a new DeleteReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse instance + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest instance */ - ListVolumesResponse.create = function create(properties) { - return new ListVolumesResponse(properties); + DeleteReplicationRequest.create = function create(properties) { + return new DeleteReplicationRequest(properties); }; /** - * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * Encodes the specified DeleteReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVolumesResponse.encode = function encode(message, writer) { + DeleteReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.volumes != null && message.volumes.length) - for (var i = 0; i < message.volumes.length; ++i) - $root.google.cloud.netapp.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * Encodes the specified DeleteReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static - * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {google.cloud.netapp.v1.IDeleteReplicationRequest} message DeleteReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVolumesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListVolumesResponse message from the specified reader or buffer. + * Decodes a DeleteReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVolumesResponse.decode = function decode(reader, length, error) { + DeleteReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.name = reader.string(); break; } default: @@ -24647,169 +24491,123 @@ }; /** - * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListVolumesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListVolumesResponse message. + * Verifies a DeleteReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListVolumesResponse.verify = function verify(message) { + DeleteReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.volumes != null && message.hasOwnProperty("volumes")) { - if (!Array.isArray(message.volumes)) - return "volumes: array expected"; - for (var i = 0; i < message.volumes.length; ++i) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volumes[i]); - if (error) - return "volumes." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @returns {google.cloud.netapp.v1.DeleteReplicationRequest} DeleteReplicationRequest */ - ListVolumesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.ListVolumesResponse) + DeleteReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); - if (object.volumes) { - if (!Array.isArray(object.volumes)) - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: array expected"); - message.volumes = []; - for (var i = 0; i < object.volumes.length; ++i) { - if (typeof object.volumes[i] !== "object") - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: object expected"); - message.volumes[i] = $root.google.cloud.netapp.v1.Volume.fromObject(object.volumes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.netapp.v1.DeleteReplicationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static - * @param {google.cloud.netapp.v1.ListVolumesResponse} message ListVolumesResponse + * @param {google.cloud.netapp.v1.DeleteReplicationRequest} message DeleteReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVolumesResponse.toObject = function toObject(message, options) { + DeleteReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.volumes = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.volumes && message.volumes.length) { - object.volumes = []; - for (var j = 0; j < message.volumes.length; ++j) - object.volumes[j] = $root.google.cloud.netapp.v1.Volume.toObject(message.volumes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListVolumesResponse to JSON. + * Converts this DeleteReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @instance * @returns {Object.} JSON object */ - ListVolumesResponse.prototype.toJSON = function toJSON() { + DeleteReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListVolumesResponse + * Gets the default type url for DeleteReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @memberof google.cloud.netapp.v1.DeleteReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListVolumesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesResponse"; + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteReplicationRequest"; }; - return ListVolumesResponse; + return DeleteReplicationRequest; })(); - v1.GetVolumeRequest = (function() { + v1.UpdateReplicationRequest = (function() { /** - * Properties of a GetVolumeRequest. + * Properties of an UpdateReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IGetVolumeRequest - * @property {string|null} [name] GetVolumeRequest name + * @interface IUpdateReplicationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReplicationRequest updateMask + * @property {google.cloud.netapp.v1.IReplication|null} [replication] UpdateReplicationRequest replication */ /** - * Constructs a new GetVolumeRequest. + * Constructs a new UpdateReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a GetVolumeRequest. - * @implements IGetVolumeRequest + * @classdesc Represents an UpdateReplicationRequest. + * @implements IUpdateReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set */ - function GetVolumeRequest(properties) { + function UpdateReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24817,77 +24615,91 @@ } /** - * GetVolumeRequest name. - * @member {string} name - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * UpdateReplicationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @instance */ - GetVolumeRequest.prototype.name = ""; + UpdateReplicationRequest.prototype.updateMask = null; /** - * Creates a new GetVolumeRequest instance using the specified properties. + * UpdateReplicationRequest replication. + * @member {google.cloud.netapp.v1.IReplication|null|undefined} replication + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest + * @instance + */ + UpdateReplicationRequest.prototype.replication = null; + + /** + * Creates a new UpdateReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest instance + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest instance */ - GetVolumeRequest.create = function create(properties) { - return new GetVolumeRequest(properties); + UpdateReplicationRequest.create = function create(properties) { + return new UpdateReplicationRequest(properties); }; /** - * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * Encodes the specified UpdateReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVolumeRequest.encode = function encode(message, writer) { + UpdateReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.replication != null && Object.hasOwnProperty.call(message, "replication")) + $root.google.cloud.netapp.v1.Replication.encode(message.replication, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * Encodes the specified UpdateReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static - * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IUpdateReplicationRequest} message UpdateReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetVolumeRequest message from the specified reader or buffer. + * Decodes an UpdateReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVolumeRequest.decode = function decode(reader, length, error) { + UpdateReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.replication = $root.google.cloud.netapp.v1.Replication.decode(reader, reader.uint32()); break; } default: @@ -24899,124 +24711,142 @@ }; /** - * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetVolumeRequest message. + * Verifies an UpdateReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetVolumeRequest.verify = function verify(message) { + UpdateReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.replication != null && message.hasOwnProperty("replication")) { + var error = $root.google.cloud.netapp.v1.Replication.verify(message.replication); + if (error) + return "replication." + error; + } return null; }; /** - * Creates a GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + * @returns {google.cloud.netapp.v1.UpdateReplicationRequest} UpdateReplicationRequest */ - GetVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.GetVolumeRequest) + UpdateReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.netapp.v1.UpdateReplicationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.replication != null) { + if (typeof object.replication !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateReplicationRequest.replication: object expected"); + message.replication = $root.google.cloud.netapp.v1.Replication.fromObject(object.replication); + } return message; }; /** - * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static - * @param {google.cloud.netapp.v1.GetVolumeRequest} message GetVolumeRequest + * @param {google.cloud.netapp.v1.UpdateReplicationRequest} message UpdateReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVolumeRequest.toObject = function toObject(message, options) { + UpdateReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.updateMask = null; + object.replication = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.replication != null && message.hasOwnProperty("replication")) + object.replication = $root.google.cloud.netapp.v1.Replication.toObject(message.replication, options); return object; }; /** - * Converts this GetVolumeRequest to JSON. + * Converts this UpdateReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @instance * @returns {Object.} JSON object */ - GetVolumeRequest.prototype.toJSON = function toJSON() { + UpdateReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetVolumeRequest + * Gets the default type url for UpdateReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @memberof google.cloud.netapp.v1.UpdateReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.GetVolumeRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateReplicationRequest"; }; - return GetVolumeRequest; + return UpdateReplicationRequest; })(); - v1.CreateVolumeRequest = (function() { + v1.StopReplicationRequest = (function() { /** - * Properties of a CreateVolumeRequest. + * Properties of a StopReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface ICreateVolumeRequest - * @property {string|null} [parent] CreateVolumeRequest parent - * @property {string|null} [volumeId] CreateVolumeRequest volumeId - * @property {google.cloud.netapp.v1.IVolume|null} [volume] CreateVolumeRequest volume + * @interface IStopReplicationRequest + * @property {string|null} [name] StopReplicationRequest name + * @property {boolean|null} [force] StopReplicationRequest force */ /** - * Constructs a new CreateVolumeRequest. + * Constructs a new StopReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a CreateVolumeRequest. - * @implements ICreateVolumeRequest + * @classdesc Represents a StopReplicationRequest. + * @implements IStopReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set */ - function CreateVolumeRequest(properties) { + function StopReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25024,105 +24854,91 @@ } /** - * CreateVolumeRequest parent. - * @member {string} parent - * @memberof google.cloud.netapp.v1.CreateVolumeRequest - * @instance - */ - CreateVolumeRequest.prototype.parent = ""; - - /** - * CreateVolumeRequest volumeId. - * @member {string} volumeId - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * StopReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @instance */ - CreateVolumeRequest.prototype.volumeId = ""; + StopReplicationRequest.prototype.name = ""; /** - * CreateVolumeRequest volume. - * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * StopReplicationRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @instance */ - CreateVolumeRequest.prototype.volume = null; + StopReplicationRequest.prototype.force = false; /** - * Creates a new CreateVolumeRequest instance using the specified properties. + * Creates a new StopReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest instance + * @param {google.cloud.netapp.v1.IStopReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest instance */ - CreateVolumeRequest.create = function create(properties) { - return new CreateVolumeRequest(properties); + StopReplicationRequest.create = function create(properties) { + return new StopReplicationRequest(properties); }; /** - * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * Encodes the specified StopReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVolumeRequest.encode = function encode(message, writer) { + StopReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); - if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) - $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * Encodes the specified StopReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.StopReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static - * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IStopReplicationRequest} message StopReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + StopReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * Decodes a StopReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVolumeRequest.decode = function decode(reader, length, error) { + StopReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.volumeId = reader.string(); - break; - } - case 3: { - message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + message.force = reader.bool(); break; } default: @@ -25134,145 +24950,131 @@ }; /** - * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * Decodes a StopReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + StopReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateVolumeRequest message. + * Verifies a StopReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateVolumeRequest.verify = function verify(message) { + StopReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - if (!$util.isString(message.volumeId)) - return "volumeId: string expected"; - if (message.volume != null && message.hasOwnProperty("volume")) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); - if (error) - return "volume." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StopReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @returns {google.cloud.netapp.v1.StopReplicationRequest} StopReplicationRequest */ - CreateVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.CreateVolumeRequest) + StopReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.StopReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.volumeId != null) - message.volumeId = String(object.volumeId); - if (object.volume != null) { - if (typeof object.volume !== "object") - throw TypeError(".google.cloud.netapp.v1.CreateVolumeRequest.volume: object expected"); - message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); - } + var message = new $root.google.cloud.netapp.v1.StopReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * Creates a plain object from a StopReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static - * @param {google.cloud.netapp.v1.CreateVolumeRequest} message CreateVolumeRequest + * @param {google.cloud.netapp.v1.StopReplicationRequest} message StopReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateVolumeRequest.toObject = function toObject(message, options) { + StopReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.volumeId = ""; - object.volume = null; + object.name = ""; + object.force = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.volumeId != null && message.hasOwnProperty("volumeId")) - object.volumeId = message.volumeId; - if (message.volume != null && message.hasOwnProperty("volume")) - object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this CreateVolumeRequest to JSON. + * Converts this StopReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @instance * @returns {Object.} JSON object */ - CreateVolumeRequest.prototype.toJSON = function toJSON() { + StopReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateVolumeRequest + * Gets the default type url for StopReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @memberof google.cloud.netapp.v1.StopReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StopReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.CreateVolumeRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.StopReplicationRequest"; }; - return CreateVolumeRequest; + return StopReplicationRequest; })(); - v1.UpdateVolumeRequest = (function() { + v1.ResumeReplicationRequest = (function() { /** - * Properties of an UpdateVolumeRequest. + * Properties of a ResumeReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IUpdateVolumeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVolumeRequest updateMask - * @property {google.cloud.netapp.v1.IVolume|null} [volume] UpdateVolumeRequest volume + * @interface IResumeReplicationRequest + * @property {string|null} [name] ResumeReplicationRequest name */ /** - * Constructs a new UpdateVolumeRequest. + * Constructs a new ResumeReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents an UpdateVolumeRequest. - * @implements IUpdateVolumeRequest + * @classdesc Represents a ResumeReplicationRequest. + * @implements IResumeReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set */ - function UpdateVolumeRequest(properties) { + function ResumeReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25280,91 +25082,77 @@ } /** - * UpdateVolumeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest - * @instance - */ - UpdateVolumeRequest.prototype.updateMask = null; - - /** - * UpdateVolumeRequest volume. - * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * ResumeReplicationRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @instance */ - UpdateVolumeRequest.prototype.volume = null; + ResumeReplicationRequest.prototype.name = ""; /** - * Creates a new UpdateVolumeRequest instance using the specified properties. + * Creates a new ResumeReplicationRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest instance + * @param {google.cloud.netapp.v1.IResumeReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest instance */ - UpdateVolumeRequest.create = function create(properties) { - return new UpdateVolumeRequest(properties); + ResumeReplicationRequest.create = function create(properties) { + return new ResumeReplicationRequest(properties); }; /** - * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * Encodes the specified ResumeReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateVolumeRequest.encode = function encode(message, writer) { + ResumeReplicationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) - $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * Encodes the specified ResumeReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ResumeReplicationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static - * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IResumeReplicationRequest} message ResumeReplicationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ResumeReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * Decodes a ResumeReplicationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateVolumeRequest.decode = function decode(reader, length, error) { + ResumeReplicationRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -25376,142 +25164,122 @@ }; /** - * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * Decodes a ResumeReplicationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + ResumeReplicationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateVolumeRequest message. + * Verifies a ResumeReplicationRequest message. * @function verify - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateVolumeRequest.verify = function verify(message) { + ResumeReplicationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.volume != null && message.hasOwnProperty("volume")) { - var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); - if (error) - return "volume." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResumeReplicationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @returns {google.cloud.netapp.v1.ResumeReplicationRequest} ResumeReplicationRequest */ - UpdateVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.UpdateVolumeRequest) + ResumeReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ResumeReplicationRequest) return object; - var message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.volume != null) { - if (typeof object.volume !== "object") - throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.volume: object expected"); - message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); - } + var message = new $root.google.cloud.netapp.v1.ResumeReplicationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResumeReplicationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static - * @param {google.cloud.netapp.v1.UpdateVolumeRequest} message UpdateVolumeRequest + * @param {google.cloud.netapp.v1.ResumeReplicationRequest} message ResumeReplicationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateVolumeRequest.toObject = function toObject(message, options) { + ResumeReplicationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.volume = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.volume != null && message.hasOwnProperty("volume")) - object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateVolumeRequest to JSON. + * Converts this ResumeReplicationRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @instance * @returns {Object.} JSON object */ - UpdateVolumeRequest.prototype.toJSON = function toJSON() { + ResumeReplicationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateVolumeRequest + * Gets the default type url for ResumeReplicationRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @memberof google.cloud.netapp.v1.ResumeReplicationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResumeReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateVolumeRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ResumeReplicationRequest"; }; - return UpdateVolumeRequest; + return ResumeReplicationRequest; })(); - v1.DeleteVolumeRequest = (function() { + v1.ReverseReplicationDirectionRequest = (function() { /** - * Properties of a DeleteVolumeRequest. + * Properties of a ReverseReplicationDirectionRequest. * @memberof google.cloud.netapp.v1 - * @interface IDeleteVolumeRequest - * @property {string|null} [name] DeleteVolumeRequest name - * @property {boolean|null} [force] DeleteVolumeRequest force + * @interface IReverseReplicationDirectionRequest + * @property {string|null} [name] ReverseReplicationDirectionRequest name */ /** - * Constructs a new DeleteVolumeRequest. + * Constructs a new ReverseReplicationDirectionRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a DeleteVolumeRequest. - * @implements IDeleteVolumeRequest + * @classdesc Represents a ReverseReplicationDirectionRequest. + * @implements IReverseReplicationDirectionRequest * @constructor - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set */ - function DeleteVolumeRequest(properties) { + function ReverseReplicationDirectionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25519,80 +25287,70 @@ } /** - * DeleteVolumeRequest name. + * ReverseReplicationDirectionRequest name. * @member {string} name - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest - * @instance - */ - DeleteVolumeRequest.prototype.name = ""; - - /** - * DeleteVolumeRequest force. - * @member {boolean} force - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @instance */ - DeleteVolumeRequest.prototype.force = false; + ReverseReplicationDirectionRequest.prototype.name = ""; /** - * Creates a new DeleteVolumeRequest instance using the specified properties. + * Creates a new ReverseReplicationDirectionRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest instance + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest instance */ - DeleteVolumeRequest.create = function create(properties) { - return new DeleteVolumeRequest(properties); + ReverseReplicationDirectionRequest.create = function create(properties) { + return new ReverseReplicationDirectionRequest(properties); }; /** - * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * Encodes the specified ReverseReplicationDirectionRequest message. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVolumeRequest.encode = function encode(message, writer) { + ReverseReplicationDirectionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); return writer; }; /** - * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * Encodes the specified ReverseReplicationDirectionRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ReverseReplicationDirectionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static - * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ReverseReplicationDirectionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteVolumeRequest.decode = function decode(reader, length, error) { + ReverseReplicationDirectionRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -25602,10 +25360,6 @@ message.name = reader.string(); break; } - case 2: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -25615,132 +25369,127 @@ }; /** - * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * Decodes a ReverseReplicationDirectionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + ReverseReplicationDirectionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteVolumeRequest message. + * Verifies a ReverseReplicationDirectionRequest message. * @function verify - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteVolumeRequest.verify = function verify(message) { + ReverseReplicationDirectionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReverseReplicationDirectionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @returns {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} ReverseReplicationDirectionRequest */ - DeleteVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.DeleteVolumeRequest) + ReverseReplicationDirectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) return object; - var message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + var message = new $root.google.cloud.netapp.v1.ReverseReplicationDirectionRequest(); if (object.name != null) message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ReverseReplicationDirectionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static - * @param {google.cloud.netapp.v1.DeleteVolumeRequest} message DeleteVolumeRequest + * @param {google.cloud.netapp.v1.ReverseReplicationDirectionRequest} message ReverseReplicationDirectionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteVolumeRequest.toObject = function toObject(message, options) { + ReverseReplicationDirectionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.force = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteVolumeRequest to JSON. + * Converts this ReverseReplicationDirectionRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @instance * @returns {Object.} JSON object */ - DeleteVolumeRequest.prototype.toJSON = function toJSON() { + ReverseReplicationDirectionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteVolumeRequest + * Gets the default type url for ReverseReplicationDirectionRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @memberof google.cloud.netapp.v1.ReverseReplicationDirectionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReverseReplicationDirectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteVolumeRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.ReverseReplicationDirectionRequest"; }; - return DeleteVolumeRequest; + return ReverseReplicationDirectionRequest; })(); - v1.RevertVolumeRequest = (function() { + v1.EstablishPeeringRequest = (function() { /** - * Properties of a RevertVolumeRequest. + * Properties of an EstablishPeeringRequest. * @memberof google.cloud.netapp.v1 - * @interface IRevertVolumeRequest - * @property {string|null} [name] RevertVolumeRequest name - * @property {string|null} [snapshotId] RevertVolumeRequest snapshotId + * @interface IEstablishPeeringRequest + * @property {string|null} [name] EstablishPeeringRequest name + * @property {string|null} [peerClusterName] EstablishPeeringRequest peerClusterName + * @property {string|null} [peerSvmName] EstablishPeeringRequest peerSvmName + * @property {Array.|null} [peerIpAddresses] EstablishPeeringRequest peerIpAddresses + * @property {string|null} [peerVolumeName] EstablishPeeringRequest peerVolumeName */ /** - * Constructs a new RevertVolumeRequest. + * Constructs a new EstablishPeeringRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a RevertVolumeRequest. - * @implements IRevertVolumeRequest + * @classdesc Represents an EstablishPeeringRequest. + * @implements IEstablishPeeringRequest * @constructor - * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set */ - function RevertVolumeRequest(properties) { + function EstablishPeeringRequest(properties) { + this.peerIpAddresses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25748,80 +25497,111 @@ } /** - * RevertVolumeRequest name. + * EstablishPeeringRequest name. * @member {string} name - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @instance */ - RevertVolumeRequest.prototype.name = ""; + EstablishPeeringRequest.prototype.name = ""; /** - * RevertVolumeRequest snapshotId. - * @member {string} snapshotId - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * EstablishPeeringRequest peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @instance */ - RevertVolumeRequest.prototype.snapshotId = ""; + EstablishPeeringRequest.prototype.peerClusterName = ""; /** - * Creates a new RevertVolumeRequest instance using the specified properties. + * EstablishPeeringRequest peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerSvmName = ""; + + /** + * EstablishPeeringRequest peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerIpAddresses = $util.emptyArray; + + /** + * EstablishPeeringRequest peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest + * @instance + */ + EstablishPeeringRequest.prototype.peerVolumeName = ""; + + /** + * Creates a new EstablishPeeringRequest instance using the specified properties. * @function create - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest instance + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest instance */ - RevertVolumeRequest.create = function create(properties) { - return new RevertVolumeRequest(properties); + EstablishPeeringRequest.create = function create(properties) { + return new EstablishPeeringRequest(properties); }; /** - * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * Encodes the specified EstablishPeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RevertVolumeRequest.encode = function encode(message, writer) { + EstablishPeeringRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotId); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); return writer; }; /** - * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * Encodes the specified EstablishPeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishPeeringRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static - * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {google.cloud.netapp.v1.IEstablishPeeringRequest} message EstablishPeeringRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RevertVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + EstablishPeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * Decodes an EstablishPeeringRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RevertVolumeRequest.decode = function decode(reader, length, error) { + EstablishPeeringRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -25832,7 +25612,21 @@ break; } case 2: { - message.snapshotId = reader.string(); + message.peerClusterName = reader.string(); + break; + } + case 3: { + message.peerSvmName = reader.string(); + break; + } + case 4: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 5: { + message.peerVolumeName = reader.string(); break; } default: @@ -25844,178 +25638,168 @@ }; /** - * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * Decodes an EstablishPeeringRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RevertVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + EstablishPeeringRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RevertVolumeRequest message. + * Verifies an EstablishPeeringRequest message. * @function verify - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RevertVolumeRequest.verify = function verify(message) { + EstablishPeeringRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - if (!$util.isString(message.snapshotId)) - return "snapshotId: string expected"; - return null; - }; - - /** - * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + return null; + }; + + /** + * Creates an EstablishPeeringRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @returns {google.cloud.netapp.v1.EstablishPeeringRequest} EstablishPeeringRequest */ - RevertVolumeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.netapp.v1.RevertVolumeRequest) + EstablishPeeringRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EstablishPeeringRequest) return object; - var message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + var message = new $root.google.cloud.netapp.v1.EstablishPeeringRequest(); if (object.name != null) message.name = String(object.name); - if (object.snapshotId != null) - message.snapshotId = String(object.snapshotId); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.EstablishPeeringRequest.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); return message; }; /** - * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * Creates a plain object from an EstablishPeeringRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static - * @param {google.cloud.netapp.v1.RevertVolumeRequest} message RevertVolumeRequest + * @param {google.cloud.netapp.v1.EstablishPeeringRequest} message EstablishPeeringRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RevertVolumeRequest.toObject = function toObject(message, options) { + EstablishPeeringRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; if (options.defaults) { object.name = ""; - object.snapshotId = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.peerVolumeName = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) - object.snapshotId = message.snapshotId; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; return object; }; /** - * Converts this RevertVolumeRequest to JSON. + * Converts this EstablishPeeringRequest to JSON. * @function toJSON - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @instance * @returns {Object.} JSON object */ - RevertVolumeRequest.prototype.toJSON = function toJSON() { + EstablishPeeringRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RevertVolumeRequest + * Gets the default type url for EstablishPeeringRequest * @function getTypeUrl - * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @memberof google.cloud.netapp.v1.EstablishPeeringRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RevertVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EstablishPeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.netapp.v1.RevertVolumeRequest"; + return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishPeeringRequest"; }; - return RevertVolumeRequest; + return EstablishPeeringRequest; })(); - v1.Volume = (function() { + v1.SyncReplicationRequest = (function() { /** - * Properties of a Volume. + * Properties of a SyncReplicationRequest. * @memberof google.cloud.netapp.v1 - * @interface IVolume - * @property {string|null} [name] Volume name - * @property {google.cloud.netapp.v1.Volume.State|null} [state] Volume state - * @property {string|null} [stateDetails] Volume stateDetails - * @property {google.protobuf.ITimestamp|null} [createTime] Volume createTime - * @property {string|null} [shareName] Volume shareName - * @property {string|null} [psaRange] Volume psaRange - * @property {string|null} [storagePool] Volume storagePool - * @property {string|null} [network] Volume network - * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] Volume serviceLevel - * @property {number|Long|null} [capacityGib] Volume capacityGib - * @property {google.cloud.netapp.v1.IExportPolicy|null} [exportPolicy] Volume exportPolicy - * @property {Array.|null} [protocols] Volume protocols - * @property {Array.|null} [smbSettings] Volume smbSettings - * @property {Array.|null} [mountOptions] Volume mountOptions - * @property {string|null} [unixPermissions] Volume unixPermissions - * @property {Object.|null} [labels] Volume labels - * @property {string|null} [description] Volume description - * @property {google.cloud.netapp.v1.ISnapshotPolicy|null} [snapshotPolicy] Volume snapshotPolicy - * @property {number|null} [snapReserve] Volume snapReserve - * @property {boolean|null} [snapshotDirectory] Volume snapshotDirectory - * @property {number|Long|null} [usedGib] Volume usedGib - * @property {google.cloud.netapp.v1.SecurityStyle|null} [securityStyle] Volume securityStyle - * @property {boolean|null} [kerberosEnabled] Volume kerberosEnabled - * @property {boolean|null} [ldapEnabled] Volume ldapEnabled - * @property {string|null} [activeDirectory] Volume activeDirectory - * @property {google.cloud.netapp.v1.IRestoreParameters|null} [restoreParameters] Volume restoreParameters - * @property {string|null} [kmsConfig] Volume kmsConfig - * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] Volume encryptionType - * @property {boolean|null} [hasReplication] Volume hasReplication - * @property {google.cloud.netapp.v1.IBackupConfig|null} [backupConfig] Volume backupConfig - * @property {Array.|null} [restrictedActions] Volume restrictedActions - * @property {boolean|null} [largeCapacity] Volume largeCapacity - * @property {boolean|null} [multipleEndpoints] Volume multipleEndpoints - * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] Volume tieringPolicy - * @property {string|null} [replicaZone] Volume replicaZone - * @property {string|null} [zone] Volume zone - * @property {number|Long|null} [coldTierSizeGib] Volume coldTierSizeGib - * @property {google.cloud.netapp.v1.IHybridReplicationParameters|null} [hybridReplicationParameters] Volume hybridReplicationParameters - * @property {number|null} [throughputMibps] Volume throughputMibps - * @property {google.cloud.netapp.v1.ICacheParameters|null} [cacheParameters] Volume cacheParameters - * @property {number|Long|null} [hotTierSizeUsedGib] Volume hotTierSizeUsedGib - * @property {Array.|null} [blockDevices] Volume blockDevices + * @interface ISyncReplicationRequest + * @property {string|null} [name] SyncReplicationRequest name */ /** - * Constructs a new Volume. + * Constructs a new SyncReplicationRequest. * @memberof google.cloud.netapp.v1 - * @classdesc Represents a Volume. - * @implements IVolume + * @classdesc Represents a SyncReplicationRequest. + * @implements ISyncReplicationRequest * @constructor - * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set */ - function Volume(properties) { - this.protocols = []; - this.smbSettings = []; - this.mountOptions = []; - this.labels = {}; - this.restrictedActions = []; - this.blockDevices = []; + function SyncReplicationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26023,510 +25807,961 @@ } /** - * Volume name. + * SyncReplicationRequest name. * @member {string} name - * @memberof google.cloud.netapp.v1.Volume + * @memberof google.cloud.netapp.v1.SyncReplicationRequest * @instance */ - Volume.prototype.name = ""; + SyncReplicationRequest.prototype.name = ""; /** - * Volume state. - * @member {google.cloud.netapp.v1.Volume.State} state - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a new SyncReplicationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest instance */ - Volume.prototype.state = 0; + SyncReplicationRequest.create = function create(properties) { + return new SyncReplicationRequest(properties); + }; /** - * Volume stateDetails. - * @member {string} stateDetails - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified SyncReplicationRequest message. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.stateDetails = ""; + SyncReplicationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; /** - * Volume createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified SyncReplicationRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.SyncReplicationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.ISyncReplicationRequest} message SyncReplicationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.createTime = null; + SyncReplicationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Volume shareName. - * @member {string} shareName - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a SyncReplicationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.shareName = ""; + SyncReplicationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Volume psaRange. - * @member {string} psaRange - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a SyncReplicationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.psaRange = ""; + SyncReplicationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Volume storagePool. - * @member {string} storagePool - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Verifies a SyncReplicationRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Volume.prototype.storagePool = ""; + SyncReplicationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; /** - * Volume network. - * @member {string} network - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a SyncReplicationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.SyncReplicationRequest} SyncReplicationRequest */ - Volume.prototype.network = ""; + SyncReplicationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.SyncReplicationRequest) + return object; + var message = new $root.google.cloud.netapp.v1.SyncReplicationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Volume serviceLevel. - * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a plain object from a SyncReplicationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {google.cloud.netapp.v1.SyncReplicationRequest} message SyncReplicationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Volume.prototype.serviceLevel = 0; + SyncReplicationRequest.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; + }; /** - * Volume capacityGib. - * @member {number|Long} capacityGib - * @memberof google.cloud.netapp.v1.Volume + * Converts this SyncReplicationRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.SyncReplicationRequest * @instance + * @returns {Object.} JSON object */ - Volume.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncReplicationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Volume exportPolicy. - * @member {google.cloud.netapp.v1.IExportPolicy|null|undefined} exportPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Gets the default type url for SyncReplicationRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.SyncReplicationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Volume.prototype.exportPolicy = null; + SyncReplicationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.SyncReplicationRequest"; + }; + + return SyncReplicationRequest; + })(); + + /** + * Protocols enum. + * @name google.cloud.netapp.v1.Protocols + * @enum {number} + * @property {number} PROTOCOLS_UNSPECIFIED=0 PROTOCOLS_UNSPECIFIED value + * @property {number} NFSV3=1 NFSV3 value + * @property {number} NFSV4=2 NFSV4 value + * @property {number} SMB=3 SMB value + * @property {number} ISCSI=4 ISCSI value + */ + v1.Protocols = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROTOCOLS_UNSPECIFIED"] = 0; + values[valuesById[1] = "NFSV3"] = 1; + values[valuesById[2] = "NFSV4"] = 2; + values[valuesById[3] = "SMB"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * AccessType enum. + * @name google.cloud.netapp.v1.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} READ_ONLY=1 READ_ONLY value + * @property {number} READ_WRITE=2 READ_WRITE value + * @property {number} READ_NONE=3 READ_NONE value + */ + v1.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_ONLY"] = 1; + values[valuesById[2] = "READ_WRITE"] = 2; + values[valuesById[3] = "READ_NONE"] = 3; + return values; + })(); + + /** + * SMBSettings enum. + * @name google.cloud.netapp.v1.SMBSettings + * @enum {number} + * @property {number} SMB_SETTINGS_UNSPECIFIED=0 SMB_SETTINGS_UNSPECIFIED value + * @property {number} ENCRYPT_DATA=1 ENCRYPT_DATA value + * @property {number} BROWSABLE=2 BROWSABLE value + * @property {number} CHANGE_NOTIFY=3 CHANGE_NOTIFY value + * @property {number} NON_BROWSABLE=4 NON_BROWSABLE value + * @property {number} OPLOCKS=5 OPLOCKS value + * @property {number} SHOW_SNAPSHOT=6 SHOW_SNAPSHOT value + * @property {number} SHOW_PREVIOUS_VERSIONS=7 SHOW_PREVIOUS_VERSIONS value + * @property {number} ACCESS_BASED_ENUMERATION=8 ACCESS_BASED_ENUMERATION value + * @property {number} CONTINUOUSLY_AVAILABLE=9 CONTINUOUSLY_AVAILABLE value + */ + v1.SMBSettings = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SMB_SETTINGS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPT_DATA"] = 1; + values[valuesById[2] = "BROWSABLE"] = 2; + values[valuesById[3] = "CHANGE_NOTIFY"] = 3; + values[valuesById[4] = "NON_BROWSABLE"] = 4; + values[valuesById[5] = "OPLOCKS"] = 5; + values[valuesById[6] = "SHOW_SNAPSHOT"] = 6; + values[valuesById[7] = "SHOW_PREVIOUS_VERSIONS"] = 7; + values[valuesById[8] = "ACCESS_BASED_ENUMERATION"] = 8; + values[valuesById[9] = "CONTINUOUSLY_AVAILABLE"] = 9; + return values; + })(); + + /** + * SecurityStyle enum. + * @name google.cloud.netapp.v1.SecurityStyle + * @enum {number} + * @property {number} SECURITY_STYLE_UNSPECIFIED=0 SECURITY_STYLE_UNSPECIFIED value + * @property {number} NTFS=1 NTFS value + * @property {number} UNIX=2 UNIX value + */ + v1.SecurityStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECURITY_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NTFS"] = 1; + values[valuesById[2] = "UNIX"] = 2; + return values; + })(); + + /** + * RestrictedAction enum. + * @name google.cloud.netapp.v1.RestrictedAction + * @enum {number} + * @property {number} RESTRICTED_ACTION_UNSPECIFIED=0 RESTRICTED_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + */ + v1.RestrictedAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + return values; + })(); + + v1.ListVolumesRequest = (function() { /** - * Volume protocols. - * @member {Array.} protocols - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Properties of a ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesRequest + * @property {string|null} [parent] ListVolumesRequest parent + * @property {number|null} [pageSize] ListVolumesRequest pageSize + * @property {string|null} [pageToken] ListVolumesRequest pageToken + * @property {string|null} [filter] ListVolumesRequest filter + * @property {string|null} [orderBy] ListVolumesRequest orderBy */ - Volume.prototype.protocols = $util.emptyArray; /** - * Volume smbSettings. - * @member {Array.} smbSettings - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Constructs a new ListVolumesRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesRequest. + * @implements IListVolumesRequest + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set */ - Volume.prototype.smbSettings = $util.emptyArray; + function ListVolumesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Volume mountOptions. - * @member {Array.} mountOptions - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance */ - Volume.prototype.mountOptions = $util.emptyArray; + ListVolumesRequest.prototype.parent = ""; /** - * Volume unixPermissions. - * @member {string} unixPermissions - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance */ - Volume.prototype.unixPermissions = ""; + ListVolumesRequest.prototype.pageSize = 0; /** - * Volume labels. - * @member {Object.} labels - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance */ - Volume.prototype.labels = $util.emptyObject; + ListVolumesRequest.prototype.pageToken = ""; /** - * Volume description. - * @member {string} description - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesRequest filter. + * @member {string} filter + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance */ - Volume.prototype.description = ""; - - /** - * Volume snapshotPolicy. - * @member {google.cloud.netapp.v1.ISnapshotPolicy|null|undefined} snapshotPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.snapshotPolicy = null; - - /** - * Volume snapReserve. - * @member {number} snapReserve - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.snapReserve = 0; + ListVolumesRequest.prototype.filter = ""; /** - * Volume snapshotDirectory. - * @member {boolean} snapshotDirectory - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance */ - Volume.prototype.snapshotDirectory = false; + ListVolumesRequest.prototype.orderBy = ""; /** - * Volume usedGib. - * @member {number|Long} usedGib - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a new ListVolumesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest instance */ - Volume.prototype.usedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListVolumesRequest.create = function create(properties) { + return new ListVolumesRequest(properties); + }; /** - * Volume securityStyle. - * @member {google.cloud.netapp.v1.SecurityStyle} securityStyle - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified ListVolumesRequest message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.securityStyle = 0; + ListVolumesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Volume kerberosEnabled. - * @member {boolean} kerberosEnabled - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified ListVolumesRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.IListVolumesRequest} message ListVolumesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.kerberosEnabled = false; + ListVolumesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Volume ldapEnabled. - * @member {boolean} ldapEnabled - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a ListVolumesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.ldapEnabled = false; + ListVolumesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Volume activeDirectory. - * @member {string} activeDirectory - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a ListVolumesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.activeDirectory = ""; + ListVolumesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Volume restoreParameters. - * @member {google.cloud.netapp.v1.IRestoreParameters|null|undefined} restoreParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Verifies a ListVolumesRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Volume.prototype.restoreParameters = null; + ListVolumesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Volume kmsConfig. - * @member {string} kmsConfig - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a ListVolumesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesRequest} ListVolumesRequest */ - Volume.prototype.kmsConfig = ""; + ListVolumesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesRequest) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesRequest(); + 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; + }; /** - * Volume encryptionType. - * @member {google.cloud.netapp.v1.EncryptionType} encryptionType - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a plain object from a ListVolumesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {google.cloud.netapp.v1.ListVolumesRequest} message ListVolumesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Volume.prototype.encryptionType = 0; + ListVolumesRequest.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; + }; /** - * Volume hasReplication. - * @member {boolean} hasReplication - * @memberof google.cloud.netapp.v1.Volume + * Converts this ListVolumesRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesRequest * @instance + * @returns {Object.} JSON object */ - Volume.prototype.hasReplication = false; + ListVolumesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Volume backupConfig. - * @member {google.cloud.netapp.v1.IBackupConfig|null|undefined} backupConfig - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Gets the default type url for ListVolumesRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Volume.prototype.backupConfig = null; + ListVolumesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesRequest"; + }; - /** - * Volume restrictedActions. - * @member {Array.} restrictedActions - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.restrictedActions = $util.emptyArray; + return ListVolumesRequest; + })(); - /** - * Volume largeCapacity. - * @member {boolean} largeCapacity - * @memberof google.cloud.netapp.v1.Volume - * @instance - */ - Volume.prototype.largeCapacity = false; + v1.ListVolumesResponse = (function() { /** - * Volume multipleEndpoints. - * @member {boolean} multipleEndpoints - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Properties of a ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @interface IListVolumesResponse + * @property {Array.|null} [volumes] ListVolumesResponse volumes + * @property {string|null} [nextPageToken] ListVolumesResponse nextPageToken + * @property {Array.|null} [unreachable] ListVolumesResponse unreachable */ - Volume.prototype.multipleEndpoints = false; /** - * Volume tieringPolicy. - * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Constructs a new ListVolumesResponse. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a ListVolumesResponse. + * @implements IListVolumesResponse + * @constructor + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set */ - Volume.prototype.tieringPolicy = null; + function ListVolumesResponse(properties) { + this.volumes = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Volume replicaZone. - * @member {string} replicaZone - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesResponse volumes. + * @member {Array.} volumes + * @memberof google.cloud.netapp.v1.ListVolumesResponse * @instance */ - Volume.prototype.replicaZone = ""; + ListVolumesResponse.prototype.volumes = $util.emptyArray; /** - * Volume zone. - * @member {string} zone - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.netapp.v1.ListVolumesResponse * @instance */ - Volume.prototype.zone = ""; + ListVolumesResponse.prototype.nextPageToken = ""; /** - * Volume coldTierSizeGib. - * @member {number|Long} coldTierSizeGib - * @memberof google.cloud.netapp.v1.Volume + * ListVolumesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.netapp.v1.ListVolumesResponse * @instance */ - Volume.prototype.coldTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListVolumesResponse.prototype.unreachable = $util.emptyArray; /** - * Volume hybridReplicationParameters. - * @member {google.cloud.netapp.v1.IHybridReplicationParameters|null|undefined} hybridReplicationParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Creates a new ListVolumesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse instance */ - Volume.prototype.hybridReplicationParameters = null; + ListVolumesResponse.create = function create(properties) { + return new ListVolumesResponse(properties); + }; /** - * Volume throughputMibps. - * @member {number} throughputMibps - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified ListVolumesResponse message. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.throughputMibps = 0; + ListVolumesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.cloud.netapp.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; /** - * Volume cacheParameters. - * @member {google.cloud.netapp.v1.ICacheParameters|null|undefined} cacheParameters - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Encodes the specified ListVolumesResponse message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.ListVolumesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.IListVolumesResponse} message ListVolumesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Volume.prototype.cacheParameters = null; + ListVolumesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Volume hotTierSizeUsedGib. - * @member {number|Long} hotTierSizeUsedGib - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a ListVolumesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListVolumesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Volume blockDevices. - * @member {Array.} blockDevices - * @memberof google.cloud.netapp.v1.Volume - * @instance + * Decodes a ListVolumesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.prototype.blockDevices = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Volume.prototype, "_backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["backupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Volume.prototype, "_tieringPolicy", { - get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListVolumesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Creates a new Volume instance using the specified properties. - * @function create - * @memberof google.cloud.netapp.v1.Volume + * Verifies a ListVolumesResponse message. + * @function verify + * @memberof google.cloud.netapp.v1.ListVolumesResponse * @static - * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set - * @returns {google.cloud.netapp.v1.Volume} Volume instance + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Volume.create = function create(properties) { - return new Volume(properties); + ListVolumesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; }; /** - * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. - * @function encode - * @memberof google.cloud.netapp.v1.Volume + * Creates a ListVolumesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse * @static - * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.ListVolumesResponse} ListVolumesResponse + */ + ListVolumesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.ListVolumesResponse) + return object; + var message = new $root.google.cloud.netapp.v1.ListVolumesResponse(); + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.volumes: object expected"); + message.volumes[i] = $root.google.cloud.netapp.v1.Volume.fromObject(object.volumes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.netapp.v1.ListVolumesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListVolumesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {google.cloud.netapp.v1.ListVolumesResponse} message ListVolumesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVolumesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.volumes = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.cloud.netapp.v1.Volume.toObject(message.volumes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListVolumesResponse to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @instance + * @returns {Object.} JSON object + */ + ListVolumesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVolumesResponse + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.ListVolumesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVolumesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.ListVolumesResponse"; + }; + + return ListVolumesResponse; + })(); + + v1.GetVolumeRequest = (function() { + + /** + * Properties of a GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IGetVolumeRequest + * @property {string|null} [name] GetVolumeRequest name + */ + + /** + * Constructs a new GetVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a GetVolumeRequest. + * @implements IGetVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + */ + function GetVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + */ + GetVolumeRequest.prototype.name = ""; + + /** + * Creates a new GetVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest instance + */ + GetVolumeRequest.create = function create(properties) { + return new GetVolumeRequest(properties); + }; + + /** + * Encodes the specified GetVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Volume.encode = function encode(message, writer) { + GetVolumeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.shareName); - if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.psaRange); - if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.storagePool); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); - if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.serviceLevel); - if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.capacityGib); - if (message.exportPolicy != null && Object.hasOwnProperty.call(message, "exportPolicy")) - $root.google.cloud.netapp.v1.ExportPolicy.encode(message.exportPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.protocols != null && message.protocols.length) { - writer.uint32(/* id 12, wireType 2 =*/98).fork(); - for (var i = 0; i < message.protocols.length; ++i) - writer.int32(message.protocols[i]); - writer.ldelim(); - } - if (message.smbSettings != null && message.smbSettings.length) { - writer.uint32(/* id 13, wireType 2 =*/106).fork(); - for (var i = 0; i < message.smbSettings.length; ++i) - writer.int32(message.smbSettings[i]); - writer.ldelim(); - } - if (message.mountOptions != null && message.mountOptions.length) - for (var i = 0; i < message.mountOptions.length; ++i) - $root.google.cloud.netapp.v1.MountOption.encode(message.mountOptions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.unixPermissions != null && Object.hasOwnProperty.call(message, "unixPermissions")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.unixPermissions); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); - if (message.snapshotPolicy != null && Object.hasOwnProperty.call(message, "snapshotPolicy")) - $root.google.cloud.netapp.v1.SnapshotPolicy.encode(message.snapshotPolicy, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.snapReserve != null && Object.hasOwnProperty.call(message, "snapReserve")) - writer.uint32(/* id 19, wireType 1 =*/153).double(message.snapReserve); - if (message.snapshotDirectory != null && Object.hasOwnProperty.call(message, "snapshotDirectory")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.snapshotDirectory); - if (message.usedGib != null && Object.hasOwnProperty.call(message, "usedGib")) - writer.uint32(/* id 21, wireType 0 =*/168).int64(message.usedGib); - if (message.securityStyle != null && Object.hasOwnProperty.call(message, "securityStyle")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.securityStyle); - if (message.kerberosEnabled != null && Object.hasOwnProperty.call(message, "kerberosEnabled")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.kerberosEnabled); - if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.ldapEnabled); - if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.activeDirectory); - if (message.restoreParameters != null && Object.hasOwnProperty.call(message, "restoreParameters")) - $root.google.cloud.netapp.v1.RestoreParameters.encode(message.restoreParameters, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.kmsConfig); - if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) - writer.uint32(/* id 28, wireType 0 =*/224).int32(message.encryptionType); - if (message.hasReplication != null && Object.hasOwnProperty.call(message, "hasReplication")) - writer.uint32(/* id 29, wireType 0 =*/232).bool(message.hasReplication); - if (message.backupConfig != null && Object.hasOwnProperty.call(message, "backupConfig")) - $root.google.cloud.netapp.v1.BackupConfig.encode(message.backupConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.restrictedActions != null && message.restrictedActions.length) { - writer.uint32(/* id 31, wireType 2 =*/250).fork(); - for (var i = 0; i < message.restrictedActions.length; ++i) - writer.int32(message.restrictedActions[i]); - writer.ldelim(); - } - if (message.largeCapacity != null && Object.hasOwnProperty.call(message, "largeCapacity")) - writer.uint32(/* id 32, wireType 0 =*/256).bool(message.largeCapacity); - if (message.multipleEndpoints != null && Object.hasOwnProperty.call(message, "multipleEndpoints")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.multipleEndpoints); - if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) - $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.replicaZone); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.zone); - if (message.coldTierSizeGib != null && Object.hasOwnProperty.call(message, "coldTierSizeGib")) - writer.uint32(/* id 39, wireType 0 =*/312).int64(message.coldTierSizeGib); - if (message.hybridReplicationParameters != null && Object.hasOwnProperty.call(message, "hybridReplicationParameters")) - $root.google.cloud.netapp.v1.HybridReplicationParameters.encode(message.hybridReplicationParameters, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.throughputMibps != null && Object.hasOwnProperty.call(message, "throughputMibps")) - writer.uint32(/* id 41, wireType 1 =*/329).double(message.throughputMibps); - if (message.cacheParameters != null && Object.hasOwnProperty.call(message, "cacheParameters")) - $root.google.cloud.netapp.v1.CacheParameters.encode(message.cacheParameters, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); - if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) - writer.uint32(/* id 44, wireType 0 =*/352).int64(message.hotTierSizeUsedGib); - if (message.blockDevices != null && message.blockDevices.length) - for (var i = 0; i < message.blockDevices.length; ++i) - $root.google.cloud.netapp.v1.BlockDevice.encode(message.blockDevices[i], writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); return writer; }; /** - * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * Encodes the specified GetVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.GetVolumeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.netapp.v1.Volume + * @memberof google.cloud.netapp.v1.GetVolumeRequest * @static - * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {google.cloud.netapp.v1.IGetVolumeRequest} message GetVolumeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Volume.encodeDelimited = function encodeDelimited(message, writer) { + GetVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Volume message from the specified reader or buffer. + * Decodes a GetVolumeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.netapp.v1.Volume + * @memberof google.cloud.netapp.v1.GetVolumeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.netapp.v1.Volume} Volume + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.decode = function decode(reader, length, error) { + GetVolumeRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -26536,214 +26771,6 @@ message.name = reader.string(); break; } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.stateDetails = reader.string(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.shareName = reader.string(); - break; - } - case 6: { - message.psaRange = reader.string(); - break; - } - case 7: { - message.storagePool = reader.string(); - break; - } - case 8: { - message.network = reader.string(); - break; - } - case 9: { - message.serviceLevel = reader.int32(); - break; - } - case 10: { - message.capacityGib = reader.int64(); - break; - } - case 11: { - message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.protocols.push(reader.int32()); - } else - message.protocols.push(reader.int32()); - break; - } - case 13: { - if (!(message.smbSettings && message.smbSettings.length)) - message.smbSettings = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.smbSettings.push(reader.int32()); - } else - message.smbSettings.push(reader.int32()); - break; - } - case 14: { - if (!(message.mountOptions && message.mountOptions.length)) - message.mountOptions = []; - message.mountOptions.push($root.google.cloud.netapp.v1.MountOption.decode(reader, reader.uint32())); - break; - } - case 15: { - message.unixPermissions = reader.string(); - break; - } - case 16: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 17: { - message.description = reader.string(); - break; - } - case 18: { - message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.decode(reader, reader.uint32()); - break; - } - case 19: { - message.snapReserve = reader.double(); - break; - } - case 20: { - message.snapshotDirectory = reader.bool(); - break; - } - case 21: { - message.usedGib = reader.int64(); - break; - } - case 22: { - message.securityStyle = reader.int32(); - break; - } - case 23: { - message.kerberosEnabled = reader.bool(); - break; - } - case 24: { - message.ldapEnabled = reader.bool(); - break; - } - case 25: { - message.activeDirectory = reader.string(); - break; - } - case 26: { - message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.decode(reader, reader.uint32()); - break; - } - case 27: { - message.kmsConfig = reader.string(); - break; - } - case 28: { - message.encryptionType = reader.int32(); - break; - } - case 29: { - message.hasReplication = reader.bool(); - break; - } - case 30: { - message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.decode(reader, reader.uint32()); - break; - } - case 31: { - if (!(message.restrictedActions && message.restrictedActions.length)) - message.restrictedActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.restrictedActions.push(reader.int32()); - } else - message.restrictedActions.push(reader.int32()); - break; - } - case 32: { - message.largeCapacity = reader.bool(); - break; - } - case 33: { - message.multipleEndpoints = reader.bool(); - break; - } - case 34: { - message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); - break; - } - case 36: { - message.replicaZone = reader.string(); - break; - } - case 37: { - message.zone = reader.string(); - break; - } - case 39: { - message.coldTierSizeGib = reader.int64(); - break; - } - case 40: { - message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.decode(reader, reader.uint32()); - break; - } - case 41: { - message.throughputMibps = reader.double(); - break; - } - case 42: { - message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.decode(reader, reader.uint32()); - break; - } - case 44: { - message.hotTierSizeUsedGib = reader.int64(); - break; - } - case 45: { - if (!(message.blockDevices && message.blockDevices.length)) - message.blockDevices = []; - message.blockDevices.push($root.google.cloud.netapp.v1.BlockDevice.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -26753,62 +26780,1931 @@ }; /** - * Decodes a Volume message from the specified reader or buffer, length delimited. + * Decodes a GetVolumeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.netapp.v1.Volume + * @memberof google.cloud.netapp.v1.GetVolumeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.netapp.v1.Volume} Volume + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.decodeDelimited = function decodeDelimited(reader) { + GetVolumeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Volume message. + * Verifies a GetVolumeRequest message. * @function verify - * @memberof google.cloud.netapp.v1.Volume + * @memberof google.cloud.netapp.v1.GetVolumeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Volume.verify = function verify(message) { + GetVolumeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) - if (!$util.isString(message.stateDetails)) - return "stateDetails: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.shareName != null && message.hasOwnProperty("shareName")) - if (!$util.isString(message.shareName)) + return null; + }; + + /** + * Creates a GetVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.GetVolumeRequest} GetVolumeRequest + */ + GetVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.GetVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.GetVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {google.cloud.netapp.v1.GetVolumeRequest} message GetVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + GetVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.GetVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.GetVolumeRequest"; + }; + + return GetVolumeRequest; + })(); + + v1.CreateVolumeRequest = (function() { + + /** + * Properties of a CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface ICreateVolumeRequest + * @property {string|null} [parent] CreateVolumeRequest parent + * @property {string|null} [volumeId] CreateVolumeRequest volumeId + * @property {google.cloud.netapp.v1.IVolume|null} [volume] CreateVolumeRequest volume + */ + + /** + * Constructs a new CreateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a CreateVolumeRequest. + * @implements ICreateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + */ + function CreateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVolumeRequest parent. + * @member {string} parent + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.parent = ""; + + /** + * CreateVolumeRequest volumeId. + * @member {string} volumeId + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volumeId = ""; + + /** + * CreateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + */ + CreateVolumeRequest.prototype.volume = null; + + /** + * Creates a new CreateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest instance + */ + CreateVolumeRequest.create = function create(properties) { + return new CreateVolumeRequest(properties); + }; + + /** + * Encodes the specified CreateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.volumeId != null && Object.hasOwnProperty.call(message, "volumeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.volumeId); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.CreateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.ICreateVolumeRequest} message CreateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.volumeId = reader.string(); + break; + } + case 3: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + if (!$util.isString(message.volumeId)) + return "volumeId: string expected"; + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates a CreateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.CreateVolumeRequest} CreateVolumeRequest + */ + CreateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.CreateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.CreateVolumeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.volumeId != null) + message.volumeId = String(object.volumeId); + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.CreateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from a CreateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.CreateVolumeRequest} message CreateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.volumeId = ""; + object.volume = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.volumeId != null && message.hasOwnProperty("volumeId")) + object.volumeId = message.volumeId; + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this CreateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.CreateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.CreateVolumeRequest"; + }; + + return CreateVolumeRequest; + })(); + + v1.UpdateVolumeRequest = (function() { + + /** + * Properties of an UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IUpdateVolumeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVolumeRequest updateMask + * @property {google.cloud.netapp.v1.IVolume|null} [volume] UpdateVolumeRequest volume + */ + + /** + * Constructs a new UpdateVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an UpdateVolumeRequest. + * @implements IUpdateVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + */ + function UpdateVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateVolumeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.updateMask = null; + + /** + * UpdateVolumeRequest volume. + * @member {google.cloud.netapp.v1.IVolume|null|undefined} volume + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + */ + UpdateVolumeRequest.prototype.volume = null; + + /** + * Creates a new UpdateVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest instance + */ + UpdateVolumeRequest.create = function create(properties) { + return new UpdateVolumeRequest(properties); + }; + + /** + * Encodes the specified UpdateVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.volume != null && Object.hasOwnProperty.call(message, "volume")) + $root.google.cloud.netapp.v1.Volume.encode(message.volume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.UpdateVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IUpdateVolumeRequest} message UpdateVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.volume = $root.google.cloud.netapp.v1.Volume.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.volume != null && message.hasOwnProperty("volume")) { + var error = $root.google.cloud.netapp.v1.Volume.verify(message.volume); + if (error) + return "volume." + error; + } + return null; + }; + + /** + * Creates an UpdateVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.UpdateVolumeRequest} UpdateVolumeRequest + */ + UpdateVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.UpdateVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.UpdateVolumeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.volume != null) { + if (typeof object.volume !== "object") + throw TypeError(".google.cloud.netapp.v1.UpdateVolumeRequest.volume: object expected"); + message.volume = $root.google.cloud.netapp.v1.Volume.fromObject(object.volume); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {google.cloud.netapp.v1.UpdateVolumeRequest} message UpdateVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.volume = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.volume != null && message.hasOwnProperty("volume")) + object.volume = $root.google.cloud.netapp.v1.Volume.toObject(message.volume, options); + return object; + }; + + /** + * Converts this UpdateVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.UpdateVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.UpdateVolumeRequest"; + }; + + return UpdateVolumeRequest; + })(); + + v1.DeleteVolumeRequest = (function() { + + /** + * Properties of a DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IDeleteVolumeRequest + * @property {string|null} [name] DeleteVolumeRequest name + * @property {boolean|null} [force] DeleteVolumeRequest force + */ + + /** + * Constructs a new DeleteVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a DeleteVolumeRequest. + * @implements IDeleteVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + */ + function DeleteVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.name = ""; + + /** + * DeleteVolumeRequest force. + * @member {boolean} force + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + */ + DeleteVolumeRequest.prototype.force = false; + + /** + * Creates a new DeleteVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest instance + */ + DeleteVolumeRequest.create = function create(properties) { + return new DeleteVolumeRequest(properties); + }; + + /** + * Encodes the specified DeleteVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.DeleteVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IDeleteVolumeRequest} message DeleteVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.DeleteVolumeRequest} DeleteVolumeRequest + */ + DeleteVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.DeleteVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.DeleteVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {google.cloud.netapp.v1.DeleteVolumeRequest} message DeleteVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.DeleteVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.DeleteVolumeRequest"; + }; + + return DeleteVolumeRequest; + })(); + + v1.RevertVolumeRequest = (function() { + + /** + * Properties of a RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @interface IRevertVolumeRequest + * @property {string|null} [name] RevertVolumeRequest name + * @property {string|null} [snapshotId] RevertVolumeRequest snapshotId + */ + + /** + * Constructs a new RevertVolumeRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a RevertVolumeRequest. + * @implements IRevertVolumeRequest + * @constructor + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + */ + function RevertVolumeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevertVolumeRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.name = ""; + + /** + * RevertVolumeRequest snapshotId. + * @member {string} snapshotId + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + */ + RevertVolumeRequest.prototype.snapshotId = ""; + + /** + * Creates a new RevertVolumeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest instance + */ + RevertVolumeRequest.create = function create(properties) { + return new RevertVolumeRequest(properties); + }; + + /** + * Encodes the specified RevertVolumeRequest message. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.snapshotId != null && Object.hasOwnProperty.call(message, "snapshotId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotId); + return writer; + }; + + /** + * Encodes the specified RevertVolumeRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.RevertVolumeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.IRevertVolumeRequest} message RevertVolumeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevertVolumeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snapshotId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevertVolumeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevertVolumeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevertVolumeRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevertVolumeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + if (!$util.isString(message.snapshotId)) + return "snapshotId: string expected"; + return null; + }; + + /** + * Creates a RevertVolumeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.RevertVolumeRequest} RevertVolumeRequest + */ + RevertVolumeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.RevertVolumeRequest) + return object; + var message = new $root.google.cloud.netapp.v1.RevertVolumeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.snapshotId != null) + message.snapshotId = String(object.snapshotId); + return message; + }; + + /** + * Creates a plain object from a RevertVolumeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {google.cloud.netapp.v1.RevertVolumeRequest} message RevertVolumeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevertVolumeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.snapshotId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snapshotId != null && message.hasOwnProperty("snapshotId")) + object.snapshotId = message.snapshotId; + return object; + }; + + /** + * Converts this RevertVolumeRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @instance + * @returns {Object.} JSON object + */ + RevertVolumeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RevertVolumeRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.RevertVolumeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevertVolumeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.RevertVolumeRequest"; + }; + + return RevertVolumeRequest; + })(); + + v1.Volume = (function() { + + /** + * Properties of a Volume. + * @memberof google.cloud.netapp.v1 + * @interface IVolume + * @property {string|null} [name] Volume name + * @property {google.cloud.netapp.v1.Volume.State|null} [state] Volume state + * @property {string|null} [stateDetails] Volume stateDetails + * @property {google.protobuf.ITimestamp|null} [createTime] Volume createTime + * @property {string|null} [shareName] Volume shareName + * @property {string|null} [psaRange] Volume psaRange + * @property {string|null} [storagePool] Volume storagePool + * @property {string|null} [network] Volume network + * @property {google.cloud.netapp.v1.ServiceLevel|null} [serviceLevel] Volume serviceLevel + * @property {number|Long|null} [capacityGib] Volume capacityGib + * @property {google.cloud.netapp.v1.IExportPolicy|null} [exportPolicy] Volume exportPolicy + * @property {Array.|null} [protocols] Volume protocols + * @property {Array.|null} [smbSettings] Volume smbSettings + * @property {Array.|null} [mountOptions] Volume mountOptions + * @property {string|null} [unixPermissions] Volume unixPermissions + * @property {Object.|null} [labels] Volume labels + * @property {string|null} [description] Volume description + * @property {google.cloud.netapp.v1.ISnapshotPolicy|null} [snapshotPolicy] Volume snapshotPolicy + * @property {number|null} [snapReserve] Volume snapReserve + * @property {boolean|null} [snapshotDirectory] Volume snapshotDirectory + * @property {number|Long|null} [usedGib] Volume usedGib + * @property {google.cloud.netapp.v1.SecurityStyle|null} [securityStyle] Volume securityStyle + * @property {boolean|null} [kerberosEnabled] Volume kerberosEnabled + * @property {boolean|null} [ldapEnabled] Volume ldapEnabled + * @property {string|null} [activeDirectory] Volume activeDirectory + * @property {google.cloud.netapp.v1.IRestoreParameters|null} [restoreParameters] Volume restoreParameters + * @property {string|null} [kmsConfig] Volume kmsConfig + * @property {google.cloud.netapp.v1.EncryptionType|null} [encryptionType] Volume encryptionType + * @property {boolean|null} [hasReplication] Volume hasReplication + * @property {google.cloud.netapp.v1.IBackupConfig|null} [backupConfig] Volume backupConfig + * @property {Array.|null} [restrictedActions] Volume restrictedActions + * @property {boolean|null} [largeCapacity] Volume largeCapacity + * @property {boolean|null} [multipleEndpoints] Volume multipleEndpoints + * @property {google.cloud.netapp.v1.ITieringPolicy|null} [tieringPolicy] Volume tieringPolicy + * @property {string|null} [replicaZone] Volume replicaZone + * @property {string|null} [zone] Volume zone + * @property {number|Long|null} [coldTierSizeGib] Volume coldTierSizeGib + * @property {google.cloud.netapp.v1.IHybridReplicationParameters|null} [hybridReplicationParameters] Volume hybridReplicationParameters + * @property {number|null} [throughputMibps] Volume throughputMibps + * @property {google.cloud.netapp.v1.ICacheParameters|null} [cacheParameters] Volume cacheParameters + * @property {number|Long|null} [hotTierSizeUsedGib] Volume hotTierSizeUsedGib + * @property {Array.|null} [blockDevices] Volume blockDevices + * @property {google.cloud.netapp.v1.Volume.ICloneDetails|null} [cloneDetails] Volume cloneDetails + */ + + /** + * Constructs a new Volume. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents a Volume. + * @implements IVolume + * @constructor + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + */ + function Volume(properties) { + this.protocols = []; + this.smbSettings = []; + this.mountOptions = []; + this.labels = {}; + this.restrictedActions = []; + this.blockDevices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Volume name. + * @member {string} name + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.name = ""; + + /** + * Volume state. + * @member {google.cloud.netapp.v1.Volume.State} state + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.state = 0; + + /** + * Volume stateDetails. + * @member {string} stateDetails + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.stateDetails = ""; + + /** + * Volume createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.createTime = null; + + /** + * Volume shareName. + * @member {string} shareName + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.shareName = ""; + + /** + * Volume psaRange. + * @member {string} psaRange + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.psaRange = ""; + + /** + * Volume storagePool. + * @member {string} storagePool + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.storagePool = ""; + + /** + * Volume network. + * @member {string} network + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.network = ""; + + /** + * Volume serviceLevel. + * @member {google.cloud.netapp.v1.ServiceLevel} serviceLevel + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.serviceLevel = 0; + + /** + * Volume capacityGib. + * @member {number|Long} capacityGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.capacityGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume exportPolicy. + * @member {google.cloud.netapp.v1.IExportPolicy|null|undefined} exportPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.exportPolicy = null; + + /** + * Volume protocols. + * @member {Array.} protocols + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.protocols = $util.emptyArray; + + /** + * Volume smbSettings. + * @member {Array.} smbSettings + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.smbSettings = $util.emptyArray; + + /** + * Volume mountOptions. + * @member {Array.} mountOptions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.mountOptions = $util.emptyArray; + + /** + * Volume unixPermissions. + * @member {string} unixPermissions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.unixPermissions = ""; + + /** + * Volume labels. + * @member {Object.} labels + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.labels = $util.emptyObject; + + /** + * Volume description. + * @member {string} description + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.description = ""; + + /** + * Volume snapshotPolicy. + * @member {google.cloud.netapp.v1.ISnapshotPolicy|null|undefined} snapshotPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotPolicy = null; + + /** + * Volume snapReserve. + * @member {number} snapReserve + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapReserve = 0; + + /** + * Volume snapshotDirectory. + * @member {boolean} snapshotDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.snapshotDirectory = false; + + /** + * Volume usedGib. + * @member {number|Long} usedGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.usedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume securityStyle. + * @member {google.cloud.netapp.v1.SecurityStyle} securityStyle + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.securityStyle = 0; + + /** + * Volume kerberosEnabled. + * @member {boolean} kerberosEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kerberosEnabled = false; + + /** + * Volume ldapEnabled. + * @member {boolean} ldapEnabled + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.ldapEnabled = false; + + /** + * Volume activeDirectory. + * @member {string} activeDirectory + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.activeDirectory = ""; + + /** + * Volume restoreParameters. + * @member {google.cloud.netapp.v1.IRestoreParameters|null|undefined} restoreParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restoreParameters = null; + + /** + * Volume kmsConfig. + * @member {string} kmsConfig + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.kmsConfig = ""; + + /** + * Volume encryptionType. + * @member {google.cloud.netapp.v1.EncryptionType} encryptionType + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.encryptionType = 0; + + /** + * Volume hasReplication. + * @member {boolean} hasReplication + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hasReplication = false; + + /** + * Volume backupConfig. + * @member {google.cloud.netapp.v1.IBackupConfig|null|undefined} backupConfig + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.backupConfig = null; + + /** + * Volume restrictedActions. + * @member {Array.} restrictedActions + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.restrictedActions = $util.emptyArray; + + /** + * Volume largeCapacity. + * @member {boolean} largeCapacity + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.largeCapacity = false; + + /** + * Volume multipleEndpoints. + * @member {boolean} multipleEndpoints + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.multipleEndpoints = false; + + /** + * Volume tieringPolicy. + * @member {google.cloud.netapp.v1.ITieringPolicy|null|undefined} tieringPolicy + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.tieringPolicy = null; + + /** + * Volume replicaZone. + * @member {string} replicaZone + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.replicaZone = ""; + + /** + * Volume zone. + * @member {string} zone + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.zone = ""; + + /** + * Volume coldTierSizeGib. + * @member {number|Long} coldTierSizeGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.coldTierSizeGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume hybridReplicationParameters. + * @member {google.cloud.netapp.v1.IHybridReplicationParameters|null|undefined} hybridReplicationParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hybridReplicationParameters = null; + + /** + * Volume throughputMibps. + * @member {number} throughputMibps + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.throughputMibps = 0; + + /** + * Volume cacheParameters. + * @member {google.cloud.netapp.v1.ICacheParameters|null|undefined} cacheParameters + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.cacheParameters = null; + + /** + * Volume hotTierSizeUsedGib. + * @member {number|Long} hotTierSizeUsedGib + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.hotTierSizeUsedGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Volume blockDevices. + * @member {Array.} blockDevices + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.blockDevices = $util.emptyArray; + + /** + * Volume cloneDetails. + * @member {google.cloud.netapp.v1.Volume.ICloneDetails|null|undefined} cloneDetails + * @memberof google.cloud.netapp.v1.Volume + * @instance + */ + Volume.prototype.cloneDetails = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Volume.prototype, "_backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["backupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Volume.prototype, "_tieringPolicy", { + get: $util.oneOfGetter($oneOfFields = ["tieringPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Volume instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Volume} Volume instance + */ + Volume.create = function create(properties) { + return new Volume(properties); + }; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.stateDetails != null && Object.hasOwnProperty.call(message, "stateDetails")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateDetails); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.shareName != null && Object.hasOwnProperty.call(message, "shareName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.shareName); + if (message.psaRange != null && Object.hasOwnProperty.call(message, "psaRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.psaRange); + if (message.storagePool != null && Object.hasOwnProperty.call(message, "storagePool")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.storagePool); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.network); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.serviceLevel); + if (message.capacityGib != null && Object.hasOwnProperty.call(message, "capacityGib")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.capacityGib); + if (message.exportPolicy != null && Object.hasOwnProperty.call(message, "exportPolicy")) + $root.google.cloud.netapp.v1.ExportPolicy.encode(message.exportPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.protocols != null && message.protocols.length) { + writer.uint32(/* id 12, wireType 2 =*/98).fork(); + for (var i = 0; i < message.protocols.length; ++i) + writer.int32(message.protocols[i]); + writer.ldelim(); + } + if (message.smbSettings != null && message.smbSettings.length) { + writer.uint32(/* id 13, wireType 2 =*/106).fork(); + for (var i = 0; i < message.smbSettings.length; ++i) + writer.int32(message.smbSettings[i]); + writer.ldelim(); + } + if (message.mountOptions != null && message.mountOptions.length) + for (var i = 0; i < message.mountOptions.length; ++i) + $root.google.cloud.netapp.v1.MountOption.encode(message.mountOptions[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.unixPermissions != null && Object.hasOwnProperty.call(message, "unixPermissions")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.unixPermissions); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.description); + if (message.snapshotPolicy != null && Object.hasOwnProperty.call(message, "snapshotPolicy")) + $root.google.cloud.netapp.v1.SnapshotPolicy.encode(message.snapshotPolicy, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.snapReserve != null && Object.hasOwnProperty.call(message, "snapReserve")) + writer.uint32(/* id 19, wireType 1 =*/153).double(message.snapReserve); + if (message.snapshotDirectory != null && Object.hasOwnProperty.call(message, "snapshotDirectory")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.snapshotDirectory); + if (message.usedGib != null && Object.hasOwnProperty.call(message, "usedGib")) + writer.uint32(/* id 21, wireType 0 =*/168).int64(message.usedGib); + if (message.securityStyle != null && Object.hasOwnProperty.call(message, "securityStyle")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.securityStyle); + if (message.kerberosEnabled != null && Object.hasOwnProperty.call(message, "kerberosEnabled")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.kerberosEnabled); + if (message.ldapEnabled != null && Object.hasOwnProperty.call(message, "ldapEnabled")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.ldapEnabled); + if (message.activeDirectory != null && Object.hasOwnProperty.call(message, "activeDirectory")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.activeDirectory); + if (message.restoreParameters != null && Object.hasOwnProperty.call(message, "restoreParameters")) + $root.google.cloud.netapp.v1.RestoreParameters.encode(message.restoreParameters, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.kmsConfig != null && Object.hasOwnProperty.call(message, "kmsConfig")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.kmsConfig); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.encryptionType); + if (message.hasReplication != null && Object.hasOwnProperty.call(message, "hasReplication")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.hasReplication); + if (message.backupConfig != null && Object.hasOwnProperty.call(message, "backupConfig")) + $root.google.cloud.netapp.v1.BackupConfig.encode(message.backupConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.restrictedActions != null && message.restrictedActions.length) { + writer.uint32(/* id 31, wireType 2 =*/250).fork(); + for (var i = 0; i < message.restrictedActions.length; ++i) + writer.int32(message.restrictedActions[i]); + writer.ldelim(); + } + if (message.largeCapacity != null && Object.hasOwnProperty.call(message, "largeCapacity")) + writer.uint32(/* id 32, wireType 0 =*/256).bool(message.largeCapacity); + if (message.multipleEndpoints != null && Object.hasOwnProperty.call(message, "multipleEndpoints")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.multipleEndpoints); + if (message.tieringPolicy != null && Object.hasOwnProperty.call(message, "tieringPolicy")) + $root.google.cloud.netapp.v1.TieringPolicy.encode(message.tieringPolicy, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.replicaZone != null && Object.hasOwnProperty.call(message, "replicaZone")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.replicaZone); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.zone); + if (message.coldTierSizeGib != null && Object.hasOwnProperty.call(message, "coldTierSizeGib")) + writer.uint32(/* id 39, wireType 0 =*/312).int64(message.coldTierSizeGib); + if (message.hybridReplicationParameters != null && Object.hasOwnProperty.call(message, "hybridReplicationParameters")) + $root.google.cloud.netapp.v1.HybridReplicationParameters.encode(message.hybridReplicationParameters, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.throughputMibps != null && Object.hasOwnProperty.call(message, "throughputMibps")) + writer.uint32(/* id 41, wireType 1 =*/329).double(message.throughputMibps); + if (message.cacheParameters != null && Object.hasOwnProperty.call(message, "cacheParameters")) + $root.google.cloud.netapp.v1.CacheParameters.encode(message.cacheParameters, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.hotTierSizeUsedGib != null && Object.hasOwnProperty.call(message, "hotTierSizeUsedGib")) + writer.uint32(/* id 44, wireType 0 =*/352).int64(message.hotTierSizeUsedGib); + if (message.blockDevices != null && message.blockDevices.length) + for (var i = 0; i < message.blockDevices.length; ++i) + $root.google.cloud.netapp.v1.BlockDevice.encode(message.blockDevices[i], writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + if (message.cloneDetails != null && Object.hasOwnProperty.call(message, "cloneDetails")) + $root.google.cloud.netapp.v1.Volume.CloneDetails.encode(message.cloneDetails, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {google.cloud.netapp.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.stateDetails = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.shareName = reader.string(); + break; + } + case 6: { + message.psaRange = reader.string(); + break; + } + case 7: { + message.storagePool = reader.string(); + break; + } + case 8: { + message.network = reader.string(); + break; + } + case 9: { + message.serviceLevel = reader.int32(); + break; + } + case 10: { + message.capacityGib = reader.int64(); + break; + } + case 11: { + message.exportPolicy = $root.google.cloud.netapp.v1.ExportPolicy.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.protocols.push(reader.int32()); + } else + message.protocols.push(reader.int32()); + break; + } + case 13: { + if (!(message.smbSettings && message.smbSettings.length)) + message.smbSettings = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.smbSettings.push(reader.int32()); + } else + message.smbSettings.push(reader.int32()); + break; + } + case 14: { + if (!(message.mountOptions && message.mountOptions.length)) + message.mountOptions = []; + message.mountOptions.push($root.google.cloud.netapp.v1.MountOption.decode(reader, reader.uint32())); + break; + } + case 15: { + message.unixPermissions = reader.string(); + break; + } + case 16: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 17: { + message.description = reader.string(); + break; + } + case 18: { + message.snapshotPolicy = $root.google.cloud.netapp.v1.SnapshotPolicy.decode(reader, reader.uint32()); + break; + } + case 19: { + message.snapReserve = reader.double(); + break; + } + case 20: { + message.snapshotDirectory = reader.bool(); + break; + } + case 21: { + message.usedGib = reader.int64(); + break; + } + case 22: { + message.securityStyle = reader.int32(); + break; + } + case 23: { + message.kerberosEnabled = reader.bool(); + break; + } + case 24: { + message.ldapEnabled = reader.bool(); + break; + } + case 25: { + message.activeDirectory = reader.string(); + break; + } + case 26: { + message.restoreParameters = $root.google.cloud.netapp.v1.RestoreParameters.decode(reader, reader.uint32()); + break; + } + case 27: { + message.kmsConfig = reader.string(); + break; + } + case 28: { + message.encryptionType = reader.int32(); + break; + } + case 29: { + message.hasReplication = reader.bool(); + break; + } + case 30: { + message.backupConfig = $root.google.cloud.netapp.v1.BackupConfig.decode(reader, reader.uint32()); + break; + } + case 31: { + if (!(message.restrictedActions && message.restrictedActions.length)) + message.restrictedActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedActions.push(reader.int32()); + } else + message.restrictedActions.push(reader.int32()); + break; + } + case 32: { + message.largeCapacity = reader.bool(); + break; + } + case 33: { + message.multipleEndpoints = reader.bool(); + break; + } + case 34: { + message.tieringPolicy = $root.google.cloud.netapp.v1.TieringPolicy.decode(reader, reader.uint32()); + break; + } + case 36: { + message.replicaZone = reader.string(); + break; + } + case 37: { + message.zone = reader.string(); + break; + } + case 39: { + message.coldTierSizeGib = reader.int64(); + break; + } + case 40: { + message.hybridReplicationParameters = $root.google.cloud.netapp.v1.HybridReplicationParameters.decode(reader, reader.uint32()); + break; + } + case 41: { + message.throughputMibps = reader.double(); + break; + } + case 42: { + message.cacheParameters = $root.google.cloud.netapp.v1.CacheParameters.decode(reader, reader.uint32()); + break; + } + case 44: { + message.hotTierSizeUsedGib = reader.int64(); + break; + } + case 45: { + if (!(message.blockDevices && message.blockDevices.length)) + message.blockDevices = []; + message.blockDevices.push($root.google.cloud.netapp.v1.BlockDevice.decode(reader, reader.uint32())); + break; + } + case 47: { + message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Volume message. + * @function verify + * @memberof google.cloud.netapp.v1.Volume + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Volume.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.stateDetails != null && message.hasOwnProperty("stateDetails")) + if (!$util.isString(message.stateDetails)) + return "stateDetails: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.shareName != null && message.hasOwnProperty("shareName")) + if (!$util.isString(message.shareName)) return "shareName: string expected"; if (message.psaRange != null && message.hasOwnProperty("psaRange")) if (!$util.isString(message.psaRange)) @@ -27016,6 +28912,11 @@ return "blockDevices." + error; } } + if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) { + var error = $root.google.cloud.netapp.v1.Volume.CloneDetails.verify(message.cloneDetails); + if (error) + return "cloneDetails." + error; + } return null; }; @@ -27397,6 +29298,11 @@ message.blockDevices[i] = $root.google.cloud.netapp.v1.BlockDevice.fromObject(object.blockDevices[i]); } } + if (object.cloneDetails != null) { + if (typeof object.cloneDetails !== "object") + throw TypeError(".google.cloud.netapp.v1.Volume.cloneDetails: object expected"); + message.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.fromObject(object.cloneDetails); + } return message; }; @@ -27473,6 +29379,7 @@ object.hotTierSizeUsedGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.hotTierSizeUsedGib = options.longs === String ? "0" : 0; + object.cloneDetails = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -27595,6 +29502,8 @@ for (var j = 0; j < message.blockDevices.length; ++j) object.blockDevices[j] = $root.google.cloud.netapp.v1.BlockDevice.toObject(message.blockDevices[j], options); } + if (message.cloneDetails != null && message.hasOwnProperty("cloneDetails")) + object.cloneDetails = $root.google.cloud.netapp.v1.Volume.CloneDetails.toObject(message.cloneDetails, options); return object; }; @@ -27624,6 +29533,272 @@ return typeUrlPrefix + "/google.cloud.netapp.v1.Volume"; }; + Volume.CloneDetails = (function() { + + /** + * Properties of a CloneDetails. + * @memberof google.cloud.netapp.v1.Volume + * @interface ICloneDetails + * @property {string|null} [sourceSnapshot] CloneDetails sourceSnapshot + * @property {string|null} [sourceVolume] CloneDetails sourceVolume + * @property {number|Long|null} [sharedSpaceGib] CloneDetails sharedSpaceGib + */ + + /** + * Constructs a new CloneDetails. + * @memberof google.cloud.netapp.v1.Volume + * @classdesc Represents a CloneDetails. + * @implements ICloneDetails + * @constructor + * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set + */ + function CloneDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloneDetails sourceSnapshot. + * @member {string} sourceSnapshot + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sourceSnapshot = ""; + + /** + * CloneDetails sourceVolume. + * @member {string} sourceVolume + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sourceVolume = ""; + + /** + * CloneDetails sharedSpaceGib. + * @member {number|Long} sharedSpaceGib + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + */ + CloneDetails.prototype.sharedSpaceGib = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloneDetails instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails instance + */ + CloneDetails.create = function create(properties) { + return new CloneDetails(properties); + }; + + /** + * Encodes the specified CloneDetails message. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloneDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceSnapshot != null && Object.hasOwnProperty.call(message, "sourceSnapshot")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceSnapshot); + if (message.sourceVolume != null && Object.hasOwnProperty.call(message, "sourceVolume")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceVolume); + if (message.sharedSpaceGib != null && Object.hasOwnProperty.call(message, "sharedSpaceGib")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.sharedSpaceGib); + return writer; + }; + + /** + * Encodes the specified CloneDetails message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.Volume.CloneDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.ICloneDetails} message CloneDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloneDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloneDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloneDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceSnapshot = reader.string(); + break; + } + case 2: { + message.sourceVolume = reader.string(); + break; + } + case 3: { + message.sharedSpaceGib = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloneDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloneDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloneDetails message. + * @function verify + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloneDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + if (!$util.isString(message.sourceSnapshot)) + return "sourceSnapshot: string expected"; + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + if (!$util.isString(message.sourceVolume)) + return "sourceVolume: string expected"; + if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) + if (!$util.isInteger(message.sharedSpaceGib) && !(message.sharedSpaceGib && $util.isInteger(message.sharedSpaceGib.low) && $util.isInteger(message.sharedSpaceGib.high))) + return "sharedSpaceGib: integer|Long expected"; + return null; + }; + + /** + * Creates a CloneDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.Volume.CloneDetails} CloneDetails + */ + CloneDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.Volume.CloneDetails) + return object; + var message = new $root.google.cloud.netapp.v1.Volume.CloneDetails(); + if (object.sourceSnapshot != null) + message.sourceSnapshot = String(object.sourceSnapshot); + if (object.sourceVolume != null) + message.sourceVolume = String(object.sourceVolume); + if (object.sharedSpaceGib != null) + if ($util.Long) + (message.sharedSpaceGib = $util.Long.fromValue(object.sharedSpaceGib)).unsigned = false; + else if (typeof object.sharedSpaceGib === "string") + message.sharedSpaceGib = parseInt(object.sharedSpaceGib, 10); + else if (typeof object.sharedSpaceGib === "number") + message.sharedSpaceGib = object.sharedSpaceGib; + else if (typeof object.sharedSpaceGib === "object") + message.sharedSpaceGib = new $util.LongBits(object.sharedSpaceGib.low >>> 0, object.sharedSpaceGib.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloneDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {google.cloud.netapp.v1.Volume.CloneDetails} message CloneDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloneDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceSnapshot = ""; + object.sourceVolume = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sharedSpaceGib = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sharedSpaceGib = options.longs === String ? "0" : 0; + } + if (message.sourceSnapshot != null && message.hasOwnProperty("sourceSnapshot")) + object.sourceSnapshot = message.sourceSnapshot; + if (message.sourceVolume != null && message.hasOwnProperty("sourceVolume")) + object.sourceVolume = message.sourceVolume; + if (message.sharedSpaceGib != null && message.hasOwnProperty("sharedSpaceGib")) + if (typeof message.sharedSpaceGib === "number") + object.sharedSpaceGib = options.longs === String ? String(message.sharedSpaceGib) : message.sharedSpaceGib; + else + object.sharedSpaceGib = options.longs === String ? $util.Long.prototype.toString.call(message.sharedSpaceGib) : options.longs === Number ? new $util.LongBits(message.sharedSpaceGib.low >>> 0, message.sharedSpaceGib.high >>> 0).toNumber() : message.sharedSpaceGib; + return object; + }; + + /** + * Converts this CloneDetails to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @instance + * @returns {Object.} JSON object + */ + CloneDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloneDetails + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.Volume.CloneDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloneDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.Volume.CloneDetails"; + }; + + return CloneDetails; + })(); + /** * State enum. * @name google.cloud.netapp.v1.Volume.State @@ -33965,6 +36140,321 @@ return RestoreBackupFilesResponse; })(); + v1.EstablishVolumePeeringRequest = (function() { + + /** + * Properties of an EstablishVolumePeeringRequest. + * @memberof google.cloud.netapp.v1 + * @interface IEstablishVolumePeeringRequest + * @property {string|null} [name] EstablishVolumePeeringRequest name + * @property {string|null} [peerClusterName] EstablishVolumePeeringRequest peerClusterName + * @property {string|null} [peerSvmName] EstablishVolumePeeringRequest peerSvmName + * @property {Array.|null} [peerIpAddresses] EstablishVolumePeeringRequest peerIpAddresses + * @property {string|null} [peerVolumeName] EstablishVolumePeeringRequest peerVolumeName + */ + + /** + * Constructs a new EstablishVolumePeeringRequest. + * @memberof google.cloud.netapp.v1 + * @classdesc Represents an EstablishVolumePeeringRequest. + * @implements IEstablishVolumePeeringRequest + * @constructor + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set + */ + function EstablishVolumePeeringRequest(properties) { + this.peerIpAddresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EstablishVolumePeeringRequest name. + * @member {string} name + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.name = ""; + + /** + * EstablishVolumePeeringRequest peerClusterName. + * @member {string} peerClusterName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerClusterName = ""; + + /** + * EstablishVolumePeeringRequest peerSvmName. + * @member {string} peerSvmName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerSvmName = ""; + + /** + * EstablishVolumePeeringRequest peerIpAddresses. + * @member {Array.} peerIpAddresses + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerIpAddresses = $util.emptyArray; + + /** + * EstablishVolumePeeringRequest peerVolumeName. + * @member {string} peerVolumeName + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + */ + EstablishVolumePeeringRequest.prototype.peerVolumeName = ""; + + /** + * Creates a new EstablishVolumePeeringRequest instance using the specified properties. + * @function create + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest=} [properties] Properties to set + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest instance + */ + EstablishVolumePeeringRequest.create = function create(properties) { + return new EstablishVolumePeeringRequest(properties); + }; + + /** + * Encodes the specified EstablishVolumePeeringRequest message. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishVolumePeeringRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.peerClusterName != null && Object.hasOwnProperty.call(message, "peerClusterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerClusterName); + if (message.peerSvmName != null && Object.hasOwnProperty.call(message, "peerSvmName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peerSvmName); + if (message.peerIpAddresses != null && message.peerIpAddresses.length) + for (var i = 0; i < message.peerIpAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.peerIpAddresses[i]); + if (message.peerVolumeName != null && Object.hasOwnProperty.call(message, "peerVolumeName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.peerVolumeName); + return writer; + }; + + /** + * Encodes the specified EstablishVolumePeeringRequest message, length delimited. Does not implicitly {@link google.cloud.netapp.v1.EstablishVolumePeeringRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.IEstablishVolumePeeringRequest} message EstablishVolumePeeringRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EstablishVolumePeeringRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishVolumePeeringRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.peerClusterName = reader.string(); + break; + } + case 3: { + message.peerSvmName = reader.string(); + break; + } + case 4: { + if (!(message.peerIpAddresses && message.peerIpAddresses.length)) + message.peerIpAddresses = []; + message.peerIpAddresses.push(reader.string()); + break; + } + case 5: { + message.peerVolumeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EstablishVolumePeeringRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EstablishVolumePeeringRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EstablishVolumePeeringRequest message. + * @function verify + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EstablishVolumePeeringRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + if (!$util.isString(message.peerClusterName)) + return "peerClusterName: string expected"; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + if (!$util.isString(message.peerSvmName)) + return "peerSvmName: string expected"; + if (message.peerIpAddresses != null && message.hasOwnProperty("peerIpAddresses")) { + if (!Array.isArray(message.peerIpAddresses)) + return "peerIpAddresses: array expected"; + for (var i = 0; i < message.peerIpAddresses.length; ++i) + if (!$util.isString(message.peerIpAddresses[i])) + return "peerIpAddresses: string[] expected"; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + if (!$util.isString(message.peerVolumeName)) + return "peerVolumeName: string expected"; + return null; + }; + + /** + * Creates an EstablishVolumePeeringRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.netapp.v1.EstablishVolumePeeringRequest} EstablishVolumePeeringRequest + */ + EstablishVolumePeeringRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest) + return object; + var message = new $root.google.cloud.netapp.v1.EstablishVolumePeeringRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.peerClusterName != null) + message.peerClusterName = String(object.peerClusterName); + if (object.peerSvmName != null) + message.peerSvmName = String(object.peerSvmName); + if (object.peerIpAddresses) { + if (!Array.isArray(object.peerIpAddresses)) + throw TypeError(".google.cloud.netapp.v1.EstablishVolumePeeringRequest.peerIpAddresses: array expected"); + message.peerIpAddresses = []; + for (var i = 0; i < object.peerIpAddresses.length; ++i) + message.peerIpAddresses[i] = String(object.peerIpAddresses[i]); + } + if (object.peerVolumeName != null) + message.peerVolumeName = String(object.peerVolumeName); + return message; + }; + + /** + * Creates a plain object from an EstablishVolumePeeringRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {google.cloud.netapp.v1.EstablishVolumePeeringRequest} message EstablishVolumePeeringRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EstablishVolumePeeringRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.peerIpAddresses = []; + if (options.defaults) { + object.name = ""; + object.peerClusterName = ""; + object.peerSvmName = ""; + object.peerVolumeName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.peerClusterName != null && message.hasOwnProperty("peerClusterName")) + object.peerClusterName = message.peerClusterName; + if (message.peerSvmName != null && message.hasOwnProperty("peerSvmName")) + object.peerSvmName = message.peerSvmName; + if (message.peerIpAddresses && message.peerIpAddresses.length) { + object.peerIpAddresses = []; + for (var j = 0; j < message.peerIpAddresses.length; ++j) + object.peerIpAddresses[j] = message.peerIpAddresses[j]; + } + if (message.peerVolumeName != null && message.hasOwnProperty("peerVolumeName")) + object.peerVolumeName = message.peerVolumeName; + return object; + }; + + /** + * Converts this EstablishVolumePeeringRequest to JSON. + * @function toJSON + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @instance + * @returns {Object.} JSON object + */ + EstablishVolumePeeringRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EstablishVolumePeeringRequest + * @function getTypeUrl + * @memberof google.cloud.netapp.v1.EstablishVolumePeeringRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EstablishVolumePeeringRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.netapp.v1.EstablishVolumePeeringRequest"; + }; + + return EstablishVolumePeeringRequest; + })(); + v1.ListSnapshotsRequest = (function() { /** @@ -35912,6 +38402,22 @@ return Snapshot; })(); + /** + * Mode enum. + * @name google.cloud.netapp.v1.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} ONTAP=2 ONTAP value + */ + v1.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "ONTAP"] = 2; + return values; + })(); + v1.GetStoragePoolRequest = (function() { /** @@ -37649,6 +40155,7 @@ * @property {number|Long|null} [coldTierSizeUsedGib] StoragePool coldTierSizeUsedGib * @property {number|Long|null} [hotTierSizeUsedGib] StoragePool hotTierSizeUsedGib * @property {google.cloud.netapp.v1.StoragePoolType|null} [type] StoragePool type + * @property {google.cloud.netapp.v1.Mode|null} [mode] StoragePool mode */ /** @@ -37923,6 +40430,14 @@ */ StoragePool.prototype.type = null; + /** + * StoragePool mode. + * @member {google.cloud.netapp.v1.Mode|null|undefined} mode + * @memberof google.cloud.netapp.v1.StoragePool + * @instance + */ + StoragePool.prototype.mode = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -37944,6 +40459,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(StoragePool.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new StoragePool instance using the specified properties. * @function create @@ -38033,6 +40554,8 @@ writer.uint32(/* id 34, wireType 0 =*/272).int64(message.hotTierSizeUsedGib); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 35, wireType 0 =*/280).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 36, wireType 0 =*/288).int32(message.mode); return writer; }; @@ -38216,6 +40739,10 @@ message.type = reader.int32(); break; } + case 36: { + message.mode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -38395,7 +40922,17 @@ case 0: case 1: case 2: - case 3: + 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: break; } } @@ -38652,9 +41189,25 @@ case 2: message.type = 2; break; - case "UNIFIED_LARGE_CAPACITY": - case 3: - message.type = 3; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DEFAULT": + case 1: + message.mode = 1; + break; + case "ONTAP": + case 2: + message.mode = 2; break; } return message; @@ -38831,6 +41384,11 @@ if (options.oneofs) object._type = "type"; } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.netapp.v1.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.netapp.v1.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } return object; }; @@ -46667,77 +49225,323 @@ * @memberof google.protobuf.DescriptorProto.ExtensionRange * @instance */ - ExtensionRange.prototype.end = 0; + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance */ - ExtensionRange.prototype.options = null; + ReservedRange.prototype.end = 0; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new ReservedRange instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); }; /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * Decodes a ReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decode = function decode(reader, length, error) { + ReservedRange.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -46751,10 +49555,6 @@ message.end = reader.int32(); break; } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -46764,30 +49564,30 @@ }; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + ReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRange message. + * Verifies a ReservedRange message. * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRange.verify = function verify(message) { + ReservedRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.start != null && message.hasOwnProperty("start")) @@ -46796,113 +49596,446 @@ 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); - if (error) - return "options." + error; - } return null; }; /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + 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; - 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); - } return message; }; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ReservedRange.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; }; /** - * Converts this ExtensionRange to JSON. + * Converts this ReservedRange to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance * @returns {Object.} JSON object */ - ExtensionRange.prototype.toJSON = function toJSON() { + ReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExtensionRange + * Gets the default type url for ReservedRange * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; }; - return ExtensionRange; + return ReservedRange; })(); - DescriptorProto.ReservedRange = (function() { + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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 < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated */ /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set */ - function ReservedRange(properties) { + function Declaration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46910,91 +50043,133 @@ } /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @instance */ - ReservedRange.prototype.start = 0; + Declaration.prototype.reserved = false; /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @instance */ - ReservedRange.prototype.end = 0; + Declaration.prototype.repeated = false; /** - * Creates a new ReservedRange instance using the specified properties. + * Creates a new Declaration instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); + Declaration.create = function create(properties) { + return new Declaration(properties); }; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer) { + Declaration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); return writer; }; /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + Declaration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes a Declaration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decode = function decode(reader, length, error) { + Declaration.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.start = reader.int32(); + message.number = reader.int32(); break; } case 2: { - message.end = reader.int32(); + 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: @@ -47006,139 +50181,182 @@ }; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * Decodes a Declaration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { + Declaration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReservedRange message. + * Verifies a Declaration message. * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReservedRange.verify = function verify(message) { + Declaration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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.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; }; /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; - 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; + 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; }; /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * Creates a plain object from a Declaration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options) { + Declaration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.start = 0; - object.end = 0; + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + 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; }; /** - * Converts this ReservedRange to JSON. + * Converts this Declaration to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @instance * @returns {Object.} JSON object */ - ReservedRange.prototype.toJSON = function toJSON() { + Declaration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReservedRange + * Gets the default type url for Declaration * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.ExtensionRangeOptions.Declaration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; }; - return ReservedRange; + return Declaration; })(); - return DescriptorProto; + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; })(); - protobuf.ExtensionRangeOptions = (function() { + protobuf.FieldDescriptorProto = (function() { /** - * Properties of an ExtensionRangeOptions. + * Properties of a FieldDescriptorProto. * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new FieldDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47146,125 +50364,217 @@ } /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldDescriptorProto.prototype.name = ""; /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + FieldDescriptorProto.prototype.number = 0; /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - ExtensionRangeOptions.prototype.features = null; + FieldDescriptorProto.prototype.label = 1; /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - ExtensionRangeOptions.prototype.verification = 1; + FieldDescriptorProto.prototype.type = 1; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); return writer; }; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decode = function decode(reader, length, error) { + FieldDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + message.extendee = reader.string(); break; } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 7: { + message.defaultValue = reader.string(); break; } - case 3: { - message.verification = reader.int32(); + 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()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); break; } default: @@ -47276,529 +50586,394 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a FieldDescriptorProto message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRangeOptions.verify = function verify(message) { + FieldDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; + 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.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { default: - return "verification: enum value expected"; - case 0: + 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); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; - 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 < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + 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; } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; 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.verification === "number") { - message.verification = object.verification; + if (typeof object.type === "number") { + message.type = object.type; break; } break; - case "UNVERIFIED": + case "TYPE_DOUBLE": case 1: - message.verification = 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); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); return message; }; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 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); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - 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; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; + 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; + }; - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; - return Declaration; + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + 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; })(); /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value */ - ExtensionRangeOptions.VerificationState = (function() { + FieldDescriptorProto.Label = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; return values; })(); - return ExtensionRangeOptions; + return FieldDescriptorProto; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of an OneofDescriptorProto. * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ /** - * Constructs a new FieldDescriptorProto. + * Constructs a new OneofDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47806,170 +50981,353 @@ } /** - * FieldDescriptorProto name. + * OneofDescriptorProto name. * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - FieldDescriptorProto.prototype.name = ""; + OneofDescriptorProto.prototype.name = ""; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - FieldDescriptorProto.prototype.number = 0; + OneofDescriptorProto.prototype.options = null; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - FieldDescriptorProto.prototype.label = 1; + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.prototype.type = 1; + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.prototype.typeName = ""; + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + 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); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.extendee = ""; + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FieldDescriptorProto.prototype.defaultValue = ""; + EnumDescriptorProto.prototype.name = ""; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + EnumDescriptorProto.prototype.options = null; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FieldDescriptorProto.prototype.options = null; + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); return writer; }; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length, error) { + EnumDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -47979,44 +51337,26 @@ 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(); + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); break; } - case 10: { - message.jsonName = reader.string(); + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); break; } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); break; } - case 17: { - message.proto3Optional = reader.bool(); + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; } default: @@ -48028,394 +51368,439 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + EnumDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; } - 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); + var error = $root.google.protobuf.EnumOptions.verify(message.options); if (error) return "options." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } return null; }; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); + var message = new $root.google.protobuf.EnumDescriptorProto(); 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; + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); } - 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); + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); return message; }; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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; + }; - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + 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; + }; - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - 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; - })(); + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - 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; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; })(); - return FieldDescriptorProto; + return EnumDescriptorProto; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.EnumValueDescriptorProto = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of an EnumValueDescriptorProto. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options */ /** - * Constructs a new OneofDescriptorProto. + * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function EnumValueDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48423,80 +51808,90 @@ } /** - * OneofDescriptorProto name. + * EnumValueDescriptorProto name. * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - OneofDescriptorProto.prototype.name = ""; + EnumValueDescriptorProto.prototype.name = ""; /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - OneofDescriptorProto.prototype.options = null; + EnumValueDescriptorProto.prototype.number = 0; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decode = function decode(reader, length, error) { + EnumValueDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -48507,7 +51902,11 @@ break; } case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); break; } default: @@ -48519,37 +51918,40 @@ }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofDescriptorProto message. + * Verifies an EnumValueDescriptorProto message. * @function verify - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OneofDescriptorProto.verify = function verify(message) { + EnumValueDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.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.OneofOptions.verify(message.options); + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); if (error) return "options." + error; } @@ -48557,105 +51959,106 @@ }; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); + 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.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + 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.OneofOptions.toObject(message.options, options); + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for EnumValueDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; }; - return OneofDescriptorProto; + return EnumValueDescriptorProto; })(); - protobuf.EnumDescriptorProto = (function() { + protobuf.ServiceDescriptorProto = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of a ServiceDescriptorProto. * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options */ /** - * Constructs a new EnumDescriptorProto. + * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48663,113 +52066,91 @@ } /** - * EnumDescriptorProto name. + * ServiceDescriptorProto name. * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - EnumDescriptorProto.prototype.options = null; + ServiceDescriptorProto.prototype.name = ""; /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + ServiceDescriptorProto.prototype.options = null; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length, error) { + ServiceDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -48779,26 +52160,14 @@ 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())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); break; } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); break; } default: @@ -48810,439 +52179,167 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies a ServiceDescriptorProto message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + ServiceDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); if (error) - return "value." + error; + return "method." + error; } } if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); + var error = $root.google.protobuf.ServiceOptions.verify(message.options); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } return null; }; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); + var message = new $root.google.protobuf.ServiceDescriptorProto(); 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 < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); } } if (object.options != null) { if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } + if (options.arrays || options.defaults) + object.method = []; if (options.defaults) { object.name = ""; object.options = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); } if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for ServiceDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; }; - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - 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; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; + return ServiceDescriptorProto; })(); - protobuf.EnumValueDescriptorProto = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of an EnumValueDescriptorProto. + * Properties of a MethodDescriptorProto. * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming */ /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new MethodDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function EnumValueDescriptorProto(properties) { + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49250,90 +52347,120 @@ } /** - * EnumValueDescriptorProto name. + * MethodDescriptorProto name. * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.name = ""; + MethodDescriptorProto.prototype.name = ""; /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.number = 0; + MethodDescriptorProto.prototype.inputType = ""; /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - EnumValueDescriptorProto.prototype.options = null; + MethodDescriptorProto.prototype.outputType = ""; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); }; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { + MethodDescriptorProto.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -49343,12 +52470,24 @@ message.name = reader.string(); break; } - case 2: { - message.number = reader.int32(); + 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()); break; } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); break; } default: @@ -49360,147 +52499,191 @@ }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies a MethodDescriptorProto message. * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + MethodDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer 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.EnumValueOptions.verify(message.options); + var error = $root.google.protobuf.MethodOptions.verify(message.options); 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; }; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); + var message = new $root.google.protobuf.MethodDescriptorProto(); if (object.name != null) message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; + 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.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); return message; }; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.number = 0; + 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.number != null && message.hasOwnProperty("number")) - object.number = message.number; + 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.EnumValueOptions.toObject(message.options, 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; }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueDescriptorProto + * Gets the default type url for MethodDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; }; - return EnumValueDescriptorProto; + return MethodDescriptorProto; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.FileOptions = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49508,108 +52691,377 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - ServiceDescriptorProto.prototype.name = ""; + FileOptions.prototype.javaPackage = ""; /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + FileOptions.prototype.javaOuterClassname = ""; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions * @instance */ - ServiceDescriptorProto.prototype.options = null; + FileOptions.prototype.javaMultipleFiles = false; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.FileOptions} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { + FileOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.javaPackage = reader.string(); break; } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + case 8: { + message.javaOuterClassname = reader.string(); break; } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + 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()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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())); break; } default: @@ -49621,167 +53073,380 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.FileOptions} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + FileOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + 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); + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "method." + error; + return "uninterpretedOption." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } } return null; }; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.FileOptions} FileOptions */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) return object; - 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 < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + 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.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } } return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.method = []; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { - object.name = ""; - object.options = null; + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for FileOptions * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FileOptions"; }; - return ServiceDescriptorProto; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.MessageOptions = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of a MessageOptions. * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ /** - * Constructs a new MethodDescriptorProto. + * Constructs a new MessageOptions. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + function MessageOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49789,147 +53454,178 @@ } /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.name = ""; + MessageOptions.prototype.messageSetWireFormat = false; /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.inputType = ""; + MessageOptions.prototype.noStandardDescriptorAccessor = false; /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + MessageOptions.prototype.deprecated = false; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.options = null; + MessageOptions.prototype.mapEntry = false; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + MessageOptions.prototype.features = null; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length, error) { + MessageOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.messageSetWireFormat = reader.bool(); break; } case 2: { - message.inputType = reader.string(); + message.noStandardDescriptorAccessor = reader.bool(); break; } case 3: { - message.outputType = reader.string(); + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 5: { - message.clientStreaming = reader.bool(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 6: { - message.serverStreaming = reader.bool(); + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); break; } default: @@ -49941,191 +53637,226 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a MessageOptions message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MessageOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.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); + 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); if (error) - return "options." + 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 < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + 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; }; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - 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); + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); return message; }; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; } - 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; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for MessageOptions * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; - return MethodDescriptorProto; + return MessageOptions; })(); - protobuf.FileOptions = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a FileOptions. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo */ /** - * Constructs a new FileOptions. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function FileOptions(properties) { + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50133,364 +53864,283 @@ } /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.optimizeFor = 1; + FieldOptions.prototype.ctype = 0; /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.goPackage = ""; + FieldOptions.prototype.packed = false; /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.ccGenericServices = false; + FieldOptions.prototype.jstype = 0; /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.javaGenericServices = false; + FieldOptions.prototype.lazy = false; /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.pyGenericServices = false; + FieldOptions.prototype.unverifiedLazy = false; /** - * FileOptions deprecated. + * FieldOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.ccEnableArenas = true; + FieldOptions.prototype.deprecated = false; /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.objcClassPrefix = ""; + FieldOptions.prototype.weak = false; /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.csharpNamespace = ""; + FieldOptions.prototype.debugRedact = false; /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.swiftPrefix = ""; + FieldOptions.prototype.retention = 0; /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.phpClassPrefix = ""; + FieldOptions.prototype.targets = $util.emptyArray; /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.phpNamespace = ""; + FieldOptions.prototype.editionDefaults = $util.emptyArray; /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.phpMetadataNamespace = ""; + FieldOptions.prototype.features = null; /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.rubyPackage = ""; + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.features = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + FieldOptions.prototype[".google.api.fieldInfo"] = null; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length, error) { + FieldOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.javaPackage = reader.string(); + message.ctype = reader.int32(); break; } - case 8: { - message.javaOuterClassname = reader.string(); + case 2: { + message.packed = reader.bool(); break; } - case 10: { - message.javaMultipleFiles = reader.bool(); + case 6: { + message.jstype = reader.int32(); break; } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); + case 5: { + message.lazy = reader.bool(); break; } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); + case 15: { + message.unverifiedLazy = reader.bool(); break; } - case 9: { - message.optimizeFor = reader.int32(); + case 3: { + message.deprecated = reader.bool(); break; } - case 11: { - message.goPackage = reader.string(); + case 10: { + message.weak = reader.bool(); break; } case 16: { - message.ccGenericServices = reader.bool(); + message.debugRedact = 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(); + message.retention = reader.int32(); break; } - case 44: { - message.phpMetadataNamespace = reader.string(); + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); break; } - case 45: { - message.rubyPackage = reader.string(); + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); break; } - case 50: { + case 21: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } @@ -50500,10 +54150,23 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); 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())); + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); break; } default: @@ -50515,95 +54178,106 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + FieldOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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) { + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { default: - return "optimizeFor: enum value expected"; + return "ctype: enum value expected"; + case 0: 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.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.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.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 < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) @@ -50618,191 +54292,323 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; } return null; }; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FieldOptions} FieldOptions */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - 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) { + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; + if (typeof object.ctype === "number") { + message.ctype = object.ctype; break; } break; - case "SPEED": + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": case 1: - message.optimizeFor = 1; + message.ctype = 1; break; - case "CODE_SIZE": + case "STRING_PIECE": case 2: - message.optimizeFor = 2; + message.ctype = 2; break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; + } + 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.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.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.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.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 < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } if (object.features != null) { if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); } return message; }; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; + object[".google.api.fieldBehavior"] = []; } if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -50810,84 +54616,437 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + 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; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + 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_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + 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; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; })(); - return FileOptions; + return FieldOptions; })(); - protobuf.MessageOptions = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of a MessageOptions. + * Properties of an OneofOptions. * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new MessageOptions. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function MessageOptions(properties) { + function OneofOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -50896,167 +55055,87 @@ } /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. + * OneofOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @instance */ - MessageOptions.prototype.features = null; + OneofOptions.prototype.features = null; /** - * MessageOptions uninterpretedOption. + * OneofOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length, error) { + OneofOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 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()); break; } @@ -51066,10 +55145,6 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -51079,47 +55154,32 @@ }; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageOptions message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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); if (error) @@ -51134,93 +55194,56 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } return null; }; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.OneofOptions} OneofOptions */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - 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); + var message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } return message; }; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; + if (options.defaults) object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -51228,77 +55251,61 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this MessageOptions to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for OneofOptions * @function getTypeUrl - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.OneofOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; + return typeUrlPrefix + "/google.protobuf.OneofOptions"; }; - return MessageOptions; + return OneofOptions; })(); - protobuf.FieldOptions = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of a FieldOptions. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new FieldOptions. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; + function EnumOptions(properties) { this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51306,283 +55313,129 @@ } /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - FieldOptions.prototype.unverifiedLazy = false; + EnumOptions.prototype.allowAlias = false; /** - * FieldOptions deprecated. + * EnumOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @instance */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumOptions.prototype.deprecated = false; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + EnumOptions.prototype.features = null; /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length, error) { + EnumOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 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(); + message.allowAlias = 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 < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } - case 21: { + case 7: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } @@ -51592,25 +55445,6 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -51620,437 +55454,121 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.verify = function verify(message) { + EnumOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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.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.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 < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - 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 < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } + 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); + if (error) + return "features." + error; } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } - if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + 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); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } return message; }; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; + if (options.arrays || options.defaults) object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; + object.allowAlias = false; object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; - object[".google.api.resourceReference"] = null; - object[".google.api.fieldInfo"] = null; } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -52058,437 +55576,59 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; /** - * Converts this FieldOptions to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for EnumOptions * @function getTypeUrl - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; + return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - 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; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - 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_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - 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; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; + return EnumOptions; })(); - protobuf.OneofOptions = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of an OneofOptions. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new OneofOptions. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function OneofOptions(properties) { + function EnumValueOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -52497,47 +55637,67 @@ } /** - * OneofOptions features. + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @instance */ - OneofOptions.prototype.features = null; + EnumValueOptions.prototype.features = null; /** - * OneofOptions uninterpretedOption. + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -52545,42 +55705,50 @@ }; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofOptions.decode = function decode(reader, length, error) { + EnumValueOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 3: { + message.debugRedact = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -52596,37 +55764,43 @@ }; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofOptions message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OneofOptions.verify = function verify(message) { + EnumValueOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + 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); if (error) return "features." + error; } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -52640,29 +55814,33 @@ }; /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.OneofOptions(); + 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.OneofOptions.features: object expected"); + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } @@ -52670,24 +55848,31 @@ }; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) + if (options.defaults) { + object.deprecated = false; object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -52697,56 +55882,57 @@ }; /** - * Converts this OneofOptions to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return OneofOptions; + return EnumValueOptions; })(); - protobuf.EnumOptions = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of an EnumOptions. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion */ /** - * Constructs a new EnumOptions. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function EnumOptions(properties) { + function ServiceOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -52755,138 +55941,152 @@ } /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumOptions.prototype.allowAlias = false; + ServiceOptions.prototype.features = null; /** - * EnumOptions deprecated. + * ServiceOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumOptions.prototype.deprecated = false; + ServiceOptions.prototype.deprecated = false; /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumOptions.prototype.features = null; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new EnumOptions instance using the specified properties. + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); return writer; }; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length, error) { + ServiceOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 3: { + case 33: { message.deprecated = reader.bool(); break; } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); 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); break; @@ -52896,46 +56096,40 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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); 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"; @@ -52945,72 +56139,80 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; return null; }; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - 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); + var message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); return message; }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) { - object.allowAlias = false; object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -53018,60 +56220,70 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; /** - * Converts this EnumOptions to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return EnumOptions; + return ServiceOptions; })(); - protobuf.EnumValueOptions = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new EnumValueOptions. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function EnumValueOptions(properties) { + function MethodOptions(properties) { this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53079,116 +56291,147 @@ } /** - * EnumValueOptions deprecated. + * MethodOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @instance */ - EnumValueOptions.prototype.deprecated = false; + MethodOptions.prototype.deprecated = false; /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - EnumValueOptions.prototype.features = null; + MethodOptions.prototype.idempotencyLevel = 0; /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions * @instance */ - EnumValueOptions.prototype.debugRedact = false; + MethodOptions.prototype.features = null; /** - * EnumValueOptions uninterpretedOption. + * MethodOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueOptions instance using the specified properties. + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length, error) { + MethodOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { + case 33: { message.deprecated = reader.bool(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 34: { + message.idempotencyLevel = reader.int32(); break; } - case 3: { - message.debugRedact = reader.bool(); + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { @@ -53197,6 +56440,20 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + 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()); + break; + } default: reader.skipType(tag & 7); break; @@ -53206,43 +56463,49 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; 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); if (error) return "features." + error; } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -53252,130 +56515,212 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.MethodOptions} MethodOptions */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.EnumValueOptions(); + 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.EnumValueOptions.features: object expected"); + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } if (options.defaults) { object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; object.features = null; - object.debugRedact = false; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return EnumValueOptions; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; })(); - protobuf.ServiceOptions = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a ServiceOptions. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new ServiceOptions. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53383,150 +56728,164 @@ } /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype.features = null; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype.deprecated = false; + UninterpretedOption.prototype.identifierValue = ""; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + UninterpretedOption.prototype.doubleValue = 0; /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * Creates a new ServiceOptions instance using the specified properties. + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length, error) { + UninterpretedOption.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } - case 33: { - message.deprecated = reader.bool(); + case 3: { + message.identifierValue = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 4: { + message.positiveIntValue = reader.uint64(); break; } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); + case 5: { + message.negativeIntValue = reader.int64(); break; } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); + case 6: { + message.doubleValue = reader.double(); break; } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); break; } default: @@ -53538,194 +56897,460 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); if (error) - return "uninterpretedOption." + error; + return "name." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - 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); - } - 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 < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + 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 < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 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; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; + object.name = []; if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; + 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.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 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; }; /** - * Converts this ServiceOptions to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for UninterpretedOption * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - return ServiceOptions; + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + 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; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; })(); - protobuf.MethodOptions = (function() { + protobuf.FeatureSet = (function() { /** - * Properties of a MethodOptions. + * Properties of a FeatureSet. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat */ /** - * Constructs a new MethodOptions. + * Constructs a new FeatureSet. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53733,167 +57358,147 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype.idempotencyLevel = 0; + FeatureSet.prototype.fieldPresence = 0; /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype.features = null; + FeatureSet.prototype.enumType = 0; /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + FeatureSet.prototype.repeatedFieldEncoding = 0; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + FeatureSet.prototype.utf8Validation = 0; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + FeatureSet.prototype.messageEncoding = 0; /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + FeatureSet.prototype.jsonFormat = 0; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + FeatureSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length, error) { + FeatureSet.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); + case 1: { + message.fieldPresence = reader.int32(); break; } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 2: { + message.enumType = reader.int32(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 3: { + message.repeatedFieldEncoding = reader.int32(); break; } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + case 4: { + message.utf8Validation = reader.int32(); break; } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 5: { + message.messageEncoding = reader.int32(); break; } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + case 6: { + message.jsonFormat = reader.int32(); break; } default: @@ -53905,429 +57510,522 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a FeatureSet message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + FeatureSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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) { + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { default: - return "idempotencyLevel: enum value expected"; + return "fieldPresence: enum value expected"; case 0: case 1: case 2: + case 3: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - 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 < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + 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[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; - } return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FeatureSet} FeatureSet */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; break; } break; - case "IDEMPOTENCY_UNKNOWN": + case "FIELD_PRESENCE_UNKNOWN": case 0: - message.idempotencyLevel = 0; + message.fieldPresence = 0; break; - case "NO_SIDE_EFFECTS": + case "EXPLICIT": case 1: - message.idempotencyLevel = 1; + message.fieldPresence = 1; break; - case "IDEMPOTENT": + case "IMPLICIT": case 2: - message.idempotencyLevel = 2; + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; 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); + 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; } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + 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; } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + 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; } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + 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; } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + 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; } return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + FeatureSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + 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; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + 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; return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this FeatureSet to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for FeatureSet * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value */ - MethodOptions.IdempotencyLevel = (function() { + FeatureSet.FieldPresence = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; + 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; })(); - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value */ + 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; + })(); /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + 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; + })(); /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value */ - UninterpretedOption.prototype.name = $util.emptyArray; + 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; + })(); /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value */ - UninterpretedOption.prototype.identifierValue = ""; + 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; + })(); /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + 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; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + FeatureSetDefaults.prototype.minimumEdition = 0; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + FeatureSetDefaults.prototype.maximumEdition = 0; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + FeatureSetDefaults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length, error) { + FeatureSetDefaults.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); break; } case 4: { - message.positiveIntValue = reader.uint64(); + message.minimumEdition = reader.int32(); 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(); + message.maximumEdition = reader.int32(); break; } default: @@ -54339,224 +58037,283 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a FeatureSetDefaults message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + FeatureSetDefaults.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); if (error) - return "name." + error; + return "defaults." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; - 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 < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + 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 < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); } } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 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); + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.name = []; + object.defaults = []; 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 = ""; + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 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; + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this FeatureSetDefaults to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + FeatureSetDefaults.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for FeatureSetDefaults * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; }; - UninterpretedOption.NamePart = (function() { + FeatureSetDefaults.FeatureSetEditionDefault = (function() { /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features */ /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set */ - function NamePart(properties) { + function FeatureSetEditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54564,89 +58321,91 @@ } /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - NamePart.prototype.namePart = ""; + FeatureSetEditionDefault.prototype.edition = 0; /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - NamePart.prototype.isExtension = false; + FeatureSetEditionDefault.prototype.features = null; /** - * Creates a new NamePart instance using the specified properties. + * Creates a new FeatureSetEditionDefault instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance */ - NamePart.create = function create(properties) { - return new NamePart(properties); + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); }; /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + FeatureSetEditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); return writer; }; /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NamePart message from the specified reader or buffer. + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length, error) { + FeatureSetEditionDefault.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); + case 3: { + message.edition = reader.int32(); break; } case 2: { - message.isExtension = reader.bool(); + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -54654,145 +58413,208 @@ 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; }; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NamePart message. + * Verifies a FeatureSetEditionDefault message. * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + FeatureSetEditionDefault.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } return null; }; /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; - 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); + 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_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + 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.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } return message; }; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + FeatureSetEditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + 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; }; /** - * Converts this NamePart to JSON. + * Converts this FeatureSetEditionDefault to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NamePart + * Gets the default type url for FeatureSetEditionDefault * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; }; - return NamePart; + return FeatureSetEditionDefault; })(); - return UninterpretedOption; + return FeatureSetDefaults; })(); - protobuf.FeatureSet = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a FeatureSet. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new FeatureSet. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function FeatureSet(properties) { + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54800,147 +58622,80 @@ } /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - FeatureSet.prototype.jsonFormat = 0; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSet.decode = function decode(reader, length, error) { + SourceCodeInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 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(); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -54952,413 +58707,504 @@ }; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - 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; + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; } - 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; + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + 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 < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } - 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; } return message; }; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + SourceCodeInfo.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; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } - 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; return object; }; /** - * Converts this FeatureSet to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - FeatureSet.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - 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; - })(); + SourceCodeInfo.Location = (function() { - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - 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; - })(); + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - 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; - })(); + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + 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 < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - 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; - })(); + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - 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; - })(); + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - 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; + return Location; })(); - return FeatureSet; + return SourceCodeInfo; })(); - protobuf.FeatureSetDefaults = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a FeatureSetDefaults. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new FeatureSetDefaults. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function FeatureSetDefaults(properties) { - this.defaults = []; + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55366,108 +59212,80 @@ } /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - FeatureSetDefaults.prototype.maximumEdition = 0; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetDefaults.decode = function decode(reader, length, error) { + GeneratedCodeInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: @@ -55479,283 +59297,141 @@ }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSetDefaults message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FeatureSetDefaults.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); if (error) - return "defaults." + error; + return "annotation." + error; } } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } return null; }; /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - 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 < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; + 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 < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; } return message; }; /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - FeatureSetDefaults.FeatureSetEditionDefault = (function() { + GeneratedCodeInfo.Annotation = (function() { /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function FeatureSetEditionDefault(properties) { + function Annotation(properties) { + this.path = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55763,91 +59439,144 @@ } /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - FeatureSetEditionDefault.prototype.edition = 0; + Annotation.prototype.path = $util.emptyArray; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - FeatureSetEditionDefault.prototype.features = null; + Annotation.prototype.sourceFile = ""; /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetEditionDefault.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { + Annotation.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; } case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); break; } default: @@ -55859,204 +59588,212 @@ }; /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSetEditionDefault message. + * Verifies an Annotation message. * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FeatureSetEditionDefault.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { default: - return "edition: enum value expected"; + return "semantic: enum value expected"; case 0: - case 998: - case 999: - case 1000: - case 1001: case 1: case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } return null; }; /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { + 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 < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { default: - if (typeof object.edition === "number") { - message.edition = object.edition; + if (typeof object.semantic === "number") { + message.semantic = object.semantic; break; } break; - case "EDITION_UNKNOWN": + case "NONE": case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; + message.semantic = 0; break; - case "EDITION_1_TEST_ONLY": + case "SET": case 1: - message.edition = 1; + message.semantic = 1; break; - case "EDITION_2_TEST_ONLY": + case "ALIAS": 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; + message.semantic = 2; break; } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } return message; }; /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.path = []; if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - 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.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; /** - * Converts this FeatureSetEditionDefault to JSON. + * Converts this Annotation to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance * @returns {Object.} JSON object */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSetEditionDefault + * Gets the default type url for Annotation * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; }; - return FeatureSetEditionDefault; + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; })(); - return FeatureSetDefaults; + return GeneratedCodeInfo; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56064,80 +59801,312 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + 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 < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length, error) { + Timestamp.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -56149,504 +60118,146 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } + 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; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - 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 < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } + 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; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + 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; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - 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 < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - return SourceCodeInfo; + return Timestamp; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.Duration = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a Duration. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56654,80 +60265,91 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length, error) { + Duration.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -56739,503 +60361,146 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeneratedCodeInfo.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } + 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; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - 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 < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Duration * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - 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 < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + 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; + }; - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Annotation; - })(); + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; - return GeneratedCodeInfo; + return Duration; })(); - protobuf.FieldMask = (function() { + protobuf.Struct = (function() { /** - * Properties of a FieldMask. + * Properties of a Struct. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new FieldMask. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57243,80 +60508,99 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length, error) { + Struct.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; break; } default: @@ -57328,135 +60612,146 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } } return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.Struct} Struct */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - 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 < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } } return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } return object; }; /** - * Converts this FieldMask to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldMask + * Gets the default type url for Struct * @function getTypeUrl - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.Struct * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldMask"; + return typeUrlPrefix + "/google.protobuf.Struct"; }; - return FieldMask; + return Struct; })(); - protobuf.Timestamp = (function() { + protobuf.Value = (function() { /** - * Properties of a Timestamp. + * Properties of a Value. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new Timestamp. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function Timestamp(properties) { + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57464,91 +60759,161 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Value.prototype.nullValue = null; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value * @instance */ - Timestamp.prototype.nanos = 0; + Value.prototype.numberValue = null; /** - * Creates a new Timestamp instance using the specified properties. + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length, error) { + Value.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.nullValue = reader.int32(); break; } case 2: { - message.nanos = reader.int32(); + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } default: @@ -57560,146 +60925,235 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Value} Value */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - 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; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Value.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.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } - 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; }; /** - * Converts this Timestamp to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Value * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.protobuf.Value"; }; - return Timestamp; + return Value; })(); - protobuf.Duration = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a Duration. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Duration. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Duration(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57707,91 +61161,80 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - Duration.prototype.nanos = 0; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new Duration instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Duration.create = function create(properties) { - return new Duration(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length, error) { + ListValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; } default: @@ -57803,125 +61246,119 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.ListValue} ListValue */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - 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; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + ListValue.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 (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - 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; }; /** - * Converts this Duration to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for ListValue * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.protobuf.ListValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.protobuf.ListValue"; }; - return Duration; + return ListValue; })(); protobuf.Any = (function() { diff --git a/packages/google-cloud-netapp/protos/protos.json b/packages/google-cloud-netapp/protos/protos.json index ab4fbbff3b5..f5efdb48005 100644 --- a/packages/google-cloud-netapp/protos/protos.json +++ b/packages/google-cloud-netapp/protos/protos.json @@ -1379,6 +1379,30 @@ } ] }, + "EstablishVolumePeering": { + "requestType": "EstablishVolumePeeringRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Volume", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Volume", + "metadata_type": "OperationMetadata" + } + } + ] + }, "ListSnapshots": { "requestType": "ListSnapshotsRequest", "responseType": "ListSnapshotsResponse", @@ -2624,6 +2648,66 @@ } } ] + }, + "ExecuteOntapPost": { + "requestType": "ExecuteOntapPostRequest", + "responseType": "ExecuteOntapPostResponse", + "options": { + "(google.api.http).post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "body": "*" + } + } + ] + }, + "ExecuteOntapGet": { + "requestType": "ExecuteOntapGetRequest", + "responseType": "ExecuteOntapGetResponse", + "options": { + "(google.api.http).get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + } + } + ] + }, + "ExecuteOntapDelete": { + "requestType": "ExecuteOntapDeleteRequest", + "responseType": "ExecuteOntapDeleteResponse", + "options": { + "(google.api.http).delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}" + } + } + ] + }, + "ExecuteOntapPatch": { + "requestType": "ExecuteOntapPatchRequest", + "responseType": "ExecuteOntapPatchResponse", + "options": { + "(google.api.http).patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}", + "body": "*" + } + } + ] } } }, @@ -2925,8 +3009,7 @@ "values": { "STORAGE_POOL_TYPE_UNSPECIFIED": 0, "FILE": 1, - "UNIFIED": 2, - "UNIFIED_LARGE_CAPACITY": 3 + "UNIFIED": 2 } }, "HybridReplicationSchedule": { @@ -3247,6 +3330,96 @@ } } }, + "ExecuteOntapPostRequest": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ontapPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapPostResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapGetRequest": { + "fields": { + "ontapPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapGetResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapDeleteRequest": { + "fields": { + "ontapPath": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapDeleteResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, + "ExecuteOntapPatchRequest": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "ontapPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExecuteOntapPatchResponse": { + "fields": { + "body": { + "type": "google.protobuf.Struct", + "id": 1 + } + } + }, "ListQuotaRulesRequest": { "fields": { "parent": { @@ -4583,9 +4756,43 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "cloneDetails": { + "type": "CloneDetails", + "id": 47, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { + "CloneDetails": { + "fields": { + "sourceSnapshot": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Snapshot" + } + }, + "sourceVolume": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "sharedSpaceGib": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -5078,7 +5285,10 @@ }, "sourceBackup": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "netapp.googleapis.com/Backup" + } } } }, @@ -5566,6 +5776,47 @@ "RestoreBackupFilesResponse": { "fields": {} }, + "EstablishVolumePeeringRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "netapp.googleapis.com/Volume" + } + }, + "peerClusterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerSvmName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "peerIpAddresses": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peerVolumeName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "ListSnapshotsRequest": { "fields": { "parent": { @@ -5747,6 +5998,13 @@ } } }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DEFAULT": 1, + "ONTAP": 2 + } + }, "GetStoragePoolRequest": { "fields": { "name": { @@ -5907,6 +6165,11 @@ "oneof": [ "type" ] + }, + "_mode": { + "oneof": [ + "mode" + ] } }, "fields": { @@ -6140,6 +6403,14 @@ "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } + }, + "mode": { + "type": "Mode", + "id": 36, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { @@ -8049,6 +8320,69 @@ } } }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, "Any": { "fields": { "type_url": { diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js similarity index 100% rename from owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js rename to packages/google-cloud-netapp/samples/generated/v1/net_app.establish_volume_peering.js diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js similarity index 100% rename from owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js rename to packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_delete.js diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js similarity index 100% rename from owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js rename to packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_get.js diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js similarity index 100% rename from owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js rename to packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_patch.js diff --git a/owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js b/packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js similarity index 100% rename from owl-bot-staging/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js rename to packages/google-cloud-netapp/samples/generated/v1/net_app.execute_ontap_post.js diff --git a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json index b6539713861..64d94420465 100644 --- a/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json +++ b/packages/google-cloud-netapp/samples/generated/v1/snippet_metadata_google.cloud.netapp.v1.json @@ -599,6 +599,62 @@ } } }, + { + "regionTag": "netapp_v1_generated_NetApp_EstablishVolumePeering_async", + "title": "NetApp establishVolumePeering Sample", + "origin": "API_DEFINITION", + "description": " Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.", + "canonical": true, + "file": "net_app.establish_volume_peering.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EstablishVolumePeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "peer_cluster_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_svm_name", + "type": "TYPE_STRING" + }, + { + "name": "peer_ip_addresses", + "type": "TYPE_STRING[]" + }, + { + "name": "peer_volume_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "EstablishVolumePeering", + "fullName": "google.cloud.netapp.v1.NetApp.EstablishVolumePeering", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, { "regionTag": "netapp_v1_generated_NetApp_ListSnapshots_async", "title": "NetApp listSnapshots Sample", @@ -3002,6 +3058,174 @@ } } } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPost_async", + "title": "NetApp executeOntapPost Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_post.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapPost", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", + "async": true, + "parameters": [ + { + "name": "body", + "type": ".google.protobuf.Struct" + }, + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapPostResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapPost", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPost", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapGet_async", + "title": "NetApp executeOntapGet Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_get.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapGet", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", + "async": true, + "parameters": [ + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapGetResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapGet", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapGet", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapDelete_async", + "title": "NetApp executeOntapDelete Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_delete.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapDelete", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", + "async": true, + "parameters": [ + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapDeleteResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapDelete", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapDelete", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } + }, + { + "regionTag": "netapp_v1_generated_NetApp_ExecuteOntapPatch_async", + "title": "NetApp executeOntapPatch Sample", + "origin": "API_DEFINITION", + "description": " `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.", + "canonical": true, + "file": "net_app.execute_ontap_patch.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteOntapPatch", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", + "async": true, + "parameters": [ + { + "name": "body", + "type": ".google.protobuf.Struct" + }, + { + "name": "ontap_path", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.netapp.v1.ExecuteOntapPatchResponse", + "client": { + "shortName": "NetAppClient", + "fullName": "google.cloud.netapp.v1.NetAppClient" + }, + "method": { + "shortName": "ExecuteOntapPatch", + "fullName": "google.cloud.netapp.v1.NetApp.ExecuteOntapPatch", + "service": { + "shortName": "NetApp", + "fullName": "google.cloud.netapp.v1.NetApp" + } + } + } } ] } diff --git a/packages/google-cloud-netapp/src/v1/gapic_metadata.json b/packages/google-cloud-netapp/src/v1/gapic_metadata.json index bd990ebb8f4..b605c7194aa 100644 --- a/packages/google-cloud-netapp/src/v1/gapic_metadata.json +++ b/packages/google-cloud-netapp/src/v1/gapic_metadata.json @@ -70,6 +70,26 @@ "getHostGroup" ] }, + "ExecuteOntapPost": { + "methods": [ + "executeOntapPost" + ] + }, + "ExecuteOntapGet": { + "methods": [ + "executeOntapGet" + ] + }, + "ExecuteOntapDelete": { + "methods": [ + "executeOntapDelete" + ] + }, + "ExecuteOntapPatch": { + "methods": [ + "executeOntapPatch" + ] + }, "CreateStoragePool": { "methods": [ "createStoragePool" @@ -115,6 +135,11 @@ "revertVolume" ] }, + "EstablishVolumePeering": { + "methods": [ + "establishVolumePeering" + ] + }, "CreateSnapshot": { "methods": [ "createSnapshot" @@ -427,6 +452,26 @@ "getHostGroup" ] }, + "ExecuteOntapPost": { + "methods": [ + "executeOntapPost" + ] + }, + "ExecuteOntapGet": { + "methods": [ + "executeOntapGet" + ] + }, + "ExecuteOntapDelete": { + "methods": [ + "executeOntapDelete" + ] + }, + "ExecuteOntapPatch": { + "methods": [ + "executeOntapPatch" + ] + }, "CreateStoragePool": { "methods": [ "createStoragePool" @@ -472,6 +517,11 @@ "revertVolume" ] }, + "EstablishVolumePeering": { + "methods": [ + "establishVolumePeering" + ] + }, "CreateSnapshot": { "methods": [ "createSnapshot" diff --git a/packages/google-cloud-netapp/src/v1/net_app_client.ts b/packages/google-cloud-netapp/src/v1/net_app_client.ts index 569db7baf7e..75a26dd4819 100644 --- a/packages/google-cloud-netapp/src/v1/net_app_client.ts +++ b/packages/google-cloud-netapp/src/v1/net_app_client.ts @@ -296,6 +296,10 @@ export class NetAppClient { '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; const revertVolumeMetadata = protoFilesRoot.lookup( '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; + const establishVolumePeeringResponse = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.Volume') as gax.protobuf.Type; + const establishVolumePeeringMetadata = protoFilesRoot.lookup( + '.google.cloud.netapp.v1.OperationMetadata') as gax.protobuf.Type; const createSnapshotResponse = protoFilesRoot.lookup( '.google.cloud.netapp.v1.Snapshot') as gax.protobuf.Type; const createSnapshotMetadata = protoFilesRoot.lookup( @@ -470,6 +474,10 @@ export class NetAppClient { this.operationsClient, revertVolumeResponse.decode.bind(revertVolumeResponse), revertVolumeMetadata.decode.bind(revertVolumeMetadata)), + establishVolumePeering: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + establishVolumePeeringResponse.decode.bind(establishVolumePeeringResponse), + establishVolumePeeringMetadata.decode.bind(establishVolumePeeringMetadata)), createSnapshot: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createSnapshotResponse.decode.bind(createSnapshotResponse), @@ -651,7 +659,7 @@ export class NetAppClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const netAppStubMethods = - ['listStoragePools', 'createStoragePool', 'getStoragePool', 'updateStoragePool', 'deleteStoragePool', 'validateDirectoryService', 'switchActiveReplicaZone', 'listVolumes', 'getVolume', 'createVolume', 'updateVolume', 'deleteVolume', 'revertVolume', 'listSnapshots', 'getSnapshot', 'createSnapshot', 'deleteSnapshot', 'updateSnapshot', 'listActiveDirectories', 'getActiveDirectory', 'createActiveDirectory', 'updateActiveDirectory', 'deleteActiveDirectory', 'listKmsConfigs', 'createKmsConfig', 'getKmsConfig', 'updateKmsConfig', 'encryptVolumes', 'verifyKmsConfig', 'deleteKmsConfig', 'listReplications', 'getReplication', 'createReplication', 'deleteReplication', 'updateReplication', 'stopReplication', 'resumeReplication', 'reverseReplicationDirection', 'establishPeering', 'syncReplication', 'createBackupVault', 'getBackupVault', 'listBackupVaults', 'updateBackupVault', 'deleteBackupVault', 'createBackup', 'getBackup', 'listBackups', 'deleteBackup', 'updateBackup', 'createBackupPolicy', 'getBackupPolicy', 'listBackupPolicies', 'updateBackupPolicy', 'deleteBackupPolicy', 'listQuotaRules', 'getQuotaRule', 'createQuotaRule', 'updateQuotaRule', 'deleteQuotaRule', 'restoreBackupFiles', 'listHostGroups', 'getHostGroup', 'createHostGroup', 'updateHostGroup', 'deleteHostGroup']; + ['listStoragePools', 'createStoragePool', 'getStoragePool', 'updateStoragePool', 'deleteStoragePool', 'validateDirectoryService', 'switchActiveReplicaZone', 'listVolumes', 'getVolume', 'createVolume', 'updateVolume', 'deleteVolume', 'revertVolume', 'establishVolumePeering', 'listSnapshots', 'getSnapshot', 'createSnapshot', 'deleteSnapshot', 'updateSnapshot', 'listActiveDirectories', 'getActiveDirectory', 'createActiveDirectory', 'updateActiveDirectory', 'deleteActiveDirectory', 'listKmsConfigs', 'createKmsConfig', 'getKmsConfig', 'updateKmsConfig', 'encryptVolumes', 'verifyKmsConfig', 'deleteKmsConfig', 'listReplications', 'getReplication', 'createReplication', 'deleteReplication', 'updateReplication', 'stopReplication', 'resumeReplication', 'reverseReplicationDirection', 'establishPeering', 'syncReplication', 'createBackupVault', 'getBackupVault', 'listBackupVaults', 'updateBackupVault', 'deleteBackupVault', 'createBackup', 'getBackup', 'listBackups', 'deleteBackup', 'updateBackup', 'createBackupPolicy', 'getBackupPolicy', 'listBackupPolicies', 'updateBackupPolicy', 'deleteBackupPolicy', 'listQuotaRules', 'getQuotaRule', 'createQuotaRule', 'updateQuotaRule', 'deleteQuotaRule', 'restoreBackupFiles', 'listHostGroups', 'getHostGroup', 'createHostGroup', 'updateHostGroup', 'deleteHostGroup', 'executeOntapPost', 'executeOntapGet', 'executeOntapDelete', 'executeOntapPatch']; for (const methodName of netAppStubMethods) { const callPromise = this.netAppStub.then( stub => (...args: Array<{}>) => { @@ -1890,6 +1898,426 @@ export class NetAppClient { throw error; }); } +/** + * `ExecuteOntapPost` dispatches the ONTAP `POST` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.Struct} request.body + * Required. The raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapPostResponse|ExecuteOntapPostResponse}. + * 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/v1/net_app.execute_ontap_post.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPost_async + */ + executeOntapPost( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, {}|undefined + ]>; + executeOntapPost( + request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPost( + request: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPost( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPostRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapPost request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapPost response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapPost(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapPostResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPostRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapPost 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; + }); + } +/** + * `ExecuteOntapGet` dispatches the ONTAP `GET` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapGetResponse|ExecuteOntapGetResponse}. + * 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/v1/net_app.execute_ontap_get.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapGet_async + */ + executeOntapGet( + request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, {}|undefined + ]>; + executeOntapGet( + request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): void; + executeOntapGet( + request: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): void; + executeOntapGet( + request?: protos.google.cloud.netapp.v1.IExecuteOntapGetRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapGet request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapGet response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapGet(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapGetResponse, + protos.google.cloud.netapp.v1.IExecuteOntapGetRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapGet 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; + }); + } +/** + * `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapDeleteResponse|ExecuteOntapDeleteResponse}. + * 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/v1/net_app.execute_ontap_delete.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapDelete_async + */ + executeOntapDelete( + request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, {}|undefined + ]>; + executeOntapDelete( + request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): void; + executeOntapDelete( + request: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): void; + executeOntapDelete( + request?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapDelete request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapDelete response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapDelete(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse, + protos.google.cloud.netapp.v1.IExecuteOntapDeleteRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapDelete 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; + }); + } +/** + * `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the + * `StoragePool` cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.Struct} request.body + * Required. The raw `JSON` body of the request. + * The body should be in the format of the ONTAP resource. + * For example: + * ``` + * { + * "body": { + * "field1": "value1", + * "field2": "value2", + * } + * } + * ``` + * @param {string} request.ontapPath + * Required. The resource path of the ONTAP resource. + * Format: + * `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`. + * For example: + * `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`. + * @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.netapp.v1.ExecuteOntapPatchResponse|ExecuteOntapPatchResponse}. + * 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/v1/net_app.execute_ontap_patch.js + * region_tag:netapp_v1_generated_NetApp_ExecuteOntapPatch_async + */ + executeOntapPatch( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, {}|undefined + ]>; + executeOntapPatch( + request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPatch( + request: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + callback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): void; + executeOntapPatch( + request?: protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|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({ + 'ontap_path': request.ontapPath ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('executeOntapPatch request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('executeOntapPatch response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.executeOntapPatch(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse, + protos.google.cloud.netapp.v1.IExecuteOntapPatchRequest|undefined, + {}|undefined + ]) => { + this._log.info('executeOntapPatch 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 storage pool. @@ -2895,6 +3323,126 @@ export class NetAppClient { const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.revertVolume, this._gaxModule.createDefaultBackoffSettings()); return decodeOperation as LROperation; } +/** + * Establish volume peering. This is used to establish cluster and svm + * peerings between the GCNV and OnPrem clusters. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The volume resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @param {string} request.peerClusterName + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @param {string} request.peerSvmName + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @param {string[]} [request.peerIpAddresses] + * Optional. List of IPv4 ip addresses to be used for peering. + * @param {string} request.peerVolumeName + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * @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/v1/net_app.establish_volume_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async + */ + establishVolumePeering( + request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + establishVolumePeering( + request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishVolumePeering( + request: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + establishVolumePeering( + request?: protos.google.cloud.netapp.v1.IEstablishVolumePeeringRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + 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.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('establishVolumePeering response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('establishVolumePeering request %j', request); + return this.innerApiCalls.establishVolumePeering(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('establishVolumePeering response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `establishVolumePeering()`. + * @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/v1/net_app.establish_volume_peering.js + * region_tag:netapp_v1_generated_NetApp_EstablishVolumePeering_async + */ + async checkEstablishVolumePeeringProgress(name: string): Promise>{ + this._log.info('establishVolumePeering 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.establishVolumePeering, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } /** * Create a new snapshot for a volume. * diff --git a/packages/google-cloud-netapp/src/v1/net_app_client_config.json b/packages/google-cloud-netapp/src/v1/net_app_client_config.json index 9f22367db7e..5656e408ea9 100644 --- a/packages/google-cloud-netapp/src/v1/net_app_client_config.json +++ b/packages/google-cloud-netapp/src/v1/net_app_client_config.json @@ -95,6 +95,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "EstablishVolumePeering": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "ListSnapshots": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -346,6 +350,22 @@ "DeleteHostGroup": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "ExecuteOntapPost": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapGet": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapDelete": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteOntapPatch": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-netapp/src/v1/net_app_proto_list.json b/packages/google-cloud-netapp/src/v1/net_app_proto_list.json index f3e481222f8..5960367b5d2 100644 --- a/packages/google-cloud-netapp/src/v1/net_app_proto_list.json +++ b/packages/google-cloud-netapp/src/v1/net_app_proto_list.json @@ -7,6 +7,7 @@ "../../protos/google/cloud/netapp/v1/common.proto", "../../protos/google/cloud/netapp/v1/host_group.proto", "../../protos/google/cloud/netapp/v1/kms.proto", + "../../protos/google/cloud/netapp/v1/ontap.proto", "../../protos/google/cloud/netapp/v1/quota_rule.proto", "../../protos/google/cloud/netapp/v1/replication.proto", "../../protos/google/cloud/netapp/v1/snapshot.proto", diff --git a/packages/google-cloud-netapp/test/gapic_net_app_v1.ts b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts index d611e5f7fcb..9c37ee83a63 100644 --- a/packages/google-cloud-netapp/test/gapic_net_app_v1.ts +++ b/packages/google-cloud-netapp/test/gapic_net_app_v1.ts @@ -1571,6 +1571,438 @@ describe('v1.NetAppClient', () => { }); }); + describe('executeOntapPost', () => { + it('invokes executeOntapPost without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() + ); + client.innerApiCalls.executeOntapPost = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapPost(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostResponse() + ); + client.innerApiCalls.executeOntapPost = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapPost( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPostResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapPost = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapPost(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPost as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPost with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPostRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPostRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapPost(request), expectedError); + }); + }); + + describe('executeOntapGet', () => { + it('invokes executeOntapGet without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() + ); + client.innerApiCalls.executeOntapGet = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapGet(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetResponse() + ); + client.innerApiCalls.executeOntapGet = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapGet( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapGetResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapGet = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapGet(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapGet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapGet with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapGetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapGetRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapGet(request), expectedError); + }); + }); + + describe('executeOntapDelete', () => { + it('invokes executeOntapDelete without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() + ); + client.innerApiCalls.executeOntapDelete = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapDelete(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteResponse() + ); + client.innerApiCalls.executeOntapDelete = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapDelete( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapDeleteResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapDelete = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapDelete(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapDelete as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapDelete with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapDeleteRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapDeleteRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapDelete(request), expectedError); + }); + }); + + describe('executeOntapPatch', () => { + it('invokes executeOntapPatch without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() + ); + client.innerApiCalls.executeOntapPatch = stubSimpleCall(expectedResponse); + const [response] = await client.executeOntapPatch(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchResponse() + ); + client.innerApiCalls.executeOntapPatch = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeOntapPatch( + request, + (err?: Error|null, result?: protos.google.cloud.netapp.v1.IExecuteOntapPatchResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch with error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedHeaderRequestParams = `ontap_path=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeOntapPatch = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeOntapPatch(request), expectedError); + const actualRequest = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeOntapPatch as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeOntapPatch with closed client', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.ExecuteOntapPatchRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.ExecuteOntapPatchRequest', ['ontapPath']); + request.ontapPath = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.executeOntapPatch(request), expectedError); + }); + }); + describe('createStoragePool', () => { it('invokes createStoragePool without error', async () => { const client = new netappModule.v1.NetAppClient({ @@ -2965,6 +3397,160 @@ describe('v1.NetAppClient', () => { }); }); + describe('establishVolumePeering', () => { + it('invokes establishVolumePeering without error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(expectedResponse); + const [operation] = await client.establishVolumePeering(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering without error using callback', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.establishVolumePeering = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.establishVolumePeering( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering with call error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.establishVolumePeering(request), expectedError); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes establishVolumePeering with LRO error', async () => { + const client = new netappModule.v1.NetAppClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.netapp.v1.EstablishVolumePeeringRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.netapp.v1.EstablishVolumePeeringRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.establishVolumePeering = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.establishVolumePeering(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.establishVolumePeering as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkEstablishVolumePeeringProgress without error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishVolumePeeringProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEstablishVolumePeeringProgress with error', async () => { + const client = new netappModule.v1.NetAppClient({ + 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.checkEstablishVolumePeeringProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + describe('createSnapshot', () => { it('invokes createSnapshot without error', async () => { const client = new netappModule.v1.NetAppClient({